convertxtodvd_logo

ConvertXtoDVD

VSO ConvertXtoDVD is considered to be one of the best Video converters. It combines high speeds, high quality and many options for your personalized DVD menus.

ConvertXtoDVD guide
Free Download ConvertXtoDVD

Linux Books

Of course the Internet along with the help of Google is a great source of information. You can answer almost any question you have about Linux and find many tutorials, guides and help. However many people prefer reading this information on a printed book accesssible even when they are not online or don't have a computer in front of them. I've received many e-mails asking me to propose them a few good books regarding Linux commands, administration and for specific distributions such as Ubuntu, Fedora etc. So, I've search for a few good books. Here they are. Happy reading!

Linux Books

Ubuntu guides

Ubuntu is a free Operating System based on Debian GNU/Linux. It has been rated as the most popular Linux distribution amongst Linux users according to Distrowatch. As it happens every six months a new version of Ubuntu has been released. Ubuntu 10.04 Lucid Lynx is here! Below you can find some helpful tutorials for old and new users!

Ubuntu 10.04 Lucid Lynx Post Installation Guide
Ubuntu 9.10 Karmic Koala Post Installation Guide
Ubuntu 9.04 Jaunty Jackalope Post Installation Guide
How to install Ubuntu Linux on Windows using VirtualBox

Fedora 12 Installation Guide

Fedora 12, codenamed Constantine, is released! Just for the info, Fedora is an RPM based Linux Distribution, an Operating system in other words, developed by the community supported Fedora Project and sponsored by Red Hat. Fedora contains only free and Open Source software. Some of Fedora's 12 new features are Gnome 2.28, KDE 4.3, better web cam support!, and many others.

Fedora 12 Installation and Post-Installation Guide
Fedora 11 Installation and Post-Installation Guide
Fedora 11 Installation and Post-Installation Guide in Chinese

1. Introduction

MRTG (Multi Router Traffic Grapher) is an application that allows us to observe the traffic of a network. It generates html pages with graphs which are refreshed according to our network’s current state. Its source is written in Perl and C which means that it can be installed in every Operating System we like. We will also need SNMP daemon (Simple Network Management Protocol) which gives us information for a network. The following installation was accomplished under Linux and specifically Fedora Core 6. With some little changes it can be used and under other distros.

2. SNMP server

2.1 Installation

Initially we install the packets needed for SNMP. Yum makes this job a lot easier.

Next we make snmpd service to start automatically for the runlevels we want.

# yum install net-snmp-utils net-snmp 

 

And we start the server.

# chkconfig --level 345 snmpd

 

 
We can see that it is running in port 199.

# service snmpd start

 

# netstat -natv | grep ':199'

tcp        0      0 127.0.0.1:199               0.0.0.0:*                   LISTEN 


2.2  Configuration


We run ‘snmpwalk’ which creates a “tree” of information for our network.


 
If you see an output like this one you may proceed with the MRTG installation. Else you should make some configuration first.

# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex  

 

ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1

ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.0.3 = 2


 
We keep a backup of snmpd.conf just in case anything goes wrong

 

# cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.original

 


We open it

# nano /etc/snmp/snmpd.conf

 

And do the follow changes:

  • we change this line

 

com2sec notConfigUser  default       public 

 

with those

com2sec local          localhost        public

com2sec mynetwork 10.0.0.0/8      public


where 10.0.0.0/8 we put what our network is
  • we change those lines
group   notConfigGroup v1           notConfigUser

group   notConfigGroup v2c          notConfigUser


with those

group   MyRWGroup      v1          local

group   MyRWGroup      v2c         local

group   MyRWGroup      usm       local

group   MyROGroup      v1          mynetwork

group   MyROGroup      v2c         mynetwork

group   MyROGroup      usm       mynetwork 

  • we change those lines
view    systemview    included   .1.3.6.1.2.1.1

view    systemview    included   .1.3.6.1.2.1.25.1.1 

with this one

 

view    all            included      .1              80 

 

  • we change this line

 

access  notConfigGroup ""      any       noauth    exact  systemview none none   

 

with those

access MyROGroup ""      any       noauth    exact  all    none   none

access MyRWGroup ""      any       noauth    exact  all    all    none  

  • and finally we change those lines
syslocation Unknown (edit /etc/snmp/snmpd.conf)

syscontact Root  (configure /etc/snmp/snmp.local.conf)


 
with something like this

syslocation Linux, Fedora Core 6

syscontact Root root@localhost  

 

2.3 Check

We restart the server to take affect of the notices

 

# service snmpd restart 

 


And we run again

 

# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex 

 

Now we should see something like that

IP-MIB::ipAdEntIfIndex.10.103.0.33 = INTEGER: 2

IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1

Where 10.103.0.33 is your ip address.

 

3. MRTG


3.1 Installation

We again use yum

 

# yum install mrtg

 

3.2 Configuration

We create the folder in which our graphs and html pages will be kept

 

# mkdir /var/www/html/mrtg/ 

 


And we run ‘cfgmaker’ for the configuration file to be created.

 

# cfgmaker --global "workdir: /var/wwwhtml/mrtg" -ifref=ip --output /etc/mrtg/mrtg.cfg --global 'options[_]: growright,bits' public@localhost 

 

Here you should pay notice to --output /etc/mrtg/mrtg.cfg as long as to public@localhost. With this command we tell MRTG to create a configuration file with the name ‘mrtg.cfg’ for the traffic of our computer (localhost). Instead of localhost you may put the address of any computer you may monitor as long as it runs SNMP.

Next we create our default index page

 

# indexmaker --output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg   

 


3.2.1 Apache configuration

Next we have to configure apache for MRTG to work correctly. MRTG creates a file ‘mrtg.cfg’ under /etc/httpd/conf.d we contains all the necessary for Apache. We change it to contain the ips we want to have access to our MRTG graphs. Here I have added all my network.

Alias /mrtg /var/www/mrtg

<Location /mrtg>
   Order deny,allow

   Deny from all

   Allow from 127.0.0.1 10.0.0.0/8

</Location>

3.3 Check

We run the following command 

In case you get an error like this

# mrtg /etc/mrtg/mrtg.cfg  

 

ERROR: Mrtg will most likely not work properly when the environment

      variable LANG is set to UTF-8. Please run mrtg in an environment

      where this is not the case. Try the following command to start:

       env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 

you have to run the above command more than once till it runs without any error. This is normal.

# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

23-02-2007 17:28:53, Rateup WARNING: /usr/bin/rateup Can't remove localhost_2.old updating log file

# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

#

Finally we open our browser and type

 

http://127.0.0.1/mrtg  

 


You should see something like this

mrtg1

And by clicking on it something like this

mrtg2

 

There are daily, weekly, monthly and yearly graphs which aren’t shown in the screenshot. By changing the .cfg file we can alter the information displayed to what we just want.

4. Outroduction

With the same way it is possible to add as many computers as we want and therefore have a general overview of our network. Enjoy! ;)



Add this page to your favorite Social Bookmarking websites

Trackback(0)

TrackBack URI for this entry

Comments (25)

Subscribe to this comment's feed
Error After the process was done
LANG = en_US.UTF-8
I am not abel to run MRTG

Error in Firefox "You don't have permission to access /mrtg/ on this server"

can u please help me out
Pennada Prabhu Kiran , March 29, 2007
...
Just in case, have you edited
axel , March 29, 2007
Allow from all
I followed these instructions - how can I allow for all to view these pages? I don't need to deny at all. Do I just simply state Allow all?
Joe , June 11, 2007
...
Hey Joe. Just use this mrtg.cfg and you should be ok.

Alias /mrtg /var/www/mrtg

Order allow,deny
Allow from all
axel , June 14, 2007
...
try with this

cfgmaker --global "workdir: /var/www/mrtg/html/mrtg" -ifref=ip --output /etc/mrtg/mrtg.cfg --global 'options[_]: growright,bits' public@localhost

smilies/cool.gif
beler , March 21, 2008
How to solve Error in Firefox "You don't have permission to access /mrtg/ on this server"
Hi,
I have also the problem in Fedora 8 "You don't have permission to access /mrtg/ on this server" I followed the comments.. nothing happens smilies/grin.gif
Then Just Change the line in ‘mrtg.cfg’ under /etc/httpd/conf.d as follows:


Alias /mrtg /var/www/mrtg

Order allow,deny
Allow from all


Then restart httpd and find all the graphs in Mozilla firefox smilies/kiss.gif
Md. Zafar Al Masood , September 10, 2008
One thing to rember
Change the word "location" replace with "Directory" in ‘mrtg.cfg’ under /etc/httpd/conf.d
Md. Zafar Al Masood , September 10, 2008
...
Hello Md. Zafar Al Massod. When I was writing this guide the mrtg.cfg worked for me. Can you try and use this mrtg.cfg

Alias /mrtg /var/www/mrtg

Order deny,allow
Deny from all
Allow from 127.0.0.1


and then open Firefox like this: http://127.0.0.1/mrtg ?
axel , September 10, 2008
How could I monitor bandwidth for different Machines in the network?
Could you help me how to configure more than two machine in the network mrtg?
Md. Zafar Al Masood , October 16, 2008
...
When using the cfgmaker you must choose different IPs and different .cfg names.

cfgmaker --global "workdir: /var/www/mrtg" -ifref=ip1 --output /etc/mrtg/mrtg1.cfg --global 'options[_]: growright,bits' public@localhost

cfgmaker --global "workdir: /var/www/mrtg" -ifref=ip2 --output /etc/mrtg/mrtg2.cfg --global 'options[_]: growright,bits' public@localhost

Then you could make a master.cfg which will include the above .cfg files to gather data from all the machines in your network.

Include: mrtg1.cfg
Include: mrtg2.cfg
axel , October 18, 2008
You don't have permission to access /mrtg/ on this server.
I have installed mrtg but it giving following error.
"Forbidden
You don't have permission to access /mrtg/ on this server."
I have tried all the solution suggested above. Can somebody help me to solve this
T. A. Sumesh , March 06, 2009
...
Hi T.A. Sumesh. Which distribution and mrtg version are you using?

This guide is a little old. I need to update it and check if anything has changed. :/
axel , March 07, 2009
How do I add more machines and more info
Hi,

How do I add more machines and more info; like system temperature, memory utilization etc to the mrtg? Any good tutorials or links with step by step appreciated.
Dev , July 07, 2009
...
Hi Dev,

You can use the cfgmaker command to add more computers. You must use a different output file instead of mrtg.cfg e.g. mrtg_pc2.cfg

I haven't used mrtg to monitor temperature so I can't help you with this.
axel , July 10, 2009
Great Work
Your work in this guide is fantastic, this guide fix my live....
Thanks
P.D. I'm speak espanish my ingles is bad... :-(
Roberto Lezcano , August 22, 2009
...
Thank you very much Roberto!
axel , August 31, 2009
error
Forbidden

You don't have permission to access /mrtg/ on this server.
Apache/2.2.11 (Fedora) Server at localhost Port 80
poswer , September 04, 2009
it not show fully
i gave http://localhost/mrtg could not show chart can you help me.

MRTG Index Page

MRTG Multi Router Traffic Grapher
version 2.16.2 Tobias Oetiker and Dave Rand

but http://10.0.0.0/mrtg and http://hostname/mrtg it show error page.

"You don't have permission to access /mrtg on this server.
Apache/2.2.11 (Fedora) Server at hostname Port 80

Forbidden

You don't have permission to access /mrtg/ on this server.
Apache/2.2.11 (Fedora) Server at 10.0.0.1 Port 80

help me.
thanks
poswer , September 04, 2009
...
hi,
at this time I had difficulty, after install mrtg on fedora 11 mrtg can
be run, the value of traffic is not showing the traffic chart does not
appear.
any one can show me the way..... thanks..
poswer , September 04, 2009
...

This instruction is nice. I create default mrtg graph its ok but
When I add new pc 0R device in mrtg graph they are not show...
Index page is show but no graph and inner page is not create

Please help me
FUAD , November 02, 2009
...
I'm sorry FUAD. It has been a few years since I last used mrtg. Therefore I don't know what you might have done wrong. I only remember that you have to make a different .cfg file for each computer you want to add. smilies/sad.gif
axel , November 03, 2009
And the problem is...
I know, I know... this is to old and everybody moved their life to another tool or solved the problem by themselves BUT... I am the one that reached this page too.

Sooo, to anyone having problems due to permissions, use the command below

cfgmaker --global "workdir: /var/www/html/mrtg" -ifref=ip --output /etc/mrtg/mrtg.cfg --global 'options[_]: growright,bits' community_name@localhost


Regards,smilies/smiley.gif
Tiago , April 19, 2010
...
Hi Tiago,

Thanks for the heads up. It seems the workdir has changed and the html pages should be in the /var/www/html/mrtg directory, right?

I will update the guide. smilies/smiley.gif
axel , April 20, 2010
IS there any way to monitor all computer internet usage
hi,

is there anyway to monitor all pcs in multiple network and their internet bandwidth usage ?
Anbarasu , June 04, 2010
...
Hi Anbarasu, I'm sorry but I don't know any software to do this. smilies/sad.gif
axel , June 04, 2010

Write comment

smaller | bigger
security image
Write the displayed characters

busy

Login Form

Follow me on...

  • Digg: axelgr
  • Facebook Page: 379363054400
  • FeedBurner: my-guidesnet
  • Twitter: myguidesnet
  • External Link: http://feedburner.google.com/fb/a/mailverify?uri=my-guidesnet

Member Login