Forum OpenACS Development: XoTCL Request Monitor on Windows

Request notifications

Collapse
Posted by Frank Bergmann on
Hi (Gustaf)!

Running /request-monitor/ on Linux works fine. However, on Windows I get:

invalid command name "throttle"
while executing
"throttle trend $t"
(procedure "counterTable" line 3)

I searched for "throttle" and noticed that there were multiple procedures name "*throttle*" on Linux, while there is only "Object ::throttle" on Windows. That's using exactly the same database dump. Do you have an idea where to search?

Also, the xotcl-request-monitor contains calls using "exec" to "sysctl" and "/usr/bin/uptime" which doesn't exist in CygWin and probably also not in Maurizio's Windows installer.

There are also quite a number of "exec" calls in the acs-* packages, and I understand that most of them won't work on Windows. These functionalites don't seem to be used very ofter, but still...

Cheers,
Frank

Collapse
Posted by Antonio Pisano on
Dear Frank,

by my grepping these are the occurrences of exec in current code in acs-* packages that I don't expect to be working at all, not even when the proper software is correctly installed on a Windows machine:
- acs-admin/www/monitor.tcl:if {[catch { set uptime_output [exec /usr/bin/uptime] } errmsg]} {
- acs-admin/www/apm/version-generate-diffs.tcl: set cmd [list exec /usr/bin/diff]

These were fixed by http://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-9%3Aantoniop%3A20170620193423

In all other case, proper configuration and installation of the required software should be sufficient to ensure functionality.

Please let me know if I am missing something

Ciao
Antonio

Collapse
Posted by Antonio Pisano on
Occurrence in xotcl-request-monitor/www/index.tcl was also fixed by http://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-9%3Aantoniop%3A20170620194611

Notice that uptime is used only as last resort, when no other cheaper unix compatible strategy is available. Therefore, call to sysctl can stay, as will just silently fail on Windows.

Something you migh be interested into:
https://sourceforge.net/projects/gnuwin32/

Collapse
Posted by Frank Bergmann on
Thanks a lot Antonio!

So yeah, we'd need to upgrade.
Or maybe we'd back-patch these changes. But it's good to know they are included "upstream" now.

I also found the other issue with the missing throttle functionality. The reason is that libthread is missing. I'll check with Maurizio.

Thanks!
Frank

Collapse
Posted by Maurizio Martignano on
Dear all,
I'm following this discussion and I also noticed that nsthread.dll does not seem to be able to load properly in my distribution.

Unfortunately in these days (till Friday) I am busy at this workshop http://www.metroaerospace.org/.

I will look into the this issue and make nsthread.dll load properly as soon as I can.

Thank you,
Maurizio

Collapse
Posted by Gustaf Neumann on
when configuring tcl lib thread, one has to specify "--with-naviserver", otherwise it would be built as a "module" as required by NaviServer and AOLserver. If it is not built as a module, it is not loadable.

see e.g. https://github.com/gustafn/install-ns/blob/master/install-ns.sh#L517

Collapse
Posted by Maurizio Martignano on
Dear Frank and Gustav, when this morning I answered to Frank's post (and a similar email he sent me) I was either too concentrated on the workshop I'm having these days or still sleeping.

Let's try to fix that:

@ Frank:
the TCL Thread library you are trying to load with this command:
ns_param libthread $bindir/nsthread.dll
is wrong. That is not the library you want. This is a *.dll linked by default to Naviserver
(try ro rename nsthread.dll into something else and you'll see nsd.exe won't start any longer).

The library you want, in my distribution, is:
naviserver/lib/thread2.8.0/thread28.dll

@Frank and Gustaf
This TCL Thread library has not been built the way Gustaf mentioned, so it is not immediately loadable in Naviserver.
But, if the *.dll file is properly positioned it can be "activated" when needed with the instruction
"package require Thread"
Try for instance from within DS:

"
package require Thread
set tid [::thread::id]
"
Am I still sleeping?
Probably yes.

Collapse
Posted by Maurizio Martignano on
Just an additional comment on my post.
As soon as possible I am going to release a new version of my distribution
where Thread 2.8.0 DLL is compiled with NS_AOLSERVER flag defined, that is equivalent to the configure option --with-naviserver

Hope it helps,
Maurizio

Collapse
Posted by Maurizio Martignano on
I'm currently uploading version 3.3.0 of Windows-OpenACS.

This version fixes the problem of Thread 2.8.0 which now is a loadable module and some of the problems that were observed in the Nsssl module.

Hope it helps,
Maurizio

Collapse
Posted by Gustaf Neumann on
good news.

the --with-naviserver flag of configure declares NS_INCLUDES, NS_LIBS and defines NS_AOLSERVER. Don't load the library with "package require Thread", unless you are are asking for troubles (with the flag the registered commands are named ns_* to replace the original NaviServer/AOLserver commands).

Just curious: who observed what problems with the nsssl module?

Collapse
Posted by Maurizio Martignano on
Hello Gustaf, this has nothing to do with Naviserver.

I did compile OpenSSL and the Nsssl module with different compilation switches.

This prevented Nsssl from being able to properly call/use OpenSSL.
Now the problem is fixed.

Thank you,
Maurizio

Collapse
Posted by Gustaf Neumann on
ok. glad, it works.