ONYX - 9.0 - KB - Nettoyage des fichiers du Spooler/en
Différence entre versions
(Page créée avec « *Creating an archive (ZIP) of the logs before deleting them: ») |
(Page créée avec « The archive is kept by default at the root of the Onyx Server logs folder (PATH_LOG variable of the configuration) and named according to the date/hour on which the comman... ») |
||
Ligne 82 : | Ligne 82 : | ||
Windows: <code>E:\MappingWindows\Applications\<FONT color="blue"> map_cron.exe -cleanlog </FONT></code> | Windows: <code>E:\MappingWindows\Applications\<FONT color="blue"> map_cron.exe -cleanlog </FONT></code> | ||
− | + | The archive is kept by default at the root of the Onyx Server logs folder (PATH_LOG variable of the configuration) and named according to the date/hour on which the command was run. | |
*Suppression des journaux sans sauvegarde : | *Suppression des journaux sans sauvegarde : |
Version du 27 août 2019 à 14:29
Sommaire
Introduction
ONYX Server normally creates and keeps a certain number of files which we advise you regularly clear: kept jobs, logs, statistics. This can be done using an ONYX Server command: map_cron
.
Clearing jobs
As per retention time
All the jobs in the Spooler have a specific attribute: the retention time (in days). The solution uses this attribute to clear the "expired" jobs in the Spooler, in other words, those with an exceeded retention time.
There are two ONYX Server commands which serve this purpose:
- Deleting all the jobs kept (which were processed and kept) with an expired retention time:
Linux: /apps/mapping/bin/map_cron –date
Windows: E:\MappingWindows\Applications\map_cron.exe –date
- Deleting all the jobs (whatever status) with an expired retention time:
Linux: /apps/mapping/bin/map_cron –dateall
Windows: E:\MappingWindows\Applications\map_cron.exe –dateall
As per clearing filters
One method to clear the Spooler of jobs consists in using filters to select the jobs to delete. Five filters are available:
- As per type of queue: input point ( -entry) or print queue ( -queue)
- As per date: absolute (jobs older than a given day, argument -before_date:JJ/MM/AAAA) or relative (jobs of more than N days ( -relative_date:d/m/y)
- As per owner user: argument -user:XXXX
- As per job status: argument -state:XXXX (ready, saved, held, error)
- As per queue name: argument -queue_name:XXXX
Here are some examples:
- To delete all the spooled files:
map_cron –cleanspool
- To delete spooled files owned by the mapadmin user:
map_cron -cleanspool -user:mapadmin
- To delete spooled files kept by the mapadmin user:
map_cron -cleanspool -user:mapadmin -state:saved
- To delete spooled files kept by the mapadmin user, in the input points:
map_cron -cleanspool -user:mapadmin -state:saved -entry
- To delete spooled files kept by the mapadmin user, in the input points, which have a date prior to the 19th of January 2018:
map_cron -cleanspool -user:mapadmin -state:saved -entry -before_date:19/01/2018
- To delete spooled files kept by the mapadmin user, in the input points, which are older than 10 days:
map_cron -cleanspool -user:mapadmin -state:saved -entry -relative_date:10/0/0
- To delete spooled files kept by the mapadmin user, which are older than 10 days, in the mon_entry input point:
map_cron -cleanspool -user:mapadmin -state:saved -entry -relative_date:10/0/0 -queue_name:mon_entry
Note:
For them to carried out be correctly, these clearing commands must be run as the ONYX Server Spooler is also running. Only the Spooler can interact with its jobs, the previous commands can only send deletion queries to the Spooler.
Clearing logs
The map_cron clears the files corresponding to ONYX Server logs. Options can be set to keep archives of the logs before they are deleted, to keep history.
- Creating an archive (ZIP) of the logs before deleting them:
Linux: /apps/mapping/bin/ map_cron -cleanlog
Windows: E:\MappingWindows\Applications\ map_cron.exe -cleanlog
The archive is kept by default at the root of the Onyx Server logs folder (PATH_LOG variable of the configuration) and named according to the date/hour on which the command was run.
- Suppression des journaux sans sauvegarde :
Linux: /apps/mapping/bin/map_cron -cleanlog -delete
Windows: E:\MappingWindows\Applications\map_cron.exe -cleanlog -delete
Clearing statistics
Sur le même principe que précédemment, les fichiers correspondants aux statistiques et rapports d’utilisation d'ONYX Server peuvent être nettoyés :
Linux: /apps/mapping/bin/ map_cron -cleanstats [ -delete ]
Windows: E:\MappingWindows\Applications\ map_cron.exe -cleanstats [ -delete ]