[mrtg] Re: memory on w2k server

Elmar van Mourik e.vanmourik at zhew.nl
Wed Jan 29 09:37:42 MET 2003

I did some wrong cut&paste in the previous message.
Here are the needed parts for getting info from the windows performance
monitor and for getting the percentage of CPU utilisation and Disk Usage.
NSClient is needed on the windows server.

The mrtg-config file:
# Where to store the database/html/graph files
WorkDir: /srv/www/htdocs/mrtg/voet

# Make stats on number of messages and files scanned
Target[mail-msg]: `/usr/local/bin/chk-viruswall smtp voet` 
MaxBytes[mail-msg]: 2000
Options[mail-msg]: growright,perminute,nopercent  
Title[mail-msg]: SMTP messages & files processed
PageTop[mail-msg]: <H1>SMTP Message Stats for Voet</H1> 
ShortLegend[mail-msg]: p/min 
YLegend[mail-msg]: Msg/Files p/m
LegendI[mail-msg]: Msgs:
LegendO[mail-msg]: Files:

# Make System stats of CPU and Memory usage
Target[sys]: `/usr/local/bin/chk-viruswall sys voet` 
MaxBytes[sys]: 100
Options[sys]: growright,gauge,nopercent
Title[sys]: CPU and Disk Usage
PageTop[sys]: <H1>CPU and Disk Usage</H1> 
ShortLegend[sys]: %
YLegend[sys]: CPU/Disk
LegendI[sys]: CPU:
LegendO[sys]: Disk:

The chk-viruswall script:
# Replace these variables with the correspondig values for your system

# Exe is the location of the check_nt file from the NSclient archive
# clientPwd is the password you set in Registry on the NT client
# CPort = Default is 1248.


# Get stats for number of messages/files processed
if [ $2 = "smtp" ]; then
 $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail
Viruswall\\Total messages processed","%.f"
 $Exe -H $1 -p $CPort -s $ClientPwd -v COUNTER -l "\\InterScan E-Mail
Viruswall\\Number of files scanned","%.f"
 $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME
 echo $3

# Get system information on the CPU and Disk Usage
if [ $2 = "sys" ]; then
 $Exe -H $1 -p $CPort -s $ClientPwd -v CPULOAD -l 5,80,95 | awk '{ print
$5}' | sed s/'%)'//
 $Exe -H $1 -p $CPort -s $ClientPwd -v USEDDISKSPACE -l C | awk '{ print
$10}' | sed s/'('// | sed s/'%)'//
 $Exe -H $1 -p $CPort -s $ClientPwd -v UPTIME
  echo $3

For more information, take a look at Thomas Nilsen's website:

Elmar van Mourik
System- & Networkadministrator ZHEW

-----Oorspronkelijk bericht-----
Van: Sander Foppen [mailto:zjwoelle at hotmail.com]
Verzonden: dinsdag 28 januari 2003 17:15
Aan: 'Elmar van Mourik'; mrtg at list.ee.ethz.ch
Onderwerp: RE: [mrtg] memory on w2k server

This looks like a promising solution. I've installed the service, and
then I'm lost.

To monitor the CPU load, I need the following command:
./check_nt -H -p 1248 -v CPULOAD -l

Stupid question number 1: where do I execute this line?
Stupid question number 2: where is the collected data stored and in what

-----Original Message-----
From: Elmar van Mourik [mailto:e.vanmourik at zhew.nl] 
Sent: dinsdag 28 januari 2003 12:21
To: 'Sander Foppen'
Subject: RE: [mrtg] memory on w2k server

Hi Sander,

I'm using NSClient (http://nsclient.ready2run.nl/index.htm) on some
servers to collect data in MRTG.
It's very easy to use any performence monitor counter you like.

Elmar van Mourik
System- & Networkadministrator ZHEW

-----Oorspronkelijk bericht-----
Van: Sander Foppen [mailto:zjwoelle at hotmail.com]
Verzonden: dinsdag 28 januari 2003 10:57
Aan: mrtg at list.ee.ethz.ch
Onderwerp: [mrtg] memory on w2k server

I want to monitor the used and free memory on my w2k servers.

At this moment I'm using Win NT OID's 

But I don't get a value back for this OID. Does anyone know how to get
the memory?

  Sander Foppen

Door de electronische verzending van het bericht kunnen er geen rechten
ontleend worden aan de informatie. Als u deze e-mail onterecht heeft
ontvangen, waarschuwt u dan de afzender via postmaster at zhew.nl en verwijder
de gegevens van de computer. 

Zuiveringsschap Hollandse Eilanden en Waarden, Dordrecht 
tel: +31 (0)78 6397100 
fax: +31 (0)78 6311871 
web: http://www.zhew.nl

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list