Description

Very rarely, the Junos system might go into a situation where it stops rotating the log files. 
This could lead to the consumption of all available space for the system, and the system may not work properly due to the shortage of storage space. 

Symptoms

The partition usage high alarm was raised on the device. 
Upon checking the device, the customer found that log rotation for the messages and interactive-commands files was not working, and those two files consumed almost the entire storage space. 
 

Solution

In Junos, the log rotation is done by the crontab, a periodic job handler used in Unix-like OS. 
A process "newsyslog" is responsible for rotating the logs and that process is called in every 15 minutes by the process "cron". 

Very rarely, the process cron might stop running without leaving any clues on why it exited. 
In that case, newsyslog won't be called, and log rotation won't happen. 
There will be no other functional impact. 

If you find a device hitting this state, you can recover the log rotation functionality by either rebooting the device or running the process cron manually by entering "cron start" in shell mode as a root. 

To reclaim the space, just delete the oversized log files. 

Modification History

2023-10-30 : Article Created