[mrtg] Re: problems with disk/cpu data collections
Daniel Curry
dcurry at dollar.com
Thu Nov 18 20:53:41 MET 1999
I am running mrtg on a Redhat 6.0 box. but running the getdisk.pl
script against a Digital 4.0d server.
-----Original Message-----
From: Stieers, Ken [mailto:KStieers at DainRauscher.com]
Sent: Thursday, November 18, 1999 1:48 PM
To: Daniel Curry; Stieers, Ken; 'mrtg'
Subject: RE: [mrtg] Re: problems with disk/cpu data collections
Daniel,
What OS are you running on?
Ken
****************************************
Ken Stieers
Lan Administrator
Dain Rauscher Information Services
(612)607-8924
> -----Original Message-----
> From: Daniel Curry [mailto:dcurry at dollar.com]
> Sent: Thursday, November 18, 1999 1:45 PM
> To: 'Stieers, Ken'; 'mrtg'
> Subject: RE: [mrtg] Re: problems with disk/cpu data collections
>
>
> Here is the output I get when I 'manually' run the script. It has
> nothing about uptime in the script and I am not sure what the
> <in data>
> string should be. this script came from the contrib directory.
>
> [dcurry at neon run]$ perl ./getdisk.pl viper 14
> 15
> [dcurry at neon run]$
>
>
> If I use the ` instead of ' I get this message mailed to root:
>
> Can't open perl script "./getdisk.pl": No such file or directory
> Could not get any data from external command 'perl
> ./getdisk.pl viper 1'
> Maybe the external command did not even start. (Illegal seek)
>
> Still working with it here, but any suggestions would be helpful.
>
>
> -----Original Message-----
> From: Stieers, Ken [mailto:KStieers at DainRauscher.com]
> Sent: Thursday, November 18, 1999 1:37 PM
> To: Daniel Curry
> Subject: RE: [mrtg] Re: problems with disk/cpu data collections
>
>
> First off does this script produce data in the following format?
>
> <in data>
> <out data>
> <uptime (any string)>
> <target name>
>
> So, if the disk was half full the output of your script should look
> something like this:
>
> 50
> 0
> a long time
> Server1 disk 1
>
> Make sure you are using the backtick (` under the tilde (~) on a US
> keyboard), not the single quote ('), in the Target line.
>
> Use gauge. You don't need a difference calculated, and you don't need
> the
> number divided by the polling interval.
>
> HTH,
>
> Ken
>
> ****************************************
> Ken Stieers
> Lan Administrator
> Dain Rauscher Information Services
> (612)607-8924
>
>
> > -----Original Message-----
> > From: Daniel Curry [mailto:dcurry at dollar.com]
> > Sent: Thursday, November 18, 1999 1:06 PM
> > To: 'mrtg'
> > Subject: [mrtg] Re: problems with disk/cpu data collections
> >
> >
> > Sorry about the length of this, but....
> >
> > Here is the information as previously requested. I have
> commented out
> > the 'gauge' lines since starting this thread.
> >
> > Target[viper.disk.1]: 'perl ./getdisk.pl viper 1'
> > Title[viper.disk.1]: Viper's Root Partition % used
> > MaxBytes[viper.disk.1]: 100
> > PageTop[viper.disk.1]: <H1> Disk Space Usage for System: Viper </H1>
> > Suppress[viper.disk.1]: y
> > LegendI[viper.disk.1]: % used
> > LegendO[viper.disk.1]:
> > Legend1[viper.disk.1]: % used
> > Legend2[viper.disk.1]:
> > YLegend[viper.disk.1]: percent used
> > ShortLegend[viper.disk.1]: used
> > #Options[viper.disk.1]: gauge
> >
> > **************************************************************
> > **********
> > *****
> > Here starts my script
> > **************************************************************
> > **********
> > *****
> > #!/usr/bin/perl
> > # This script is used to establish a TCP connection with a
> host to get
> > the
> > # disk info provided by showdisk.pl.
> > #
> > # use: ./getdisk.pl <hostname> <disk number>
> > #
> > # By Steven Micallef <smic at wire.net.au> on the 24/4/1999.
> >
> > use Net::Telnet ();
> > $hostname = $ARGV[0];
> > $disk_no = $ARGV[1];
> >
> > # If you've changed the port showdisk.pl runs on, change it
> here too.
> > $port = 9047;
> > $i = 0;
> >
> > if ($hostname eq "" || $disk_no eq "" )
> > {
> > print "Usage: $0 <hostname> <disk number>\n";
> > exit;
> > }
> >
> > $t = new Net::Telnet ( Host => $hostname, Port => $port);
> > $t->open("$hostname");
> >
> > do
> > {
> > $data = $t->getline(Timeout => 40);
> > $i++;
> > if ($i eq $disk_no)
> > {
> > print $data;
> > }
> > } while ($i != $disk_no);
> >
> >
> > Again, any help as to why these are not adding data to the
> .log files
> > would be greatly appreciated. Also, can anyone tell me how to put
> > multiple 'partitions' graphs on a single page? And have that page
> > updated by mrtg?
> >
> > TIA
> >
> > Daniel Curry
> >
> > --
> > * To unsubscribe from the mrtg mailing list, send a message with the
> > subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> > * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
> >
>
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list