How does it work? ------------------------- Core component is the "rrdtimer.pl" script which controls all subprocesses (modules). On startup, all modules that are configured in the settings variable "RUN" will be started. rrdtimer waits for their PID to be written into the module's PID-file and reads it on creation. All PIDs will be stored into a certain datastructure for later use. After starting and initializing all modules, rrdtimer will tell all modules to start their data-sampling (one-shot) and fall into an approximately 10-second sleep. rrdtimer uses signalling techniques to "communicate" with its sub-processes. The main process sends SIGUSR1 to the modules' read-data.pl scripts to tell them to start sampling. Why do we use signals? This signalling technique has the big advantage that the module can call a "sleep forever" when samlping is done, and it would automatically wake up when a signal arrives. To finally generate the diagrams, rrdtimer calls the main "diagrams.pl" script which will be running detached in the background to ensure no interference of the quite sensitive timebase. The diagrams script will be started with a nice-level of 10 to keep system load lowest possible while ensuring to get all diagrams created in time. It will call all configured (main settings -> SHOW) modules' "diagrams.pl" scripts which generate all graphics. If the "ImageMagick" package is installed, every CTIME hours the thumbnail images on the main page will be updated. They are just smaller versions of all configured (main settings -> SHOW) modules' weekly graphs. into the guts ------------------------- Each module contains a "read-data.pl" script which - when started - imports all vital functions from HotSaNICmod.pm in the "lib" directory and initializes itself. To do so, the common.pm will be imported from the platform directory which contains the configuration parser for all module-dependent settings. The script also imports one of the modules' OS-dependent libraries. These libraries each contain a "sample" function which takes care of the data-handling. This function also calls the makerrd script in case there's no database for the target already. WebSVN - hotsanic - Blame - Rev 9 - /branches/HotSaNIC-0.5.0-pre6/Documentation/how-does-it-work.txt
  jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [Documentation/] [how-does-it-work.txt] - Blame information for rev 9

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1