[Dxspider-support] Help with script Please

Keith Le Boutillier gu6efb at cwgsy.net
Thu Dec 23 23:30:59 GMT 2004



Hi All

I now have MRTG working on windows which is displaying PC stats I am now
working on getting the information from the cluster

Help needed please I am not a programmer and have properly missed the
basics 

Can somebody please tell me where I need to make some changes to the
below script so that the file created is outputted into a different
directory other than the (print "Workdir:
\\mrtg\\logs\\$servername\n\n";)
I have changed the above line but it made no difference.

Thanks for your help




# mkcfg.pl
# Input: Windows 2000 Performance monitor log file (must be CSV format)
# Output: mrtg config file
#

$STUFF=@ARGV[0];
open STUFF or die "Cannot open $STUFF for read :$!";
@entries = <STUFF>;
#get first line of log file
@details=split /,/, @entries[0];
#extract servername
$servername = substr @details[1],3,(index @details[1],"\\",3)-3;
#print workdir entry
print "Workdir: \\mrtg\\logs\\$servername\n\n";
#get last line of log file
@lastline=split /,/, @entries[$#entries];
# get number of entries
$last=$#details; 
$index=0;
for $entry (@details) 

{ 

    if ($entry =~ /PDH-CSV 4.0/i)
        {
            next;
        }
    $index++;
    $entry=~ tr/"//d;
    chomp ($entry);
    print "Title[$servername-$index]:$entry\n";
    print "Pagetop[$servername-$index]: <H1>$entry</H1>\n";
    print "MaxBytes[$servername-$index]: 100\n";
    print "Options[$servername-$index]: gauge, nopercent\n";
    print "Target[$servername-$index]: `perl getlog.pl
c:\\perflogs\\$servername.csv \"$entry\"`\n";
    print "YLegend[$servername-$index]: Legend\n";
    print "ShortLegend[$servername-$index]:\n";
    print "LegendO[$servername-$index]:\n";
    print "LegendI[$servername-$index]:\n";
    print "Legend2[$servername-$index]:\n";
    print "Legend1[$servername-$index]:\n\n";
}

73 Keith GU6EFB MU3EFB

Sysop GB7DXG Dxcluster Telnet Access gb7dxg.shacknet.nu Port 7300
Web Site http://gb7dxg.shacknet.nu
Echolink Node GU6EFB-L Node number 121749
Web Site http://gu6efb.shacknet.nu
E-Mail gu6efb at cwgsy.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.4 - Release Date: 22/12/2004
 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 22/12/2004




More information about the Dxspider-support mailing list