When the Junos default log files exceed usual size limits - log files, event the Junos default ones can be limited in size manually, by configuration of system syslog file archive section.
The Junos default log files can exceed size limits, the default settings for local syslog files are: file size 1MB/10MB depending on SRX platform & 10 archived files/In this example the log file is /var/log/nstraced.
This log file is configured by default and in some use cases can log extensive number of events.
In those cases all the log files, event the Junos default ones can be limited in size manually, by configuration of system syslog file:
set system syslog file nstraced archive size ? Possible completions: <size> Size of files to be archived (65536..1073741824 bytes) set system syslog file nstraced archive files ? Possible completions: <files> Number of files to be archived (1..1000)
Example:
set system syslog file nstraced archive size 64k set system syslog file nstraced archive files 3 ---(refreshed at 2024-02-09 14:17:51 EET)--- -rw-rw---- 1 root wheel 62894 Feb 9 14:17 /var/log/nstraced <<< almost 64KB size -rw-r--r-- 1 root wheel 835 Feb 9 09:31 /var/log/nstraced_chk_only total files: 2 ---(refreshed at 2024-02-09 14:18:01 EET)--- -rw-rw---- 1 root wheel 102 Feb 9 14:18 /var/log/nstraced -rw-rw---- 1 root wheel 66112 Feb 9 14:18 /var/log/nstraced.0 <<< file is renamed for rotation -rw-r--r-- 1 root wheel 835 Feb 9 09:31 /var/log/nstraced_chk_only total files: 3 ---(refreshed at 2024-02-09 14:18:11 EET)--- -rw-rw---- 1 root wheel 102 Feb 9 14:18 /var/log/nstraced -rw-rw---- 1 root wheel 1339 Feb 9 14:18 /var/log/nstraced.0.gz <<< file is archived -rw-r--r-- 1 root wheel 835 Feb 9 09:31 /var/log/nstraced_chk_only