Cycling system log - SGI

This is a discussion on Cycling system log - SGI ; Is there a manual command I can enter to cycle the system log rather than waiting every second week for cron to do it?...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Cycling system log

  1. Cycling system log

    Is there a manual command I can enter to cycle the system log rather
    than waiting every second week for cron to do it?


  2. Re: Cycling system log



    Spidy wrote:
    > Is there a manual command I can enter to cycle the system log rather
    > than waiting every second week for cron to do it?
    >


    I would crontab -l | more to list the command, (or vi
    /var/spool/cron/crontabs/root )... find the command that's
    cycling the syslog, put it in a shell script, and then run
    that script.

    --
    Greg Douglas
    http://www.reputable.com




  3. Re: Cycling system log

    Spidy wrote:
    > Is there a manual command I can enter to cycle the system log rather
    > than waiting every second week for cron to do it?


    crontab -l (that's an L) will show you how the system does it.

    Then just copy/paste at a prompt. Note that they put in some limits,
    like rotating only if it's larger than 10M (IIRC after not looking
    for about 2 years), so you might want to adjust their command
    slightly.

    Damian Menscher
    --
    -=#| Physics Grad Student & SysAdmin @ U Illinois Urbana-Champaign |#=-
    -=#| 488 LLP, 1110 W. Green St, Urbana, IL 61801 Ofc217)333-0038 |#=-
    -=#| 4602 Beckman, VMIL/MS, Imaging Technology Group217)244-3074 |#=-
    -=#| www.uiuc.edu/~menscher/ Fax217)333-9819 |#=-
    -=#| The above opinions are not necessarily those of my employers. |#=-

  4. Re: Cycling system log

    In article <40ce5e21_1@news.iprimus.com.au>,
    Spidy wrote:
    >Is there a manual command I can enter to cycle the system log rather
    >than waiting every second week for cron to do it?


    Why not just edit the crontab entry to cycle it more often?

    I used to use a little script for daily log files and such that needed
    to be kept relatively small, but where I wanted to keep the last several
    days files handy; it renamed files (if they existed) from $file.8 to
    $file.9, $file.7 to $file.8, etc., until $file.0 became $file.1, and
    the current file became $file.0 and a new file was started. Run it at
    whatever interval is appropriate, and you'll keep the last ten sets
    of files handy, while the active file doesn't get too large (improving
    performance).

    Run it via cron, pass the path/file as an argument, and stop worring
    about files growing forever.


    Gary

    --
    Gary Heston gheston@hiwaay.net

    Contrary to popular opinion, _not_ everyone loves Raymond.

  5. Re: Cycling system log

    Run it via cron? How would I run all of that via cron?

    Gary Heston wrote:
    > In article <40ce5e21_1@news.iprimus.com.au>,
    > Spidy wrote:
    >
    >>Is there a manual command I can enter to cycle the system log rather
    >>than waiting every second week for cron to do it?

    >
    >
    > Why not just edit the crontab entry to cycle it more often?
    >
    > I used to use a little script for daily log files and such that needed
    > to be kept relatively small, but where I wanted to keep the last several
    > days files handy; it renamed files (if they existed) from $file.8 to
    > $file.9, $file.7 to $file.8, etc., until $file.0 became $file.1, and
    > the current file became $file.0 and a new file was started. Run it at
    > whatever interval is appropriate, and you'll keep the last ten sets
    > of files handy, while the active file doesn't get too large (improving
    > performance).
    >
    > Run it via cron, pass the path/file as an argument, and stop worring
    > about files growing forever.
    >
    >
    > Gary
    >



  6. Re: Cycling system log

    In article <40d154e9_1@news.iprimus.com.au>,
    Spidy wrote:
    >Run it via cron? How would I run all of that via cron?

    [ ... ]

    Like I said--it was a script; the cron entry simply runs the
    script with the path/file as an argument.


    Gary

    --
    Gary Heston gheston@hiwaay.net

    Contrary to popular opinion, _not_ everyone loves Raymond.

  7. Re: Cycling system log

    k, thanks Gary.

    Gary Heston wrote:
    > In article <40d154e9_1@news.iprimus.com.au>,
    > Spidy wrote:
    >
    >>Run it via cron? How would I run all of that via cron?

    >
    > [ ... ]
    >
    > Like I said--it was a script; the cron entry simply runs the
    > script with the path/file as an argument.
    >
    >
    > Gary
    >



+ Reply to Thread