Switching

last person joined: 2 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  deleting log files

     
    Posted 10-01-2019 04:23

    Hi all,

    Some reasons the logs that the branch srx generated are needed to be deleted. Which Junos cli is it needed to perform and which log files? and how to verify?



  • 2.  RE: deleting log files

     
    Posted 10-01-2019 04:31

     

    try this:

     

    > file delete /var/log/test    <<< file name test being the sample file logs

     

    or from the shell:

     

    > start shell
    % su
    Password:
    re0:/var/home/labroot # rm -rf /var/log/<filename>

     

     

     

     

     



  • 3.  RE: deleting log files

     
    Posted 10-01-2019 04:33

    hi,

    Are you looking for storage cleanup ? 

    (SRX Series)

    request system storage cleanup
    <dry-run>
    <no-confirm>
    <re0 | re1 | routing-engine (backup | both | local | master | other)>

     

    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/request-system-storage-cleanup.html

     

    Thank you

    Prabin



  • 4.  RE: deleting log files

     
    Posted 10-01-2019 05:33

    storage cleanup? This is another thing!... When doing storage cleanup, is this deleting all log files that junos generated?

     

    Just imagine, you are selling your ex/srx devices to another company as second hand. Of course default/original configuration must be loaded before handover . I do understand this. No problem.

    But my question is how to make sure the logs or log files are deleted before handover? and how to double verify this?

     



  • 5.  RE: deleting log files

     
    Posted 10-01-2019 05:39

    In that case, I would suggest to perform a system zeroize & followed by factory-defaults

     

    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/request-system-zeroize.html

     

     

     



  • 6.  RE: deleting log files

     
    Posted 10-01-2019 05:54

    Hi,

     

    You can use "request system storage cleanup dry-run" this will list out the logs and the files which it will remove

    Then you can use "request system storage cleanup" to  clean them

    Again you can run the dry-run command to check if any logs and file left out 

    cleanup  command will not remove the configurations

     

    Another option would be to system zerioze, which will wipe out everything then you can apply the basic configuration 

     

    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/request-system-zeroize.html

     

    Method confirm if any log files are present would be check "file list /var/log" path where by default all the log files are stored

     

    thank you

    Prabin