Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


LinkBack Search this Thread
Old 10-02-2003, 01:02 AM   #1
LQ Newbie
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0

I've setup MRTG on RH9 and it's been working well to monitor the traffic usage on my router.

I want to set it up to monitor other things like CPU & disk space usage on the local machine. For some reason I can't get it to graph the output from a script.

To take my other scripts out of the equation I used a simple perl script to output 4 values for mrtg.

print "5\n";
print "4\n";
print "Uptime\n"
print "Server\n"

I then setup mrtg to us this script as the target:
Target[test]: `/etc/mrtg/scripts/test
MaxBytes[test]: 100
Title[test]: test
PageTop[test]: test

In the html page that mrtg creates, the "Uptime" & "Server" values are there but the other values are all zero.

Any help would be appreciated.

Last edited by Infynite; 10-02-2003 at 01:03 AM.
Old 10-02-2003, 01:14 AM   #2
Registered: Sep 2003
Location: Australia
Distribution: RedHat
Posts: 51

Rep: Reputation: 15
I think you need to set the "guage" option. By default MRTG is to meaure the increment between an ever increasing counter. In the context of a network interface this works as follows:

time0: 1000000 bytes
time(0+5): 1500000 bytes

MRTG takes the difference between the two (500000 bytes) and then says that there was 500000 bytes transferred in that 5 minute interval.

So in what you have done it is seeing:

time0: 5
time(0+5): 5

so it takes the difference between the two, which is ZERO.

read the doc at:

Old 10-02-2003, 01:40 AM   #3
LQ Newbie
Registered: Sep 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply, I have tried adding:

Options[test]: gauge

and I have tried changing the values in the script between running mrtg. I am still having no luck, the values are still zero.
Old 10-02-2003, 01:49 AM   #4
Registered: Sep 2003
Location: Australia
Distribution: RedHat
Posts: 51

Rep: Reputation: 15
suggest looking through some of the examples. Plenty of people have already done exactly what you are attempting.

I only use MRTG to monitor/graph network links (on routers), so unfortunately I can't really be any more help than this.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 07:29 PM
can I use mrtg for this? ziggie216 Linux - Software 1 04-14-2004 01:34 PM
What do I need for MRTG? ivanatora Linux - Software 3 02-28-2004 04:22 PM
mrtg jcb_dreamvsat Linux - Networking 2 11-02-2003 11:59 AM
mrtg cristi1979 Linux - Networking 0 06-24-2003 03:21 PM

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration