ONYX - 9.0 - KB

Clearing Spooler files

De MappingDoc
Cette page est une version traduite de la page ONYX:9.0:KB:Nettoyage des fichiers du Spooler et la traduction est complétée à 100 %.

Autres langues :
English • ‎français

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 ]