CANalyzer CAPL: determine if bus sleep (no messages on bus) - capl

I am using CANalyzer 7.0 and an trying to figure out how to determine in CAPL if the CAN bus has gone to sleep (no more messages being sent). How can I do this?
I tried to read BusLoad using sysGetVariableInt() but it always returned zero. Perhaps I had the wrong namespace/variable name. Where can I find all system variables?
Edit - I've tried this:
BusLoad = sysGetVariableInt("_Statistics", "CAN1::Busload");
I've also tried changing the namespace but not sure where to find list of system namespaces.

Accessing statistics via system variables was introduced with CANalyzer/CANoe version 8.0.
As your are using version 7.0, try the following:
BusLoad = canGetBusLoad(1);
Starting from version 7.1, you would use:
BusLoad = CAN1.BusLoad;
From 8.0 onwards, you can use the systemvariables as in your initial question.
To answer your second question, you can get a list of all system variables from the Symbol Explorer.

Related

X11 without backing store

I need to test an X11 application for its behavior when the X server does not use a backing store for the application's windows (see https://tronche.com/gui/x/xlib/window/attributes/backing-store.html). I.e., I want the server to ask the application to redraw "damaged" parts of the window by generating Expose events.
The problem is that on my current platform, Linux Mint 20.2 Cinnamon, the X server seems to always use backing store, and also when I don't ask for it.
I have also tried to install some old versions of Ubuntu (back to Ubuntu 14.04), but they also seem to always use backing store.
Question: Is there a way to disable use of backing store on Linux Mint 20.2 Cinnamon? If not, is there another recent Linux distribution where this is possible? If not, does anyone have any idea what I need to do to be able to test without backing store?
EDIT: Turns out that Ubuntu 10.04 has backing store disabled by default, i.e., the behavior that I am after, and Ubuntu 12.04 does not. However, it is a hassle to depend on Ubuntu 10.04 because it is no longer supported by Canonical. It would be great if anybody has input on how that behavior can be achieved on a contemporary distribution.
'backing-store' is a window attribute, which can be set either at window creation or via XChangeWindowAttributes.
e.g.
long attr_mask = CWBackingStore | CWEventMask;
XSetWindowAttributes attr = {
.backing_store = NotUseful,
.event_mask = ExposureMask //among others
};
XUnmapWindow(dpy, win); //maybe not necessary
XChangeWindowAttributes(dpy, win, attr_mask, &attr);
XMapWindow(dpy, win); //maybe not necessary
Note (see https://tronche.com/gui/x/xlib/window/attributes/backing-store.html):
A backing-store attribute of NotUseful advises the X server that maintaining contents is unnecessary, although some X implementations may still choose to maintain contents and, therefore, not generate Expose events.
Another possibility:
Start the xserver with the command line parameter (see man xserver)
bs disables backing store support on all screens.
Based on the comment below:
I don't understand why it should not be relevant to (be able to) 'disable' the backing-store via client? The value NotUseful disables backing-store for the specific window (if supported by the server, see Note above).
Otherwise, there are only two options left, either via command line argument (see above) or via xorg.conf.
e.g.
add in the directory (/etc/X11/)xorg.conf.d a file named 10-backing-store.conf with the following content:
Section "Device"
Option "BackingStore" "off"
EndSection
Restart X (or the machine) and see what happens (locate the log file Xorg.0.log - either in /var/log or ~/.local/share/xorg - and look for the token "Backing store", e.g. less Xorg.0.log | grep "Backing store").
Of course, both options requires super user privileges and a restart.

odoo.sh ver. 14 WKHTMLTOPDF 0.12.25: Unable to call host printing service (HTTPError). How to circumvent this?

We're using odoo.sh platform with odoo14. The installed wkhtmltopdf is wkhtmltopdf_paas_wrapper 0.12.5, we can't upgrade to 0.12.6 because the access is very limited we cant use 'sudo' to apt-install. To temporarily solve this, we decided to use the 0.12.5 version. But it returns "Unable to call host printing service (HTTPError)" even with the right arguments. I've already tried it with the staging and production server, but still the same result. The ticket I've sent hasn't been replied to yet. This is so frustrating, I'm going bonkers...please help.
here's a screenshot:
ps: unrecognized argument error was intentional so I can display the available args. I've also crossed out the project domain. Thank you
Apparently, to properly execute the package, it should not have been "wkhtmltopdf" but instead "wkhtmltopdf.bin". I've overridden the ir_actions_report.py to change the package name. Here's the snippet of the original source code:
They shouldve known better, its a paid platform.

Windows 8 NetScheduleJobAdd The request is not supported

Application uses API functions like: NetScheduleJobAdd, NetScheduleJobEnum, NetScheduleJobGetInfo.
Looks like those functions do not work with Windows 8 Jobs.
On creating new job getting error: "The request is not supported" (error ERROR_NOT_SUPPORTED)
AT.exe also does not work in Windows 8. Display the same error.
Documentation quite poor about AT command and Windows 8.
Can somebody explain why mentioned above functions do not work in Windows 8.
Is there any other approaches?
Maybe it is connected with changes in Task Scheduler Architecture in Windows 8?
The documentation for Win32_ScheduledJob says:
The Win32_ScheduledJob class is internally using the AT protocol, which is bound to deprecation starting with Windows 8 and Windows Server 2012. As a first step the AT protocol is disabled by default.
To turn the protocol back on, add the following registry entry:
Key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Configuration
Name: EnableAt
Type: REG_DWORD
Value: 1

Zabbix Hostname Macro in SNMP OID

I'm running Zabbix 2.2.5 and I'm trying to create a template with a couple of SNMP items.
I want to setup my template such that it uses the hostname macro within the SNMP OID, however no matter which macro I try and use I can't seem to get Zabbix to correctly resolve it.
An example of the SNMP OID I'm trying to query is:
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"racka1-exhaust_temperature\"
Where the parent host of the item has the hostname: racka1.
Where I manually specify the OID already including the hostname as above to test, I successfully return a value.
When I set the OID as follows, I get problems:
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"{HOST.NAME1}-exhaust_temperature\"
I've checked through the list of macro's and their usage locations but I can't judge which might cover SNMP OIDs, without looking through the source code.
I've got logging turned up to 4 in an effort to try and understand what is going on however I'm compounded in my testing by Zabbix setting the item to Not Supported and even though this check is set to run every 60 seconds, once I change the OID, I can't get Zabbix to quickly requeue the changed items.
Is it even possible to use a macro in a SNMP OID? If so which should I be using to mirror the hostname?
According to the linked documentation, under "Additional support for user macros" heading it says that user macros (the ones that look like {$MACRO}) are supported in SNMP OID field. However, {HOST.NAME}-like macros are not supported in SNMP OID and this can be confirmed by looking at the source code.
If you wish to have such support, please register a new ZBXNEXT.

How to install applications to a WebSphere 7.0 cluster using wsadmin?

I want to deploy to all four processes on a Websphere cluster with two nodes. Is there a way of doing this with one Jython command or do I have to call 'AdminControl.invoke' on each one?
Easiest way to install an application using wsadmin is with AdminApp and not AdminControl.
I suggest you download wsadminlib.py (Got the link from here)
it has a lot of functions, one of them is installApplication which works also with cluster.
Edit:
Lately I found out about AdminApplication which is a script library included in WAS 7 (/opt/IBM/WebSphere/AppServer/scriptLibraries/application/V70)
The docuemntation is not great in the info center but its a .py file you can look inside to see what it does.
It is imported automatically to wsadmin and you can use it without any imports or other configuration.
Worth a check.
#aviram-segal is right, wsadminlib is really helpful for this.
I use the following syntax:
arg = ["-reloadEnabled", "-reloadInterval '0'", "-cell "+self.cellName, "-node "+self.nodeName, "-server '"+ self.serverName+"'", "-appname "+ name, '-MapWebModToVH',[['.*', '.*', self.virtualHost]]]
AdminApp.install(path, arg)
Where path is the location of your EAR/WAR file.
You can find documentation here

Resources