...
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.
parameter | description | default |
---|---|---|
-s , --src | The directory to search for download files. | /opt/azeti/SiteController/tmp |
-p , --pattern | Search pattern to identify the download files. | dl-*.zip |
-t , --target | Search pattern to identify the files to extract from the zipped download file | *_MDH3_*.txt |
-d , --dst | Destination directory to store the extracted files. | /home/azeti |
-k , --keep | The maximum number of extracted files to keep in the destination directory. All files, which filenames match the target search pattern are noted | 300 |
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:
|
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]
:
Code Block | ||||
---|---|---|---|---|
| ||||
...
[SiteController.conf]
...
ramdisk_size=0
... |