CaLStats documentation
Computer and Links Statistics
Basic information
First of all check out CaLStats homepage if there is newer version available:
http://www.mobilnews.cz/honza/en_prog_linux_calstats.php
Every site stat consist of three to five files. So our testing example will consist of those files:
test1.config - configuration file
test1.comp - list of computers
test1.link - list of links between computers (optional)
test1.legend - legend (optional)
test1.state - actual state of computers (generated by CaLStats)
You need to create .config and .comp files for every site stat. You can
place as many sites as you want into data directory. Then just run gen_stats and stats will
be gererated. If you want up to date stats, insert gen_stats into cron daemon (for example every
5-10 minutes).
Installation
These programs must be available in the system: awk, PHP (with GD library)
- unpack the archive
- move calstats directory to /usr/local (or somewhere you want to use it in)
- change path, directories and configuration in 'gen_stats'
- if you have fping installed change STATS_TYPE from 'ping' to 'fping' (www.fping.com) for faster stats generation
- if you have nmap installed change STATS_TYPE from 'ping' to 'nmap' (www.insecure.org/nmap/) for faster stats generation
- run 'gen_stats' to test the configuration
- edit 'data/*' files to match your configuration (sample files are included)
- add 'gen_stats' to cron if you want to generate statistics periodically
Packet latency information is supported only if you are using ping or fping.
*.config files
title;x_size;y_size;legend_location;border;background_color;
legend_location:
0 ... no legend
1 ... top left
2 ... top right
3 ... bottom left
4 ... bottom right
border:
0 ... off
1 ... on
You can leave background_color field blank if you want white background.
Example - test1.config
Test1;500;230;3;1;FFFFFF;
*.comp files
computer_name;ip_address;computer_importance(0-5);x_location;y_location;
You can add those characters before computer name:
! - IP address and packet latency information will not be showed
$ - IP address will not be showed
% - packet latency information will not be showed
If you assign IP address 127.0.0.1 to some computer, it will be showed as passive object
without any availability information.
You can add comments to data file by placing # in the beginning of the line.
Example - test1.comp
Server1;192.168.1.1;1;250;120;
%Server2;192.168.1.2;1;100;120;
$Router1;1.2.3.4;1;250;50;
!iGW;5.6.7.8;1;400;50;
Client1;192.168.1.10;0;250;190;
Client2;192.168.1.11;0;400;190;
Client3;192.168.1.12;0;400;120;
Storage;127.0.0.1;0;100;50;
*.link files
link_importance(0-5);source_ip;destination_ip;
link_importance(0-5);source_name;destination_name;
link_importance(0-5);source_ip;destination_name;
link_importance(0-5);source_name;destination_ip;
First number means color (if >10), second number means link importance.
COLOR 0,
COLOR 1,
COLOR 2,
COLOR 3,
COLOR 4,
COLOR 5,
COLOR 6,
COLOR 7,
COLOR 8,
COLOR 9
You can add comments to data file by placing # in the beginning of the line.
Example - test1.link
41;Storage;Server2;Server1;Router1;
0;Router1;iGW;
51;Router1;iGW;
40;Server1;Client1;
40;192.168.1.1;Client2;
40;Server1;Client3;
*.legend files
link_importance;link_importance_legend;
You can add comments to data file by placing # in the beginning of the line.
Example - test1.legend
1;WiFi Link;
51;Optic Link;
40;Ethernet 10mbit;
41;Ethernet 100mbit;
*.state files
ip_address;number_of_pings_received(if >0 => computer is green, otherwise red);latency;
Example - test1.state
192.168.1.1;1;1.10;
192.168.1.2;1;1.40;
1.2.3.4;1;1.40;
5.6.7.8;1;5.70;
192.168.1.10;1;2.30;
192.168.1.11;1;2.70;
192.168.1.12;0;0;
127.0.0.1;1;1;
(c)2003 by Jan Krupa.