NSClient++ Help (#1) - WinNT4 Error (#58) - Message List
Hi all, I have some WinNT 4 machine. I did these:
- unzip the distribution.
- edit NSC.ini
- unzip the pdh.dll into the same folder as nsclient++.exe
- nsclient++ /install
- nsclient++ /start
but when check mem/cpu/uptime the result is this error: NSClient - ERROR: PDH Collection thread not running.
Other controls (services status, disk space, nsclient version) are ok.
-
Message #86
Add an info. The same configuration (I have copied the files) in another WinNT work right. Using Process Explorer I have seen that on the machine that nsclient goes ok the process nsclient++.exe have 3 thread: CheckSystem.dll NSClientListener.dll NSClient++.exe ADVAPI32.dll
On the other machine the thread CheckSystem.dll there is not! Why? The ini file are the same, copied from the other, I have verified this.
Thanks
Pivot11/16/07 16:06:56 (6 years ago)-
Message #89
Hello,
Why not use the good-old /test option and/or check the log-file?
Usually pdh issues are related to missing languages. But it is hard to know what is wrong with out the log.
Try the following:
nsclient++ /test
and let me kow what it says... ANother option is so past the output of nsc.log (preferably with debug logging enabled)
MickeM
anonymous11/16/07 21:28:54 (6 years ago)-
Message #95
Sorry. I have found the problem: language.
I have Windows NT Server 4. In regional settings the language is English, but log report Italian language. The O.S. is English (menu and other).
The strange is that in another Windows NT Server 4, where in regional settings I see Italian, all is ok?!
Now I have set English to 0x0410 and Italian to 0x409, so I don't modify the server setting. In this way all is ok, but always have this three erros at start of service. This is the log:
2007-11-20 15:21:30: debug:.\NSClient++.cpp:305: Loading plugin: NSClient server... 2007-11-20 15:21:30: error:.\PDHCollector.cpp:69: Getting counter info... 2007-11-20 15:21:30: debug:c:\source\nscp\trunk\include\Socket.h:515: Bound to: 0.0.0.0:12489 2007-11-20 15:21:30: debug:.\PDHCollector.cpp:81: Autodetected NT4, using NT4 PDH counters. 2007-11-20 15:21:30: debug:c:\source\nscp\trunk\include\Socket.h:521: Socket ready... 2007-11-20 15:21:30: debug:.\PDHCollector.cpp:101: Detected language: English US (0x0410) 2007-11-20 15:21:30: error:.\PDHCollector.cpp:119: Attempting to open counter... 2007-11-20 15:21:30: error:.\PDHCollector.cpp:122: Counters opend...
I have seen that also Windows Server 2003 report the last two errors.
My questions are:
- where nsclient++ look for language?
- where, under Win NT, I must change language?
- why the 3 errors in log?
Thanks a lot Regards
Pivot11/20/07 15:21:37 (6 years ago)-
Message #96
Bad layout, excuse me.
This is the log:
2007-11-20 15:21:30: debug:.\NSClient++.cpp:305: Loading plugin: NSClient server...
2007-11-20 15:21:30: error:.\PDHCollector.cpp:69: Getting counter info...
2007-11-20 15:21:30: debug:c:\source\nscp\trunk\include\Socket.h:515: Bound to: 0.0.0.0:12489
2007-11-20 15:21:30: debug:.\PDHCollector.cpp:81: Autodetected NT4, using NT4 PDH counters.
2007-11-20 15:21:30: debug:c:\source\nscp\trunk\include\Socket.h:521: Socket ready...
2007-11-20 15:21:30: debug:.\PDHCollector.cpp:101: Detected language: English US (0x0410)
2007-11-20 15:21:30: error:.\PDHCollector.cpp:119: Attempting to open counter...
2007-11-20 15:21:30: error:.\PDHCollector.cpp:122: Counters opend...
Pivot11/20/07 15:28:26 (6 years ago)-
Message #97
If you mean
2007-11-20 15:21:30: error:.\PDHCollector.cpp:119: Attempting to open counter...
sorry, that is a debug message and should not have been reported as an error (my mistake) I thought I had fixed that though. What version do you use?
mickem11/20/07 15:49:20 (6 years ago)-
Message #98
Ah ok, no problem.
Also this?
2007-11-20 15:21:30: error:.\PDHCollector.cpp:69: Getting counter info...
2007-11-20 15:21:30: error:.\PDHCollector.cpp:122: Counters opend...
I'm using version 0.2.7.
And about the language on WinNT?
Thanks
anonymous11/20/07 15:54:29 (6 years ago)-
Message #99
The "language" is dodgy which is why it is a "guess". The problem is there is not to my knowlaged any way to detect the *propper* language (and it is worse on NT). What I get is IIRC the locale which "often" is correct but not always. Hopefully the "fall back" to English in the next version will fix many of these issues.
But the "best" way is I think to manually set the values in the nsc.ini file if you have problems. There you can IIRC either set the local and disable the auto-lookup and also set the actual values to use.
If you have the time it would be interesting to see if the last nightly build works "better" in this regard on NT4.
Michael Medin
mickem11/20/07 16:27:44 (6 years ago)-
Message #100
Esperanto is the final solution ;-)
I have look for language in nsc.ini, where is the language settings? This is the right solution. Can you give me syntax?
If you have a precompiled version could try on NT in week. I have not look.
I have another problem with memory. A server (always NT) that have 2 virtual memory files, on disk C: and D:. In this case nsclient++ return:
Memory usage: total:914,60 Mb - used: 2000,33 Mb (219%) - free: -1085,73 Mb (-119%)
'Memory usage'=2000,33Mb;731,68;823,14;0.00;914,60
Instead the physical memory is 2Gb, vitual is on C: 1Gb on D: 2Gb.
Very very thanks
Pivot11/20/07 16:48:58 (6 years ago)-
Message #101
I just checked the settings for language. There is not currently (your version) an option to select language but you can override the counters (which gives you the same result) Look at CheckSystem and the various "MemoryCommitLimit?" etc... The "force_language=0x0407" is new and vill be in the next version.
As for precompiled yes. look under download above and pick the "lates" nightly for your platform (the one from last night was accidentaly called -2005 so it will be sorted "wrong" will be fixed in a bit)
The memory thing lookes like a integer overflow... question is where I shall have to investigate. All in all I dont use check_nt much as check_nrpe is "better".
MickeM
anonymous11/20/07 20:12:44 (6 years ago) -
Message #102
Humm, that memory issue is strange, is it just on the "swap file" thingy or do you have it on a systems with much RAM as well? I tried to boost up my VPS and it worked for around 2.5Gb of RAM:
source@gotrek:~/src$ check_nt -H 192.168.0.118 -p 12489 -v MEMUSE -w 80 -c 90 Memory usage: total:2591.91 Mb - used: 21.52 Mb (1%) - free: 2570.39 Mb (99%) | 'Memory usage'=21.52Mb;2073.53;2332.72;0.00;2591.91
anonymous11/20/07 22:08:20 (6 years ago)-
Message #103
Yes, I swap Italian with English language code in counter defs file. I wait for ini setting that is more fine.
My memory is: physical 2 Gb virtual on C: min 1 Gb - max 2Gb, now is 1 Gb virtual on D: min 1 Gb - max 2Gb, now is 2 Gb
so total is 5 Gb.
Unsigned Int go up to 4.294.967.295, about 4 Gb, then is realy overflow, is it right?
How can I give thanks? You are very friendly and available, thank you!
P.S.: sorry for my bad english
Pivot11/21/07 01:01:10 (6 years ago)-
Message #115
humm....
source@gotrek:~/src$ check_nt -H 192.168.0.118 -p 12489 -v MEMUSE -w 80 -c 90 Memory usage: total:558727.45 Mb - used: 21722.84 Mb (4%) - free: 537004.61 Mb (96%) | 'Memory usage'=21722.84Mb;446981.96;502854.71;0.00;558727.45
I did not boost the "memory" just added 1000 to the value returned from pdh so it should work.
Would be interesting to see what
nsclient++ /test
tells you when you run this query.
Might also be a good idea to check what version of check_nt you have (since it makes formatting at the other end). Also note that in general check_nt is crap, better to use check_nrpe if you ask me :)
Also the various "MemoryCommitLimit?" can be set in the .ini file thus they override the erronous detection and .def files. But no matter next version will solve this more elegantly.
And as for giving thanx, the best thing is feedback :) And if you so wish you can donate money to my paypal account if you feel like giving monetary thanx.
MickeM
mickem11/21/07 21:03:48 (6 years ago)-
Message #117
How can I test? What command I need to write?
When I run 'nsclient++ /test' on the server where I have the problem and type the command:
check_nt -H 192.168.1.10 -p 12489 -v MEMUSE -w 80 -c 90
This is the result:
l .\NSClient++.cpp(402) No handler for command: 'check_nt'
anonymous11/22/07 09:41:46 (6 years ago)-
Message #118
when you run "nsclient++ /test" you start the service (same as when you run the service) but you also get a console that logs what happens.
so:
nsclient++ /stop nsclient++ /test # from the unix box run various: ./check_nt -H ... # and check the log from nsclient++ # when you are done you: exit nsclient++ /start
mickem11/22/07 09:48:25 (6 years ago)-
Message #119
Ok. I have done. The result is ....nothing!
On the unix box I have this result:
Memory usage: total:914,60 Mb - used: 2003,72 Mb (219%) - free: -1089,12 Mb (-119%) | 'Memory usage'=2003,72Mb;731,68;823,14;0.00;914,60
On the server where nsclient run in test there is no message.
Pivot11/22/07 10:11:19 (6 years ago)-
Message #120
nothing?
That is strange, when it boots it should at least tell you a lot of things... Are you sure you did not have another client running? (since it needs to accept connections you need to shut-down the "normal" client or change port)
Also make sure you use the latest nightly (not sure what the old "release" tells you... :)
MickeM
mickem11/22/07 10:33:28 (6 years ago)-
Message #121
Nothing else the message when starts ;-)
l .\NSClient++.cpp(109) Using settings from: INI-file
e .\PDHCollector.cpp(69) Getting counter info...
l .\NSClient++.cpp(110) Enter command to inject or exit to terminate...
e .\PDHCollector.cpp(119) Attemping to open counter...
e .\PDHCollector.cpp(122) Counters opend...
I am using version 0.2.7, not the latest nightly.
Pivot11/22/07 10:48:04 (6 years ago)-
Message #122
This is the result with the latest nightly:
C:\nsclient>nsclient++ /test
< Reading: modules from: C:\nsclient\NSC.ini
d \NSClient++.cpp(373) Loading plugin: CheckDisk...
d \NSClient++.cpp(373) Loading plugin: CheckSystem...
d \CheckSystem.cpp(71) Autodetected NT4<, using PSAPI process enumeration.
d \NSClient++.cpp(373) Loading plugin: NSClient server...
l \NSClient++.cpp(130) Using settings from: INI-file
l \NSClient++.cpp(131) Enter command to inject or exit to terminate...
d \PDHCollector.cpp(79) Autodetected NT4, using NT4 PDH counters.
d \PDHCollector.cpp(103) Detected language: English US (0x0410)
d \Socket.h(538) Bound to: 0.0.0.0:12489
d \NSClientListener.cpp(142) Data: None&7
d \NSClientListener.cpp(167) Data:
d \NSClient++.cpp(438) Injecting: checkMem: nsclient
d \NSClient++.cpp(458) Injected Result: OK -- 959016960&2100838400
d \NSClient++.cpp(459) Injected Performance Result:
On the linux box:
Memory usage: total:914,60 Mb - used: 2003,53 Mb (219%) - free: -1088,94 Mb (-119%) | 'Memory usage'=2003,53Mb;731,68;823,14;0.00;914,60
Pivot11/22/07 10:58:22 (6 years ago)-
Message #125
Humm, oki... then I would guess that "NT4 PDH" (ie the widows component I am asking) does not "get it right".
I shall try to see if I can add a new virtual disk to my box and get above 4gb myself. But then I know it is nothing wrong "along the way", thanx.
MickeM
mickem11/22/07 11:36:46 (6 years ago)-
Message #126
Ok, I wait :-)
P.S.: how can I "quote" program output in this "forum" to avoid that all lines go in a unique line without LF? I must add a blank line to avoid this
Pivot11/22/07 12:14:25 (6 years ago)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-








