/* lsnet is a light weight computer resource/stats monitor. Copyright (C) 2009-2010 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 . */ This software is written for linux systems only. The gd library and the presence of the procfs are a requirment. libgd can be found here http://www.libgd.org/Main_Page Compile: ./autogen.sh && ./configure && make && make install Run the daemon: lsnetd -a Read This: After atleast 10 minutes run the image generation command lsgd, or just add the lscron.sh script to your crontab dir if root, or setup a cronjob for the user with webdir access rights. stats are then viewable at file:///home/soul/.lsnet/htdocs/index.html or http://youwebsite.com/lsnet if link is made, or WEBDIR is changed in config file to create a link to be web viewable: ln -s ~user/.lsnet/htdocs /var/www/htdocs/lsnet (as admin) lsnet logs install to ~/.lsnet by default if upgrading from a previous 0.3.* you have a few options: 1) cp/mv your old logs over (recommended) 2) use or use -c /path/to/old/config 3) cp just your lsnet.conf to ~/.lsnet/lsnet.conf config file installs to ~/.lsnet/lsnet.conf and webfiles to ~/.lsnet/htdocs by default if you use the same webfile folder from a previous installation rm the old index.html (lsnet won't overwrite files the exist) Explanation of lsnet.conf behavior: All these config options require a restart of the daemon to take effect! ### web dir location WEBDIR: /home/soul/.lsnet/htdocs <-- can be changed ### log dir location LOGDIR: /home/soul/.lsnet <-- can be changed WEBDIR is the location for the images and index.html LOGDIR is where all *.log files and *lock files are kept CPU POLLING: 30 <-- this will affect how many seconds the daemon is to wait between pollings MEM POLLING: 30 NET POLLING: 30 Must be divisable 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.