/*
    lsnet is a light weight computer resource/stats monitor.
    Copyright (C) 2009  sterling pickens

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

This software is written for linux systems only.
http://www.boutell.com/gd/    the gd library and the presence of the procfs are a requirment

Compile:  
./autogen.sh && ./configure && make && make install
Run the daemons:
lsnetd -a

Make sure the user running the daemon has write permissions
to WEBDIR and LOGDIR locations.

After an hour or so run the 
image generation command lsgd, or just add the lscron.sh script
to your crontab dir. 

stats are then viewable at  http://localhost/lsnet
or http://youwebsite.com/lsnet

lsnet logs install to  /var/lib/lsnet by default (if upgrading from a previous 0.3.* you can cp your old logs over)
config file installs to /etc/lsnet.conf
and webfiles to /var/www/htdocs/lsnet by default

Explanation of behavior:


CPU POLLING: 30 <-- this will affect how many seconds the daemon is to wait between pollings
MEM POLLING: 30
NET POLLING: 30

Must be dividable into 60  ie: 60, 30, 20, 10 (no check implemented yet)
Each polling returns a result which is then used in an average/total candidate/cumulative total for a particular minute.
So 30 for CPU would poll the stats twice per minute and average the two (slightly more accurate than 60)
A lower number like 10 would poll 6 times per minute and becomes somewhat excessive.
30 or 60  is recommended.

cpu: each minute (1 pixel wide on chart) represents the weighted average(actual time that each polling takes affects it's "weight") 
     of the pollings over a given minute 

mem: each minute represents the highest occurance of total usage and it's accompanying values of all the pollings during 
     that particular minute

net: each minute represents the difference between total in/out between readings, changing the polling here is mostly moot.
     the only benefit of a lower number here would be for minutes that happen to have a device reset ocur (happens once is a while),
     you wouldn't be left with a completely blank value for that minute. 
