[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 192.168.75.3 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 192.168.75.3 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:
#!/bin/sh
# 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.

Exe=/usr/local/bin/check_nt
ClientPwd=password
CPort=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
fi

# 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
fi


For more information, take a look at Thomas Nilsen's website:
http://home.broadpark.no/~tnilsen-1/Linux/Mrtg_and_Trend_Viruswall/mrtg_and_
trend_viruswall.html


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 192.168.1.1 -p 1248 -v CPULOAD -l
10,80,95,60,80,95,1440,80,95

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

-----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
win2k
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 
"1.3.6.1.4.1.311.1.1.3.1.1.7.1.0"

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

Gr,
  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