HowTo – (Pre upgrade) Cleanup


Before you start an upgrade. You must make sure to have enough free space available. Although in the GUI you see sometimes that you must have 5 GB available, in my experience you need at least 6,5 GB free space.

After a while using a NetScaler, certain folders can get full with files. Or you might had a problem and had to create a trace file. Some of these files and folders can be removed and with that action free up some space.

Although it’s possible to use the GUI to cleanup files, I prefer WinSCP to browse, backup and remove files. Within the GUI it’s not really possible to download (backup) the logfiles first before removing them.
I leave it up to you what method you like to use. If you are familiar with bash you could also use the command line to remove files and folders.

WinSCP

When using a tool to manipulate files on a NetScaler, my go-to tool is WinSCP. Free and easy to use. You can also just copy over the folder and it wil run without installation.

Launch WinSCP and connect to the NetScaler and login.

Next you can browse to the folder you want to cleanup and remove files or folders.

NOTE: Backup your (log) files before removing them from your NetScaler. It might be you need these (log) files for audit purposes!

Cleanup locations

The following paths can be investigated, to be cleaned (source Citrix).

PathDescription
/var/nstraceThis directory contains trace files. This is the most common reason for HDD being filled on the NetScaler appliance. 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/nslogThis directory contains NetScaler log files.
/var/logThis directory contains system specific log files.
/var/tmp/supportThis directory contains technical support files, also known as, support bundles. All files not of interest should be deleted.
/var/coreCore 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/crashCrash files, such as process crashes are stored in this directory. Clear all files unless the crashes are recent and investigation is required.
/var/nsinstallFirmware is placed in this directory when upgrading. Clear all files, except the firmware that is currently being used.
/var/nssynclogSynched (HA) config and logs.
/var/nsproflogPerformance related logs

Path: /var/nstrace

This folder can contain folders with trace files. You can delete all directories with content. 

Path: /var/nslog

Check for numbered files and or folders like “filename.0.gz” or “filename.0.tar.gz“, you can remove these files an folders.

Also check subdirectories for date or numbered folders, you can remove these.

Path: /var/log

Check for numbered files and or folders like “filename.0.gz” or files with dates in the name, you can remove these files an folders.

Path: /var/tmp/support

You can remove all “collector_callhome_….tar.gz” files.

Path: /var/core

You can remove the numbered folders (with content).

Path: /var/crash

You can remove all subdirectories in this location.

Path: /var/nsinstall

You can remove all files and folders except “adc.version“, “installns_state” and “installns_state_post_reboot“.

Path: /var/nssynclog

Check for numbered files and or folders like “filename.0” or files with dates in the name, you can remove these files an folders.

Path: /var/nsproflog

Check for numbered files and or folders like “filename.0.tar.gz” or “filename.0.gz” or files with dates in the name, you can remove these files an folders.

Source information: https://docs.netscaler.com/en-us/citrix-adc/13-1/system/troubleshooting-citrix-adc/how-to-free-space-on-var-directory.html