Forum Discussion

ERLomboy_27803's avatar
ERLomboy_27803
Icon for Nimbostratus rankNimbostratus
Feb 11, 2014

LTM log file

Suppose I copy the ltm file, Is it safe to delete the LTM log file? Will F5 create a new one?

 

7 Replies

  • it was not created in my gear after i deleted it until it got rotated (by logrotate). so, if you want to purge the log, i think it may be better to empty log.

    e.g.

    [root@ve11a:Active:In Sync] config  ls -l /var/log/ltm
    -rw------- 1 root root 1555 Feb 10 19:58 /var/log/ltm
    
    [root@ve11a:Active:In Sync] config  cat > /var/log/ltm
    [root@ve11a:Active:In Sync] config 
    
    [root@ve11a:Active:In Sync] config  ls -l /var/log/ltm
    -rw------- 1 root root 0 Feb 10 20:01 /var/log/ltm
    
    • ERLomboy_27803's avatar
      ERLomboy_27803
      Icon for Nimbostratus rankNimbostratus
      Please advise why is the ltm file keeps growing even after I removed the iRule from the Virtual Server and put a comment on the log?
  • e.g.

    [root@ve11a:Active:In Sync] config  ls -l /var/log/ltm
    ls: /var/log/ltm: No such file or directory
    
    [root@ve11a:Active:In Sync] config  logrotate -f /etc/logrotate.conf
    [root@ve11a:Active:In Sync] config 
    
    [root@ve11a:Active:In Sync] config  ls -l /var/log/ltm
    -rw------- 1 root root 0 Feb 10 20:19 /var/log/ltm
    
  • Hi, logrotate is used to archived files. You can manage your logs files by this utility. If you need you may execute it as you need by crontab or manualy. Configuation stores in /etc/logrotate.conf (be aware that on f5 devices you need to manage it through tmsh cli) :

        compress
        missingok
        notifempty
        weekly
        create
        rotate 10
        size 100M     
    

    means that logs will be rotated and archived (commpress)after one week of previous rotation. If log file will be more than 100M, it will be rotated of execution of logrotate. Files of logs will be 10. If you need help in this don't hesitate to ask, I will help with pleasure.