Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The prodos_log_processor.py script terminates after these steps (or the loop of these steps if there were more downloaded files).

Parameters of the log processor script

The log processor accepts different parameters, they all have a default value if not specified.

parameterdescriptiondefault
-s , --srcThe directory to search for download files./opt/azeti/SiteController/tmp
-p , --patternSearch pattern to identify the download files.dl-*.zip
-t , --targetSearch pattern to identify the files to extract from the zipped download file*_MDH3_*.txt
-d , --dstDestination directory to store the extracted files./home/azeti
-k , --keepThe maximum number of extracted files to keep in the destination directory. All files, which filenames match the target search pattern are noted300

Search pattern

The search pattern are in Unix shell style

*matches everything
?matches any single character
[seq]matches any character in seq
[!seq]matches any char not in seq

Configuration of the prodos log processor

The prodos_log_processor.py script requires the python environment of the SiteController. It is also designed to be launched as a job during the execution of a SiteController action. That's why it is configured within the SiteController.cfg in the section [remote_exec_calls]:

...

Info

All parameters in the example snippet above are at the default state, a configuration like this would have the same result:

Code Block
languagebash
[remote_exec_calls]
process_memodata=/opt/azeti/SiteController/src/prodos_log_processor.py


Debug information about the prodos log processor

Because the prodos_log_processor.py is started by the JobProcessor this can be observed in the log file of this module.

...

In the second block of the log the processor was launched without a download file.

The ram disk behavior of the temp directory

In practice a download of ~250KB data takes place approximately every minute and the download gets processed and deleted in less a second. To not strain the storage drive and to limit the usage of the storage drive in case of misconfiguration the standard temp directory of the SiteController, /opt/azeti/SiteController/tmp, is configured as a 'ram disk' with a maximum space of 256MB. On each SiteController start/stop/restart the temp directory and its content gets destroyed. To switch off this ram disk behavior the SiteController.cfg needs an entry in the section [SiteController.conf]:

...