UNSOLVED

razvan2

updated

20 years ago

R

razvan2

2 Intern

•

181 Posts

0

393

September 7th, 2006 01:00

Logs rotation

Is there any possibility to rotate the log without restart the NW services.
I don¿t want to destroy my UPTIME record
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    112

    0

    Posted September 7th, 2006 01:00

    I didn't try, but try to write rotation script with moving steps like:
    - 004 -> /dev/nul or whatever
    - 003 -> 004
    - 002 -> 003
    - 001 -> 002
    - log -> 001
    - touch log
    - kill -HUP $SYSLOG_PID

    As I said, this is top of my head so you will just need to test it...
  • techsup2

    34 Posts

    112

    0

    Posted September 7th, 2006 07:00

    hi,

    it depends actually on the os you are using. for solaris, or other *nix/*nux variants, you may use the logadm utility or the rotatelog utility to do an online rotation of your logs

    thanks