grafist 2.0.0 by Faruk Eskicioglu <farukesk@comu.edu.tr>
http://projects.comu.edu.tr/grafist
ftp://ftp.comu.edu.tr/pub/linux/prog/grafist/grafist-2.0.0.tar.gz
Grafist is a bandwidth utilization viewer. It gets the bandwidth utilization information for variable interfaces from the /proc/net/dev file in 15-second periods, and stores it in four data files (daily, weekly, monthly, and yearly). When a request is sent to index.php, it executes four programs to create graphics (using the GD library) and a summary for each file. Grafist provides localization support for 24 languages.
It is used at http://www.comu.edu.tr/grafist/
It is currently for Linux and Apache webserver only.
I- INSTALLING:
- run ./configure
configure options:
--enable-pathtowebserver=/path/to/web/server (there must be a directory named "cgi-bin" in "/path/to/web/server")
default: /var/www
--enable-docrootdir=docrootdir
default: html
--enable-imagesdir=imagesdir (the png files which will be created by index.php will be strored here)
default: grimages
--enable-interface=eth0 or eth1 or etc,
default: eth0
--enable-webuser=web_user (Name of the web user which is defined in httpd.conf file)
default: nobody
--enable-language=English, Turkish, Russian, German, Azeri, French, Italian, Portuguese, Spanish, Arabic, Greek, Brasilian, Czech, Dutch, Norwegian, Swedish, Icelandic, Danish, Finnish, Filipino, Hungarian, Polish, Slovenian, Chinese
default: English
--enable-adminmail=admin@foo.bar (mail address of the admin of the server)
default: admin@foo.bar
--enable-scale=100 (the scaling value for graphing)
default: 100
--enable-N=2 (N times bigger of a graph when its image receives a click event)
default: 2
--enable-method=fill, line (method property of graphing)
default: fill
You can also set some of these parameters by editing defs.inc.php after installation. (see defs.inc.php)
2. make
3. make install
II- RUNNING:
Run "grafist". This will wait the minute to be 0 in modula 5. The results may be seen at http://server_address/grafist/index.php. Also you can select the language at runtime like this "http://server_address/grafist/index.php?lang=LANGUAGE" where LANGUAGE is one of the languages that are supported by grafist. If you want it to start automaticly when the system start, you should add "grafist &" to /etc/rc.d/rc.local
III- DESCRIPTIONS of FILES in "/path/to/web/server/cgi-bin/grafist":
-data Directory:
-baslama (=start):
Stores the starting date and time of grafist in ASCII format.
-xsayac:
These files store the number of updates in binary format on the corresponding *.dat file where x can be gunluk, haftalik, aylik,
yillik. The values in gunluksayac, haftaliksayac and ayliksayac are set to 0 on every end of days. These files are needed by "create" and can be read with "sayacoku".
-x.dat:
These files store the bandwidth usage information for output in binary format. Each of these files stores 395 floating point numbers.
where x can be;
-gunluk (=daily): The last value in the array stored in this file reflects the bandwidth usage information for the preceeding five minutes.
-haftalik (=weekly): The last value in the array stored in this file reflects the bandwidth usage information for the preceeding thirty minutes.
-aylik (=monthly): The last value in the array stored in this file reflects the bandwidth usage information for the preceeding two hours.
-yillik (=yearly): The last value in the array stored in this file reflects the bandwidth usage information for the preceeding day.
These files can be read with "oku".
-x2.dat:
These files are the same as above with exception of input rather than output.
-xrep:
These files are created by sunx where x can be gunluk, haftalik, aylik, yillik and each of these reflects a summary for corresponing *.dat file.
-xrep2:
These files are the same as above with exception of input rather than output.
-bin Directory:
- grafist
Performs the necessary procedures to start grafist. These procedures are creating data files and running uretec and uretec2.
- create
This is executed by grafist, creates and initializes the data files (*.dat file in data directory). If a previous execution of grafist which terminated because of any reason, exists, reads old data files and moves the necessary informations to new data files. (never run) oku (=read):
Takes a name of a data file (*.dat file in data directory) as an argument from command line and prints the bandwidth utilization values stored in the data file to the stdandart output. (Actually this is for debugging) sayacoku (=readcounter):
Takes a name of a counter file (xsayac file in data directory where x can be gunluk, haftalik, aylik, yillik) as an argument from commandline and prints the number of updates on the corresponding *.dat file. (Actually this is for debugging) sunx (=present x where x can be gunluk, haftalik, aylik, yillik):
This is executed by index.php, creates the x.png file which reflects the datas on corresponding *.dat file. (you dont need to run) uretec (=generator) and uretec2:
uretec reads /proc/net/dev to get the bandwidth usage information for output in 15-second periods and stores these informations in *.dat files. uretec2 does the same things with the exceptions of the names of the data files (*2.dat rather than *.dat ) and input rather than output.
IV- TRANSLATING:
. Translate default.h and default.inc to Your_language.h and Your_language.inc. default.* files contains commented and uncommented lines for each variables. Write the statements which correspond with the commented line to uncommented lines. . Send Your_Language.h and Your_language.inc to farukesk@comu.edu.tr
V- TRANSLATIONS:
-RUSSIAN :Anton Lykov <last@mv.ru>
-GERMAN :Harry Auschner <hqa@gmx.net>
-AZERI :Mehmet Ali SALAHLI <msalahli@comu.edu.tr>
-FRENCH :S�astien RAYNAUD <sray@isostorm.com> .
-ITALIAN :Loris <loris@icenet.it>
-ARABIC :Mesut YAZICI <mesutyazici@comu.edu.tr>
-GREEK :Stergios Nastopoulos <sterna@ioa.forthnet.gr>
-BRASILIAN :Joao Carlos Martins <joao.martins@attla.com>
-CZECH :Radek Hanus <smurf@volny.cz>
-DUTCH :Maarten Akerboom <maarten.akerboom@planet.nl>
-POLISH :Tomasz Wolbach <cybergate@thelema.eu.org>
-CHINESE :Chencanhui <cchandyou@163.net>
-PORTUGUESE, SPANISH, NORWEGIAN, SWDEDISH, ICELANDIC, DANISH, FINNISH, FILIPINO, HUNGARIAN, SLOVENIAN : Automated translations
Any suggestions and/or comments: farukesk@comu.edu.tr
