Hi, can't monitor CPU under w2k :(

Hi, can't monitor CPU under w2k :(

Post by Julius Valentina » Tue, 11 Jun 2002 08:40:49



Hi, I'm a n00b to MRTG. However I installed snmp and configured it to
monitor my PPPOE ADSL connection :)
I'm using MRTG without RRD.

The problem is that I can't make it monitor my CPU load. I'm using w2k
professional and not a server version.

The cfg file I use:

WorkDir: c:\WEBSRV\mrtg2
#
# NT Processor Utilization
#

YLegend[localhost.processorLoad]: % Utilization
WithPeak[localhost.processorLoad]: ymw
XSize[localhost.processorLoad]: 300
Options[localhost.processorLoad]: growright, gauge
Target[localhost.processorLoad]:

MaxBytes[localhost.processorLoad]: 523444000
Title[localhost.processorLoad]: snmpboy.msft.net: NT Processor Load
ShortLegend[localhost.processorLoad]: %
Legend1[localhost.processorLoad]: Proc Load in next minute
Legend2[localhost.processorLoad]: Proc Load in next minute
Legend3[localhost.processorLoad]: Maximal 5 Minute Proc Load
Legend4[localhost.processorLoad]: Maximal 5 Minute Proc Load
LegendI[localhost.processorLoad]: ?Load:
LegendO[localhost.processorLoad]: ?Load:
PageTop[localhost.processorLoad]: <H1>Processor Utilization
        </H1>
        <TABLE>
                <TR><TD>System:</TD><TD>snmpboy.msft.net in Redmond</TD></TR>
                <TR><TD>Maintainer:</TD><TD>Otto Helweg</TD></TR>
                <TR><TD>Processor Load MIB:</TD><TD>.1.3.6.1.2.1.25.3.3.1.2.1</TD></TR>
        </TABLE>

And errors in log:

2002-06-09 17:37:09 -- Started mrtg
2002-06-09 17:37:19 -- SNMP Error:
no response received
SNMPv1_Session (remote host: "10.0.0.3" [10.0.0.3].161)
                  community: "<public>"
                 request ID: -734519511
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
2002-06-09 17:37:19 -- SNMPGET Problem for .1.3.6.1.2.1.25.2.3.1.6.2

2002-06-09 17:37:19 -- WARNING: skipping because at least the query for
.1.3.6.1.2.1.25.2.3.1.6.2 on  10.0.0.3 did not succeed
2002-06-09 17:37:19 -- ERROR: Target[localhost.storageused][_IN_] '
$$target[0]{$mode} ' did not eval into defined data
2002-06-09 17:37:19 -- ERROR: Target[localhost.storageused][_OUT_] '
$$target[0]{$mode} ' did not eval into defined data
2002-06-09 17:37:19 -- WARNING: Skipping Update of localhost.storageused,
inlast is not defined
2002-06-09 17:37:19 -- WARNING: Skipping Update of localhost.storageused,
outlast is not defined

I do not know what is wrong here. Can you help please.

 
 
 

Hi, can't monitor CPU under w2k :(

Post by alex » Mon, 24 Jun 2002 21:23:12


hi

cpu is realy problematic... see http://www.wn.com.au/psimmo/ and

i have changed the getlog.pl for a dualprocessor machine and for more
accuracy!!! let me say - the getlog.pl from his homepage is more than
inaccurate. he only collect the last performancemonitor entry and let the
last 5minutes stay along. if now proc is going for 4,75minutes to 100% and
15 sec later it is 0% and now mrtg is running it collects 0 %. if this going
over the whole day - this is absolutly inaccurate... in addition i have
changed the code for the possiblity to use a IN and OUT... now it works
since some hours *g*.

you cannot use the mkcfg.pl with my solution - or bedder to say you need to
change something after - by hand! this is only needed if you want to use 2
counters in one graph. the line need to be changed is:
Target[SERVER1]: `perl getlog.pl e:\perflogs\CPU.csv
"\\SERVER1\Processor(0)\Processortime (%)"
\\SERVER\Processor(1)\Processortime (%)`

if someone able to change the following code for running faster - let me
know - i'm not a perl freak... only basics :-).

# getlog.pl
#
# Author: Paul Simmonson, Alex
#
# 23.06.2002 IN and OUT possible
# 22.06.2002 get last X lines and calculate average data - for more
accuracy!
#  (5 minutes mrtg intervall * 60 sec / 15sec performancecounter intervall =
20 entries)
#
# Input: filename of Windows 2000 Performance monitor log file (must be CSV
format)
# Name of log item to extract
# eg.
# perl getlog.pl c:\perflogs\K6.csv "\\K6\LogicalDisk(C:)\% Disk Time"
# perl getlog.pl c:\perflogs\K6.csv "\\K6\LogicalDisk(C:)\% Disk Time"
"\\K6\LogicalDisk(D:)\% Disk Time"
#
# Output: mrtg data format
#

# get the last x lines from LogFile
$x=20;




# if less then x lines set to real lines -1
if ($lines-1 <= $x) {$x = $lines-1}

#find the entry that matches $ARGV[1]
$index=-1;

 $index++;
 $entry0=~ tr/"//d;
 chomp ($entry0);
 $last0=$entry0;
 last if $entry0 eq $ARGV[1];
 }

if ($last0 eq $ARGV[1]) {
 # work with the last x lines
 for ($i = 0; $i < $x; $i++) {


  $data0=~ tr/"//d;

  # calculate average
  $completedata0=sprintf(+$completedata0+$data0);
  }
     #average calculation
     $average0=sprintf($completedata0/$x);
     $average0=int($average0+0.5);
 }
else {
     $average0 = 0;
 }

#find the entry that matches $ARGV[2]
$index=-1;

 $index++;
 $entry1=~ tr/"//d;
 chomp ($entry1);
 $last1=$entry1;
 last if $entry1 eq $ARGV[2];
 }

if ($last1 eq $ARGV[2]) {
 # work with the last x lines
 for ($i = 0; $i < $x; $i++) {


  $data1=~ tr/"//d;

  # calculate average
  $completedata1=sprintf(+$completedata1+$data1);
  }
     #average calculation
     $average1=sprintf($completedata1/$x);
     $average1=int($average1+0.5);
 }
else {
     $average1 = 0;
 }

print "$average1\n";
print "$average0\n";
print "0\n";
print "0\n";

Alex

 
 
 

1. CPU monitor of W2K Server using MRTG

Hi All,
I need your valuable help. I would like t monitor CPU & memory
utilization of Windows2000 Server with MRTG. But when runing it gives
below error & not giving any SNMP data. Anywone have idea how to fix
it. I will be very thanksful.

SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.2.1.25.3.3.1.2)
SNMPv1_Session (remote host: "212.xx.xx.xx" [212.xx.xx.xx].161)
                  community: "abcdefgh"
                 request ID: -492271507
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
SNMPGET Problem for 1.3.6.1.2.1.25.3.3.1.2 1.3.6.1.2.1.25.3.3.1.2
sysUptime sysN

Use of uninitialized value in concatenation (.) or stringat
c:\mrtg-2.9.18pre9\bin\mrtg line 1580.
Use of uninitialized value in substitution (s///) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1659.
Use of uninitialized value in substitution (s///) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1659.
Use of uninitialized value in substitution (s///) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1660.
Use of uninitialized value in substitution (s///) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1660.
Use of uninitialized value in substitution (s///) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1661.
Use of uninitialized value in substitution (s///) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1661.
Use of uninitialized value in pattern match (m//) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1667.
Use of uninitialized value in concatenation (.) or string at
c:\mrtg-2.9.18pre9\
bin\mrtg line 1668.
WARNING: Expected a number but got ''
Use of uninitialized value in pattern match (m//) at
c:\mrtg-2.9.18pre9\bin\mrtg
 line 1667.
Use of uninitialized value in concatenation (.) or string at
c:\mrtg-2.9.18pre9\
bin\mrtg line 1668.
WARNING: Expected a number but got ''
WARNING: Skipping Update of datacpu, inlast is not defined
WARNING: Skipping Update of datacpu, outlast is not defined

Thanks & looking forward of your early reply.

Parvez

2. nupgrade.exe 3

3. do I need to use perfmib.dll with registry moddification to monitor CPU on w2k ?

4. Defect Report: Should be allowed to catch exceptions with ambiguous public base classes

5. Using Two CPU's On One Monitor

6. Rijndael and DES Problems

7. ### monitor router's cpu with MRTG

8. hosts / lmhosts

9. Cisco 75xx CPU Monitoring and VIP's..

10. Home network (W95/W2K Pro) problem - W95 can't see W2K boxes...

11. Alcatel revisionist PR document (someone's gonna get canned over this!)

12. Hi CPU Utilization

13. What is the diff btwn 'sho proc' and 'sho proc cpu'