Linuxathome.net - Linux news and help for home broadband internet users
 Home | Files | Case Mods | Reviews | Forum | Search | Links | RDF | Contact | Uptime | Server Info | Tracker
Sections

Installation Guide
Setting Up
Internet Sharing
Port Forwarding
Services Config
Installing Programs
Game Servers
Using IPTables
Useful Commands
Kernel Upgrading
System Recovery
Red Hat 7.2 Setup
OpenBSD Setup
BPA Login Setup
PPPoE Setup
Add New Hardware
Using PPTP VPN
VMware ESX Cmds
Our RC5 Team
Folding@Home
Help Support Us

 
Articles
Linux Security
NetStats FAQ
Linux KIS Trojan
CAT5/LAN Cables
Domain Names
Presario RH Install APC Debian DVD
 
Slashdot.org
  • New Solar Plane Plans Non-Stop Flight Around The World
  • SSD Drives Vulnerable To Rowhammer-Like Attacks That Corrupt User Data
  • The Lawyer Who Founded Prenda Law Just Got Disbarred
  • IT Crash Causes British Airways To Cancel All Flights
  • Alpine Linux 3.6.0 Released
  • Reid Hoffman, Bill Gates, Others Ante Up Another $30 Million To Change.org the World
  • Wormable Code-Execution Bug Lurked In Samba For 7 Years
  • New Zealand Joins Space Race With Successful Launch Of Lightweight 'Electron' Rocket
  • Investigation Demanded Over Fake FCC Comments Submitted By Dead People
  • Accused of Underpaying Women, Google Says It's Too Expensive To Get Wage Data
  • A New Amiga Arrives On the Scene -- the A-EON Amiga X5000
  • Hackers Have Targeted Both the Trump Organization And Democrat Election Data
  • A Third of the Nation's Honeybee Colonies Died Last Year
  • UCF Research Could Bring 'Drastically' Higher Resolution To Your Phone and TV
  • 10 Years Later: FileZilla Adds Support For Master Password That Encrypts Your Logins
  •  
    Affiliates

    TweakTown.com
    ZGeek.com
    pebkac-consulting.com.au

     
    Webmail
      E-mail Address:

    Password:


     

      Third Party Programs

     

    For all of you out there that wish to enhance your server and play around with some pretty nifty program created by Linux Guru's and Enthusiasts, then this is the page for you. Here you will find instructions on how to setup many different "third party programs" that we have used and recommend.

    Some of these programs can be found in the 'Files' section of this site, others can be found by doing a simple search with your favourite search engine. (e.g. Google)

       

      Program List

     
     

      Program Instructions

     
    Bandwidth Utilization Bar (Ubar)

    If you have ever been to www.kernel.org (which most self respecting Linux person should) then you probably would have notice the bandwidth utilization bar they have, it tells how much bandwidth the server is currently using. You can actually download this program (its a simple one written in C) and put it on your own webserver.

    To download the ubar simply go to the following address: http://www.kernel.org/pub/software/web/bwbar/ and download the latest version (currently bwbar-1.2.tar.gz).

    All you need to install this program is extract the files from that tarball by typing tar xzvf bwbar-1.2.tar.gz, then cd bwbar-1.2/. Once your in the new directory then simply type make. Now you will have to set it up so that the program runs at startup, this can be done by editing your startup scripts and adding the following to it:

    # BwBar / Ubar
    echo "Starting Bandwidth Utilization Bar ...";
    cd /home/httpd/html/ubar
    ./bwbar -i -o -t 15 eth0 1.5 &

    Now all that is left to do is to setup your some modifications on your site to display this information, firstly create the ./ubar/ directory as in the above script (you may need to change this based on your html directory) and then copy the bwbar program to it by typing cp bwbar /home/httpd/html/ubar/. Once the file has been copied over edit the html file you wish to include the information and place the following lines of html code into it:

    <center>
    <font size="-1">
    <!--#include virtual="ubar/ubar.txt"-->
    </font>
    <br>
    <img src="ubar/ubar.png" alt="Bandwidth Utilization Bar" width=602 height=6 border=0>
    </center>

    Now with any luck you should have a nice bandwidth utilization bar display on your html page that updates every 15 seconds.

     

    Multi Router Traffic Grapher (MRTG)

    Since most people run a Linux box as a server, there tends to be alot of interest in collecting statistics and figures of the bandwidth that is used through the system, this is where data logging and graphing software becomes rather handy, namely MRTG (Multi Router Traffic Grapher).

    "The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links. MRTG generates HTML pages containing graphical images which provide a LIVE visual representation of this traffic. Check http://www.ee.ethz.ch/stats/mrtg/ for an example. MRTG is based on Perl and C and works under UNIX and Windows NT. MRTG is being successfully used on many sites around the net."

    In order to install MRTG successfully on your system, you will also need SNMPD (this is where MRTG collects its information from), you should download and install the latest version of SNMPD, for example here we used ucd-snmp-4.2.5-7.72.0.i386.rpm from www.rpmfind.net which is for a Red Hat 7.2 system (used for this installation). To install the latest rpm of SNMPD simply use the upgrade command of the rpm program, e.g. rpm -Uvh ucd-snmp-4.2.5-7.72.0.i386.rpm. Once you have installed SNMPD simply create the configuration file, /etc/snmp/snmpd.conf and make entries as follows (where <username> is the username you wish to use for access to SNMPD information):

    com2sec <username>-snmpd    default         <username>-snmpd
    
    
    group <username>-snmpd  v1         <username>-snmpd
    group <username>-snmpd  v2c        <username>-snmpd
    group <username>-snmpd  usm        <username>-snmpd
    
    view all    included  .1                               80
    
    access <username>-snmpd  ""      any       noauth    exact  all none  none

    After entering the above information save the file the next best thing is to add an entry to your firewall script to deny access to port 161 (the SNMPD port) from any IP Address that is external to your network, that is you only want to allow access by the server and your clients on the network (192.168.0.* machines for example). When you have safely blocked the port then it is time to start SNMPD by typing /usr/sbin/snmpd (or the appropriate location of the daemon on your system).

    Now that SNMPD is installed, configured and running it is time to move onto MRTG, you can download the latest source code from the MRTG home page (www.mrtg.org) or directly from the download page: http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/. Here we used mrtg-2.9.21.tar.gz from the MRTG site, once you have downloaded the latest file you must extract the source, tar -xzvf mrtg-2.9.21.tar.gz, then once your in the newly created directory (cd mrtg-2.9.21/) you must ./configure MRTG for your system. Once that is done you need to make and then make install (must be logged in as root for this).

    When MRTG has finished installing on your system all that is left to do is create a configuration file before you can run it, to create the default configuration is rather simple using the cfgmaker that is provided, simply enter the following (where <username> is the same as used in installing SNMPD and <machine> is either the IP Address or Hostname of the system):

       cfgmaker --global 'WorkDir: /var/www/html/mrtg'  \
                --global 'Options[_]: bits,growright' \
                --output /home/mrtg/cfg/mrtg.cfg    \
                 <username>-snmpd@<machine>

    If you wish to run MRTG as a daemon (this is advisable, as it will constantly generate information and statistics for you without being run each time), then you will need to edit the configuration file (home/mrtg/cfg/mrtg.cfg) and add RunAsDaemon: Yes to the line above WorkDir.

    It is now time to run MRTG (first time will possibly generate errors as no output files or data exists), /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg will start MRTG using the configuration file that you created, you may also like to generate an index file for the html, this is done by typing: /usr/bin/indexmaker --output=/var/www/html/mrtg/index.html /home/mrtg/cfg/mrtg.cfg.

    The only thing that is now left is to customise the look and feel of the output generated, this can be done by manually editing the configuration file, the best way would be to look on the Internet for samples and adapt them to your needs, once you are satisfied with the way MRTG works then you can leave it to do its job and you now have constant information that is up-to-date and easy to read in regards to your bandwidth etc.

    Proudly Hosted By:
    Hosted by PEBKAC Consulting

    Please read our Legal Notice for information concerning our site and its content.
    All logos and trademarks in this site are property of their respective owner. All the rest © 2000 - 2016 by Linuxathome.net

    Reviews

    D-Link DI-704P
    VIA EPIA-M 9000
    Tux Applique
    Ricoh MP5125A
    AMD XP 2600+
    3DProphet 9000Pro
    Radeon 9700 Pro
    XTNDAccess IrDA
    Netgear FS-524s
    DSR2161 KVM
    Game TheaterXP & XPS-510 Speakers
    3D Prophet 4000XT
    AutoView 400
    Back-UPS CS 350
    Dual Neon Kit
    SwitchView KVM
    20x4 LCD Kit
    Window Kit

     
    Kuro5hin.org
    XML error: Mismatched tag at line 26.
     
    Google (Linux)
    Enter Keywords:

     
    Bash Jokes

    % make ' ' bang ' ' with gun

    make: Fatal error: Don't know how to make target ` '

     
    Virtualization, Virtual Machine & Virtual Server Consolidation - VMware

    The Community ENTerprise Operating System

    Get Slackware Linux

    Use OpenOffice.org

    Use Asterisk