What is the correct way to clear old logs

Forum / General Discussions / What is the correct way to clear old logs

  • This topic has 3 replies, 2 voices, and was last updated 4 years ago by Gega.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30774
    jjgalvez
    Participant

    What is the correct way to clear old logs?

    Thanks in advance

    #30779
    Gega
    Participant

    Hello,

    To clear main log files you can simply run:

    nxserver –logrotate

    This will clean main log files, archive and save old logs under /usr/NX/var/log/logrotate/ directory.

    Saved files will be greatly reduced in size, but if you want you can delete them after logrotate

    procedure has finished.

    It’s also possible to set automatic log rotation https://www.nomachine.com/FR01L02806

    There are also session log files usually it  shouldn’t take large space, but if you want to clean them

    you can do it by:

    rm -rf /var/log/node/T-*

    rm -rf /var/log/node/F-*

    rm -rf /.nx/F-*

    rm -rf /.nx/T-*

    and in case you are using latest release:

    rm -rf /.nx/node/F-*

    rm -rf /.nx/node/T-*

    #30788
    jjgalvez
    Participant

    Thank you this is exactly what I needed!

    #30808
    Gega
    Participant

    Hello,

    Last reply didn’t show correct paths, here’s how it should be:
    There are also session log files usually it shouldn’t take large space, but if you want to clean them

    you can do it by:

    rm -rf 'NX installation directory'/var/log/node/T-*
    rm -rf 'NX installation directory'/var/log/node/F-*
    
    rm -rf 'User home directory'/.nx/F-*
    
    rm -rf 'User home directory'/.nx/T-*

    and in case you are using latest release:

    rm -rf 'User home directory'/.nx/node/F-*
    
    rm -rf 'User home directory'/.nx/node/T-*
Viewing 4 posts - 1 through 4 (of 4 total)

This topic was marked as solved, you can't post.