Clean Up Log Files

All log files are normally stored under the subdirectory ./vnc_logs. To remove all obsolete log files in the current working directory, use the nc clean command.

nc clean

This command cleans up obsolete log files and environment files that have been generated by jobs submitted to the scheduler.


nc: Usage Message

NC CLEAN:
    This command cleans up obsolete log files and environment files
    that have been generated by jobs submitted to the scheduler.
    By default the command cleans the current working directory
    (i.e. removes logs and environment files of the jobs executed in the
    current working directory).

    If a list of directories is provided, the command will clean up
    the files in those directories instead.

USAGE:
     % nc clean [OPTIONS] [LIST_OF_DIRS]

OPTIONS:
    -deep N     -- Clean the jobs from all directories in which the user
                   has executed jobs in the past N days. The directories
                   are found from the journals.
    -dir <dir>  -- Specify additional paths to check.
    -h          -- Help usage message.
    -nozap      -- Do not 'zap' isolated nodes. Allows the cleaning of the 
                   current directory to proceed faster.
    -P PERIOD   -- Install a periodic job to run the cleaning automatically.
    -R          -- Clean the directories recursively.
    -v          -- Increase verbosity.
    -zap        -- Do 'zap' of isolated nodes (see man vsz for more info).
    
EXAMPLES:
    % nc clean -h
    % nc clean
    % nc clean -dir /tools/logs/VNC_LOGS -dir /scratch/logs/VNC
    % nc clean .  /tools/logs/VNC_LOGS  /scratch/logs/VNC
    % nc clean -zap
    % nc clean -deep 10
    % nc clean -deep 3 -P 3d

Comments

Use the option -R (recursive) to also clean up the subdirectories.
% nc clean -R
From within scripts, it is recommended to use the option -nozap, which tells nc clean to skip the calling of the zapping utility vsz, which can be expensive in terms of time and load on the server.
% nc clean -nozap
If you do not remember the directories where you have run jobs, you can use the deep cleaning option -deep that automatically looks in the journals to find out all the directories in which jobs have been run. This option accepts an integer parameter that specifies the number of days to go back in the journals. The following example will go back 10 days:
% nc clean -deep 10
To have Accelerator automatically run nc clean every day, schedule a periodic job. For example, the following command schedules a cleanup once a day in the current directory:
% nc clean -P 1d