Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

[ldm-users] 20080410: How to rotate pqact.log

Hi Minaketan,

re:
> I like to rotate pqact.log everyday midnight. However pqact keeps open
> pqact.log file descriptor.
>
> pqact -l logs/pqact.log
>
> Any help is appreciated.

If you only want to keep two pqact.log log files on disk, a simple
approach is to do the following:

<as 'ldm'>
cd ~ldm/logs
cp pqact.log pqact.log.1
cp /dev/null > pqact.log

Of course, this can be instantiated into a script that is run out of
your crontab file.

Pretty heavy handed, but it should work fine.

Cheers,

Tom
--
+----------------------------------------------------------------------------+
* Tom Yoksas                                            UCAR Unidata Program *
* (303) 497-8642 (last resort)                                 P.O. Box 3000 *
* yoksas@xxxxxxxxxxxxxxxx                                  Boulder, CO 80307 *
* Unidata WWW Service                            http://www.unidata.ucar.edu/*
+----------------------------------------------------------------------------+


  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the ldm-users archives: