Eric, I just started using this, but it is measuring 5 items. Change "# eg. perl getlog-fixed.pl c:\perflogs\K6.csv "\\K6\LogicalDisk(C:)\% Disk Time" To "# eg. perl getlog.pl c:\perflogs\K6.csv"
Of course this assumes that you are measuring more then one item! Kenneth Falor, MCSA, MCP, A+ IT Operations -----Original Message----- From: Brander, Eric [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 04, 2003 2:43 PM To: [EMAIL PROTECTED] Subject: [mrtg] GetLog Modification I'm using Paul Simmonson's GetLog.pl Perl script to parse information from a Winblows Performance Monitor CSV file. I'd like to modify that perl, or a copy of that perl file actually, to be able to parse two items from a csv instead of just one. Unfortunately, I just don't have the time to do learn Perl right now. Has anyone made this modification already and are willing to share? Here is the original for reference: #start script # getlog.pl # # Author: Paul Simmonson # # Input: filename of Windows 2000 Performance monitor log file (must be CSV format) # Name of log item to extract c # 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"; #end script TIA! Eric Brander ACS Texas CHIP Account Sr. Communications Engineer - Information Systems Department 512.336.3331 Eric dot Brander at acs-inc dot com -- Unsubscribe mailto:[EMAIL PROTECTED] 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 -- Attached file removed by Ecartis and put at URL below -- -- Type: text/x-vcard -- Desc: Kenneth Falor.vcf -- Size: 519 bytes -- URL : http://www.ee.ethz.ch/~slist/pantomime/10-Kenneth%20Falor.vcf -- Unsubscribe mailto:[EMAIL PROTECTED] 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
