Product Documentation

How to free space on /var directory for logging issues with a Citrix ADC appliance

This troubleshooting article explains how an administrator can free space from the /var directory of a Citrix ADC appliance when you are unable to log on to the Citrix GUI.

When the amount of disk space is low in /var directory of the appliance, you might not be able to sign in to the Citrix GUI. In this scenario, you can remove the old log files to create free space in /var directory.

Points to remember

  • Ensure that you back up the files before removing the files from the appliance.

To free space in the /var directory of a NetScaler appliance, complete the following procedure:

  1. Log on to the Command Line Interface (CLI) of NetScaler by using SSH. For more information to complete this task, refer to Citrix ADC Documentation.
  2. After you log on to NetScaler CLI, switch to the shell prompt using the following command.
  3. Run the following command to see the availability of space on NetScaler appliance.
  4. If the capacity of the /var directory is less than 90 percent or very low, then you must delete few files from this directory.

    • Run the following commands to view the contents of the /var directory: cd /var ls -l

    The directories that are usually of interest are as follows:

    /var/nstrace - This directory contains trace files.This is the most common reason for HDD being filled on the NetScaler. This is due to an nstrace being left running for indefinite amount of time. All traces that are not of interest can and should be deleted. To stop an nstrace, go back to the CLI and issue stop nstrace command.
    
    /var/log - This directory contains system specific log files.
    
    /var/nslog - This directory contains NetScaler log files.
    
    /var/tmp/support - This directory contains technical support files, also known as, support bundles. All files not of interest should be deleted.
    
    /var/core - Core dumps are stored in this directory. There will be directories within this directory and they will be labeled with numbers starting with 1. These files can be quite large in size. Clear all files unless the core dumps are recent and investigation is required.
    
    /var/crash - Crash files, such as process crashes are stored in this directory. Clear all files unless the crashes are recent and investigation is required.
    
    /var/nsinstall -  Firmware is placed in this directory when upgrading. Clear all files, except the firmware that is currently being used.
    
    • Verify if any of the directories are using more space:

    du -hs * 44k cache 2.0k clusterd 2.0k configdb 6.0k core 989M crash 4.0k cron 2.0k dev 6.0k download 2.0k gui 2.0k install 2.0k krb 2.0k learnt_data 122M log 366M netscaler 14k ns_gui 86k ns_sys_backup 631M nsinstall 883M nslog 32k nsproflog 2.0k nssynclog 16k nstemplates 36k nstmp 4.5G nstrace 8.1M opt 6.0k pubkey 52k run 28M safenet 72M tmp 2.0k vmtools 14k vpn

  • Delete the files which are not required:

     rm -r nstrace/*
    

    For more help on deleting files refer to FreeBSD Man Pages.

    • If the log or nslog directory is using more space, then run the following commands to open the log directory and view its contents:
    • Delete the files which are not required. rm -r nstrace/* For more help on deleting files refer to FreeBSD Man Pages.
    • If the log or nslog directory is using more space, then run the following commands to open the log directory and view its contents:
    cd /var/log
    ls -l
    cd /var/nslog
    ls -l
  1. Ensure that all files are compressed. This is indicated by the .tar.gz file extension.
  2. If you are using NetScaler MAS or Command Center, then verify the /var/ns_system_backup directory. Ensure that NetScaler MAS or Command Center clears the backup files it creates.

Additional Resources

For information on any of the commands mentioned in the preceding procedure, refer to - http://ss64.com/bash/

How to free space on /var directory for logging issues with a Citrix ADC appliance