NetScaler ns.log Files not Compressed NSCALLHOME-252

NetScaler ns.log Files not Compressed NSCALLHOME-252

book

Article ID: CTX584252

calendar_today

Updated On:

Description

Issue : ns.log Files not Compressed
root@ns# cat /etc/newsyslog.conf | grep ns.log /var/log/ns.log 600 25 * $D00 Z

 

Resolution

Workaround:

Use a script to zip the ns.log files. And auto-execute by crontab:
  1. Add below line into /etc/crontab:
0 1 * * * root for i in `ls /var/log | grep ns.log. | grep -v gz`; do gzip $i; done
  1. Kill the current crond process:
root@ns# ps aux | grep cron
root 34780 0.0 0.1 7952 1064 ?? Is 11:36PM 0:00.27 /usr/sbin/cron
root@ns# kill -9 34780
  1. Restart crond:
root@ns# /usr/sbin/cron&
root@ns# ps aux | grep cron
root 22255 0.0 0.1 7952 1196 ?? Ss 4:34PM 0:00.00 /usr/sbin/cron
  1. The modification of crontab file will be loss when appliance is rebooted, so, we need to copy it and add rc.netscaler script to make the modification persistent:
root@ns# cp /etc/crontab /nsconfig/crontab
root@ns# cat /nsconfig/rc.netscaler //==> Add this file if it doesn’t exist.
rm -f /etc/crontab
ln -s /nsconfig/crontab /etc/crontab

Problem Cause

Configurations:

Callhome is enabled.

exec: show callhome
 
 CallHome: Enabled
 Registration with Citrix server successful

 

Cause:

The script ns_monuploadd_err.pl unzips ns.log.0.gz to check for a PE crash. It however does not zip it back after the check is done.

Preferred solution is to copy these files to a temporary directory, do the unzip and checks there and then delete this directory.

 

Even if CallHome is disabled, the script ns_monuploadd_err.pl also unzip the ns.log.X.gz to parse it. The issue is described in NSCALLHOME-252. As of now this issue is not yet fixed.