jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [Documentation/] [module-howto/] [howto-read-data.pl] - Rev 21 Go to most recent revision

Compare with Previous - Blame - Download


The script "read-data.pl" is quite small. It just imports the HotSaNICmod.pm library and calls its init function.
Everything else happens then in HotSaNICmod::init.

---------- BEGIN CODE ----------
#!/usr/bin/env perl
use warnings;
use diagnostics;

$|=1;

use lib "../../lib";
use HotSaNICmod;

HotSaNICmod::init(@ARGV);
---------- END CODE ----------


The init() function will now import the module's "common.pm" library, parse the settings file and check the commandline arguments that have been passed to the script and act accordingly.
Currently the following parameters are accepted:

argument   function
---------  --------------------------------------------------
start      start module daemon
stop       terminate module daemon
status     show status of module daemon
configure  running daemon will re-read its config file 
sample     running daemon will sample instantly
update     not implemented yet
             (the idea is to save time by doing bulk updates shortly before
             diagram generation instead of updating the DBs every 10 seconds)
version    show version of OS-dependant module used
showargs   show settings hash


Powered by WebSVN 2.2.1