On Fri, May 18, 2018 at 05:42:42PM +0200, Reuti wrote: > Note: to read old accouting files in `qacct` on-the-fly you can use: > > $ qacct -o reuti -f <(zcat /usr/sge/default/common/accounting.1.gz) > If you specify the -f flag twice the later one takes precedence. You can therefore easily create a wrapper script that processes the current and last accounting files by default but otherwise acts like regular qacct. This means a bare qacct command won't show no history just after a logrotate.
#!/bin/bash exec ${SGE_ROOT}/bin/${SGE_ARCH}/qacct -f <(cat ${SGE_ROOT}/${SGE_CELL:-default}/accounting.1 ${SGE_ROOT}/${SGE_CELL:-default}/accounting) "$@" NB: If you are backing up the logfiles then you may find, depending on how smart your backup software is, that using the dateext option will save some strain on incremental/differential backups. If you do use dateext then finding the immediately previous accounting file will require a bit more smarts than the above. William
signature.asc
Description: PGP signature
_______________________________________________ users mailing list users@gridengine.org https://gridengine.org/mailman/listinfo/users