VAR logs full, showing less than 20% free

Check our disk space availability

ShellScript
df -h

You may be getting log messaged like the following in /var/log/ltm

ShellScript
alert alertd[8709]: 01100045:1: /var/log disk usage exceeds 90%. Reduce log disk space now

You can change the age at which log files become eligible for removal and reduces as necessary to free up disk space in /var/log/

List the current value of Logrotate.LogAge

ShellScript
tmsh list /sys db logrotate.logage value

In this command syntax, the legal values range from 0 to 100 days

Set new value. In this example, the default of 8 days will be set

ShellScript
tmsh modify /sys db logrotate.logage value 8
tmsh save sys config

You can also Change the number of archive copies that the system retains

tmsh list /sys log-rotate common-backlogs

ShellScript
tmsh list /sys log-rotate common-backlogs
sys log-rotate {
    common-backlogs 24
}

In this command syntax, the legal values range from 0 to 100 days

Change the message count for alert log check. The logcheck.msgcnt database variable controls message count for alertd logcheck.

When the number of messages logged through syslog reaches the value defined for the logcheck.msgcnt database key, the alertd process runs logrotate. When a system logs at high volume with high disk usage, logs rotate more frequently.

When the alertd process increments its counter to the value defined by the logcheck.msgcnt database variable, it forces log rotation, if the log file is larger than half of the free space or if /var/log/ is more than the value of the logcheck.alertthres database variable.

  • The default for logcheck.msgcnt is 1000.
  • The default for logcheck.alertthres is 90 percent.
  • The default for logcheck.warnthres is 80 percent.

Note: The bigd daemon debugging logs and some other logs do not go through syslog, so they do not affect the configuration for this counter.

You can modify the message count by performing the following procedure. Modify the number of messages the system counts before forcing log rotation by using the following command syntax:

ShellScript
tmsh modify /sys db logcheck.msgcnt value <value>
tmsh save sys config

Note: In this command syntax, note that <value> is the legal value range from 5 2147483647

Leave a Reply