Citrix ADC

如何释放 VAR 目录上的空间来记录 Citrix ADC 设备的问题

下面的文章介绍了管理员如何从 Citrix ADC 设备的 /var 目录中释放空间。当 Citrix GUI 无法访问时,您可以按照以下步骤操作。

当设备的 /var 目录中的磁盘空间量不足时,您可能无法登录 Citrix GUI。在这种情况下,您可以删除旧的日志文件以在 /var 目录中创建可用空间。

需要记住的几个要点

  • 请确保在从设备中删除文件之前备份文件。

要释放 Citrix ADC 设备 /var 目录中的空间,请完成以下步骤:

  1. 使用 SSH 登录 Citrix ADC 的 CLI。有关完成此任务的更多信息,请参阅 Citrix ADC 文档。
  2. 登录 Citrix ADC CLI 后,使用以下命令切换到 shell 提示符。 shell
  3. 运行以下命令以查看 Citrix ADC 设备上的空间可用性。 df -h
  4. 如果目 /var 录的内存容量已满 90%,则必须从此目录中删除几个文件。

    • 运行以下命令以查看 /var 目录的内容: cd /var ls -l

    通常感兴趣的目录如下:

    /var/nstrace - This directory contains trace files.This is the most common reason for HDD being filled on the Citrix ADC 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/log - This directory contains system specific log files.
    
    /var/nslog - This directory contains Citrix ADC 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.
    
    • 验证是否有任何目录使用了更多空间:

      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
      
  • 删除不需要的文件:

     rm -r nstrace/*
    

    For more help on deleting files see FreeBSD Man Pages.

    • Delete the files which are not required. rm -r nstrace/* For more help on deleting files see 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. 确保所有文件都被压缩。这由 .tar.gz 文件扩展名表示。
  2. 如果您使用的是 Citrix ADM 或 Command Center,请验证 /var/ns_system_backup 目录。确保 Citrix ADM 或 Command Center 清除它创建的备份文件。

更多资源

有关上述过程中提到的任何命令的信息,请参阅- http://ss64.com/bash/

如何释放 VAR 目录上的空间来记录 Citrix ADC 设备的问题