I got it from website and script is as follows:
# getlog.pl
#
# Author: Paul Simmonson
#
# Input: filename of Windows 2000 Performance monitor log file (must be
CSV format)
# Name of log item to extract
# eg. perl getlog-fixed.pl c:\perflogs\K6.csv "\\K6\LogicalDisk(C:)\%
Disk Time"
# Output: mrtg data format
#
[EMAIL PROTECTED];
open STUFF or die "Cannot open $STUFF for read :$!";
@entries = <STUFF>;
@details=split /,/, @entries[0]; #get the first line of the log file
@lastline=split /,/, @entries[$#entries]; #get last line of log file
#find the entry that matches $ARGV[1]
$index=-1;
for $entry (@details) {
$index++;
$entry=~ tr/"//d;
chomp ($entry);
$last=$entry;
last if $entry eq $ARGV[1];
}
if ($last eq $ARGV[1]) {
[EMAIL PROTECTED];
$data=~ tr/"//d;
$data = int($data+0.5);
} else {
$data = 0;
}
print "0\n";
print "$data\n";
print "0\n";
print "0\n";
Can anybody help me??
Thanks
Praful
-----Original Message-----
From: Anson Rinesmith [mailto:[EMAIL PROTECTED]
Sent: Friday, July 22, 2005 8:56 PM
To: Prafull Auti; [EMAIL PROTECTED]
Subject: RE: [mrtg] Reversing the graph problem.
Who wrote the getlog.pl? The easiest way would be to just have the
script
reverse the order it returns values.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
Behalf Of Prafull Auti
Sent: Friday, July 22, 2005 10:14 AM
To: [EMAIL PROTECTED]
Subject: [mrtg] Reversing the graph problem.
Hi,
I am monitoring windows system by MRTG and I want to change the
representation of inbound outbound flow.
By going through the MRTG site, I found out that I have to just place
'-' sign before the target.
But by doing that no graphs are getting generated.
My target script is as follows
Target[praful-2]: `perl getlog.pl c:\perflogs\praful.csv
"\\VAIBHAV\PhysicalDisk(_Total)\Avg. Disk Bytes/Transfer"`
Please suggest a solution.
Thanks and regards
Prafull Auti,
Engineer Networks,
VSNL, Mumbai,
India
Disclaimer note on content of this message including enclosure(s) and
attachments(s): The contents of this e-mail are the privileged and
confidential material of VSNL. The information is solely intended for
the
individual/entity it is addressed to. If you are not the intended
recipient
of this message, please be aware that you are not authorized in any
which
way whatsoever to read, forward, print, retain, copy or disseminate this
message or any part of it. We apologize if you have received this
e-mail in
error and would request you to please notify the sender immediately by
return e-mail and delete it from your computer. The views expressed in
this
e-mail message are those of the individual sender, except where the
sender
expressly, and with authority, states them to be the views of VSNL. This
e-mail message including attachment(s), if any, is believed to be free
of
any virus and VSNL is not responsible for any loss or damage arising in
any
way from its use
--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
Disclaimer note on content of this message including enclosure(s) and
attachments(s): The contents of this e-mail are the privileged and confidential
material of VSNL. The information is solely intended for the individual/entity
it is addressed to. If you are not the intended recipient of this message,
please be aware that you are not authorized in any which way whatsoever to
read, forward, print, retain, copy or disseminate this message or any part of
it. We apologize if you have received this e-mail in error and would request
you to please notify the sender immediately by return e-mail and delete it from
your computer. The views expressed in this e-mail message are those of the
individual sender, except where the sender expressly, and with authority,
states them to be the views of VSNL. This e-mail message including
attachment(s), if any, is believed to be free of any virus and VSNL is not
responsible for any loss or damage arising in any way from its use
--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi