Install bmon as service

bmon is a useful network monitoring tool, the most useful feature is that bmon store historical data from las 60 seconds, minutes, hours and days, the “problem” is that bmon needs to be running all time.

If you have a network server with Linux as proxy, you will probably need to see the current bandwidth usage or see what happens 60 minutes ago.

We can use screen with a running bmon process to generate HTML result of current bandwidth usage, and we will see generated HTML pages from Apache.

Steps to install and configure

Pasos para instalar y ejecutar:

  1. Install bmon and screen:

    sudo apt-get install screen bmon
     
  2. Create the directory: (you can change this option)/var/www/bmon-html
  3. Create the file /etc/init/bmon.conf  with follow content:
    description "bmon bandwidth monitoring process"
    
    start on (local-filesystems and net-device-up and runlevel [2345])
    stop on runlevel [016]
    
    exec screen -d -m -S bmon bmon -O html:path=/var/www/bmon-html
  4. Start the new service:sudo service bmon start

     

  5. Then the web page  http://localhost/bmon-html/ will be availbale and updated constantly.

Enjoy!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Go back to top