ONYX - 9.0 - KB - Nettoyage des fichiers du Spooler/en
Différence entre versions
(15 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 15 : | Ligne 15 : | ||
Windows: <code>E:\MappingWindows\Applications\map_cron.exe –date</code> | Windows: <code>E:\MappingWindows\Applications\map_cron.exe –date</code> | ||
− | *Deleting all the jobs ( | + | *Deleting all the jobs (no matter their status) with an expired retention time: |
Linux: <code>/apps/mapping/bin/map_cron –dateall</code> | Linux: <code>/apps/mapping/bin/map_cron –dateall</code> | ||
Ligne 50 : | Ligne 50 : | ||
map_cron -cleanspool -user:mapadmin -state:saved | 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 | 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 | 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 | 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 | map_cron -cleanspool -user:mapadmin -state:saved -entry -relative_date:10/0/0 -queue_name:mon_entry | ||
− | + | Note: | |
− | + | For them to be 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 <FONT color="blue"> map_cron </FONT> clears the files corresponding to ONYX Server logs. Options can be set to keep archives of the logs before they are deleted, to keep them as history. | |
− | * | + | *Creating an archive (ZIP) of the logs before deleting them: |
Linux: <code>/apps/mapping/bin/<FONT color="blue"> map_cron -cleanlog </FONT></code> | Linux: <code>/apps/mapping/bin/<FONT color="blue"> map_cron -cleanlog </FONT></code> | ||
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. | |
− | * | + | *Deleting logs without backup: |
Linux: <code>/apps/mapping/bin/<FONT color="blue">map_cron -cleanlog -delete</FONT></code> | Linux: <code>/apps/mapping/bin/<FONT color="blue">map_cron -cleanlog -delete</FONT></code> | ||
Ligne 90 : | Ligne 90 : | ||
Windows: <code>E:\MappingWindows\Applications\<FONT color="blue">map_cron.exe -cleanlog -delete</FONT></code> | Windows: <code>E:\MappingWindows\Applications\<FONT color="blue">map_cron.exe -cleanlog -delete</FONT></code> | ||
− | == | + | ==Clearing statistics== |
− | + | Following the same principle as previously, the files corresponding to statistics and ONYX Server usage reports can be cleared: | |
Linux: <code>/apps/mapping/bin/<FONT color="blue"> map_cron -cleanstats [ -delete ]</FONT></code> | Linux: <code>/apps/mapping/bin/<FONT color="blue"> map_cron -cleanstats [ -delete ]</FONT></code> | ||
Windows: <code>E:\MappingWindows\Applications\<FONT color="blue"> map_cron.exe -cleanstats [ -delete ]</FONT></code> | Windows: <code>E:\MappingWindows\Applications\<FONT color="blue"> map_cron.exe -cleanstats [ -delete ]</FONT></code> |
Version actuelle datée du 30 août 2019 à 13:21
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 (no matter their 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 be 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 them as 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.
- Deleting logs without backup:
Linux: /apps/mapping/bin/map_cron -cleanlog -delete
Windows: E:\MappingWindows\Applications\map_cron.exe -cleanlog -delete
Clearing statistics
Following the same principle as previously, the files corresponding to statistics and ONYX Server usage reports can be cleared:
Linux: /apps/mapping/bin/ map_cron -cleanstats [ -delete ]
Windows: E:\MappingWindows\Applications\ map_cron.exe -cleanstats [ -delete ]