I am currently trying to trace the syslogs on Junos
I ran the "show log" command and the resulting messages I see don't contain that for the date I wish to check. I even ran the command "show log messages | match Jul"
I wish to get the log messages dating July 2015, but these are the available files.

-rw-rw-r--  1 root  wheel   525630 Apr  5 10:24 messages  
-rw-rw-r--  1 root  wheel   136795 Apr  2 16:35 messages.0.gz  
-rw-rw-r--  1 root  wheel   137106 Mar 23 19:41 messages.1.gz  
-rw-rw-r--  1 root  wheel   132270 Jan 10 08:58 messages.10.gz  
-rw-rw-r--  1 root  wheel   133097 Dec 28 12:48 messages.11.gz  
-rw-rw-r--  1 root  wheel   149600 Dec 15 11:29 messages.12.gz  
-rw-rw-r--  1 root  wheel   141467 Dec  3 00:54 messages.13.gz  
-rw-rw-r--  1 root  wheel   157455 Nov 15 09:49 messages.14.gz  
-rw-rw-r--  1 root  wheel   101622 Oct  9 15:41 messages.15.gz  
-rw-rw-r--  1 root  wheel    85758 Sep 26  2015 messages.16.gz  
-rw-rw-r--  1 root  wheel    79048 Sep 17  2015 messages.17.gz  
-rw-rw-r--  1 root  wheel    80556 Sep  7  2015 messages.18.gz  
-rw-rw-r--  1 root  wheel    92779 Aug 29  2015 messages.19.gz  
-rw-rw-r--  1 root  wheel   129535 Mar 14 16:25 messages.2.gz  
-rw-rw-r--  1 root  wheel   132642 Mar  3 11:23 messages.3.gz  
-rw-rw-r--  1 root  wheel   145808 Feb 23 06:48 messages.4.gz  
-rw-rw-r--  1 root  wheel   154648 Feb 16 07:00 messages.5.gz  
-rw-rw-r--  1 root  wheel   144492 Feb 16 06:09 messages.6.gz  
-rw-rw-r--  1 root  wheel   135718 Feb  9 10:15 messages.7.gz  
-rw-rw-r--  1 root  wheel   134724 Jan 30 03:59 messages.8.gz  
-rw-rw-r--  1 root  wheel   139855 Jan 19 15:46 messages.9.gz  

I wish to know if there is any possibility to get that for July 2015


If you don't see those logs there anymore, they've most likely been rotated to reduce disk space used, but it could be that messages.19.gz contains logs from July, it all depends on when that log was created. So you could use show log messages.19.gz to check that.

You can change the number of files stored on disk:

set file messages archive files 100

Make sure there's enough free space to store these logs. In most setups, only the most recent logs are stored locally on devices, and a centralized log system is used for storing logs for longer periods of time.

  • Thanks @TeunVink. Actually the logs were not still available. the proposed command was used to avoid future issues. Thanks once more – NTD Apr 7 '16 at 16:15

The buffer can only hold so much before it fills up and dumps the logs to replace them with newer versions. Depending on the RE version and the amount of RM/hard drive/flash drive size you can store different amounts with some tinkering.

What are you trying to determine by examining the logs if I might ask?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.