HOWTO: Compile, configure and run MRTG

How do I configure this to also graph my load average at various times of the day?

Currently it is doing only:
Incoming Traffic in Bytes per Second
Outgoing Traffic in Bytes per Second
 
I've done this before w/o problems, but that was on redhat. I'm using CentOS now, and I get this when i try to run mrtg w/ the mrtg.sh file.

I get:
ERROR: Line 3 (INFO=`grep eth0 /proc/net/dev | tr -s ' ' ' ' | cut -d: -f2`) in CFG file (/mydirectoy/mrtg.sh) does not make sense


Any ideas?
 
post the output of

proc/net/dev

and I'll compare it with /proc/net/dev output from a working RHL 9 distribution and we'll figure out the differences.

Jeff
 
PHP:
 Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:   13205     148    0    0    0     0          0         0    13205     148    0    0    0     0       0          0
  eth0:23271904  479545    0    0    0     0          0         0 1033672704  703351    0    0    0   226       0          0



What's what it looks like
 
Re: Quick install for RH9

Hi Guys,

I have a fresh install of Fedora 2 and yesterdays update of DA. The only other apps I have installed are afp, bfd, mod_dosevasive and webmin.

Okay so far so good :)

I used the method below to install mrtg and it installed okay. But some of the stats are wrong :confused:
The config & system file I am using is from this archive that is in the tutorial below:- http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg.tar.gz

Here is a link to my mrtg on my server:-
http://sirius.xplic8.com/mrtg/

As an example:-
In the system file there is this block of code:-
Code:
if [ "$TYPE" = "swap" ]; then
    INDATA=`cat /proc/meminfo | grep "Swap:" | sed 's/ * / /g' | cut -d ' ' -f2`
    OUTDATA=`cat /proc/meminfo | grep "Swap:" | sed 's/ * / /g' | cut -d ' ' -f3`
fi
Now I am a noob but I think this is piping the output of cat /proc/meminfo where it finds the word Swap:. But if I type cat /proc/meminfo at the command line I get this:-
Code:
MemTotal:      1033928 kB
MemFree:         24420 kB
Buffers:         55640 kB
Cached:         765996 kB
SwapCached:      11144 kB
Active:         470176 kB
Inactive:       481332 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      1033928 kB
LowFree:         24420 kB
SwapTotal:     2048276 kB
SwapFree:      2021236 kB
Dirty:             196 kB
Writeback:           0 kB
Mapped:         142748 kB
Slab:            46216 kB
Committed_AS:   379580 kB
PageTables:       4432 kB
VmallocTotal:  3088376 kB
VmallocUsed:      4388 kB
VmallocChunk:  3082432 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     2048 kB

But there is not a line that starts with Swap:?

I also have this problem with the memory part and cpu use.
Are there any updated files that will provide stats like this tutorial but on a Fedora 2 system?

Many thanks for any help.

Regards
Stephen



interfasys said:
# cd /home/groovy

# wget http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg.tar.gz

# tar -zxvf mrtg.tar.gz

# cd mrtg*

# ./configure --with-gd=/usr/local/lib

# make

# make install

----------------

# cd /var/www/html/mrtg

# wget http://www.l0rdphi1.com/junk/mrtg.tgz

# tar -zxvf mrtg.tgz

# chmod 755 system

# /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/mrtg.cfg


This will give you the graphs of the rpm version, but with the latest MRTG.

The major change from the original howto is the added configuration switch.
:confused:
 
Last edited:
how do I delete mrtg 2.1.11 from my server?
I want to install a new version, but first I most delete the old one.

I have mrtg installed by help on this forum.
 
in my server it's working great :]

Code:
Max Questions:   	100.0 q/s  	 	Average Questions:   	62.0 q/s  	 	Current Questions:   	91.0 q/s
Max Cache hits:  	100.0 q/s 		Average Cache hits:  	50.0 q/s 		Current Cache hits:  	60.0 q/s
:)
 
hi, how can i update mrtg? I just add a new stick of 5412 MR ram, but when mrtg refreshing i still see 512 mb ram, not 1Gb help
 
That's either a lot of RAM or a typo :) .

Have you checked your RAM from the command line?

Run:

cat /proc/meminfo

Perhaps your system isn't recognizing the RAM.

If it is, then have you tried restarting MRTG?

Jeff
 
The current script maintainer has kinda not been here for about a month.
I've got a few new configs lined up for new versions (already pm'ed him about it more than a month ago or something).
If/when I get time, I'll set up a new howto with updated stuff on my wiki, if anyone is interested.

That MySQL monitor looks nice ;).
Furthermore I have scripts lined up for:
1. Exiscan
2. SpamBlocker
3. CPU temp (mbmon & sensors :))
4. Apache usage in hits/hour

However I need time to script an installation interface for it, as the sysadmin now has to do a few things and choose a few things.

If you guys are interested, I can try to make a script for it, but I can't say when it's done, got a lot to do here...
 
Back
Top