Monitoring Threads on WIN2K3 platforms

Anthony Montibello amontibello at gmail.com
Tue May 10 09:36:31 CEST 2005


For checking Processes : just to see if particular ones are running use:
./check_nt -H X.Y.Z.W  -v PROCSTATE -l process1,process2,processN

To actually check other useful things about the process threads
running use the performance counter as Sebastian had recommended.

Setting up Performance counters is one of the places were the extra
commands added into NC_Net come in useful.
the performance counter category of "Process"  contains a separate
instance for each process thread. So instead of using the _Total you
can check any instance by substituting the _Total with the instance
name.

TO check instance names on a particular system use check_Nt on the
command line:(this should work with both NS_Client and NC_Net)
./check_nt -H X.Y.Z.W -v INSTANCES -l Process

If using NC_Net with the modified check_nt.c you can check what
counters are available:
./check_nt -H X.Y.Z.W -v ENUMCOUNTER -l PROCESS
PROCESS: % Processor Time; % User Time; % Privileged Time; Virtual
Bytes Peak; Virtual Bytes; Page Faults/sec; Working Set Peak; Working
Set; Page File Bytes Peak; Page File Bytes; Private Bytes; Thread
Count; Priority Base; Elapsed Time; ID Process; Creating Process ID;
Pool Paged Bytes; Pool Nonpaged Bytes; Handle Count; IO Read
Operations/sec; IO Write Operations/sec; IO Data Operations/sec; IO
Other Operations/sec; IO Read Bytes/sec; IO Write Bytes/sec; IO Data
Bytes/sec; IO Other Bytes/sec

you can also check the Description of the category in NC_Net:
./check_nt -H X.Y.Z.W -v ENUMCOUNTERDESC -l Process
The Process performance object consists of counters that monitor
running application program and system processes.  All the threads in
a process share the same address space and have access to the same
data.

or an actual counter: (Some counter names are misleading)
./check_nt -H X,Y,Z,W -v ENUMCOUNTERDESC -l "Process,Thread Count"
The number of threads currently active in this process. An instruction
is the basic unit of execution in a processor, and a thread is the
object that executes instructions. Every running process has at least
one thread.

Some of the other windows agents may also have access to performance counters.

For using NS_Client/NC_Net use the following: ( the -s is needed if
not using default password of NS_Client/NC_Net)
I prefer using a more general commad_line for check_nt this enables me
to use the same command_line for many performance counter checks.

command_line:
define command{
       command_name check_nc_net_counter
       command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v COUNTER -l
"$ARG1$" -w $ARG2$ -c $arg3$
       }

then in the service definition use the check_command like the
following that should check the system process for the number of
running threads :
check_command   check_nc_net_counter!\Process(System)\Thread
Count,Thread_Count!90!100

I hope this has helps,
TOny


On 5/9/05, Bergström Sebastian <Sebastian.Bergstroem at kunskapsskolan.se> wrote:
> We don't have W23 yet, only W2K. The check command below are used on Windows 2000 servers running NSClient*. Hopefully this will work on W2K3 as well. It's worth a try. Please get back to me, if it works for you or not. We're planning to upgrade this summer.
> 
> define command{
>       command_name    check_nt_threads
>       command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -s $USER3$ -v COUNTER -l "\\Process(_Total)\\Thread Count","Thread Count: %.f" -w $ARG1$ -c $ARG2$
> 
> *Recent tests (by myself) suggests that NC_Net has many advantages over NSClient and should be used in its place. At least on machines that doesn't have any Nagios agent running. NC_Net can be used as a drop in replacement for NSClient which makes it even more tempting.
> 
> Best regards,
> Sebastian Bergstroem
> 
> -----Ursprungligt meddelande-----
> Från: Collier, Tirus [mailto:tpcollier at liberty.edu]
> Skickat: den 9 maj 2005 17:23
> Till: nagios-users at lists.sourceforge.net
> Ämne: [Nagios-users] Monitoring Threads on WIN2K3 platforms
> 
> 
> Good Day,
> 
> Does anyone have any experience monitoring process thread on WIN2K3 platforms. Please advise, thanks.
> 
> Tirus
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id281&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list