Netscaler nslog commands

I have been using this forum when every i have had any questions about Netscalers and they do have a lot of very useful HOW-TO’s and debugging guides here so anyone who uses netscalers i would strongly recommend bookmarking this forum (http://www.netscalerkb.com).  Any way here is a copy of the commands.

If you want to: Uncompress an archived log file:

gunzip newnslog.21.gz
Discover the time period covered by the log:
nsconmsg -K newnslog.21 –d setime
View load-balancing statistics from the archived log:
nsconmsg -K newnslog.21 -s ConLb=2 -d oldconmsg
Extract logging information for a shorter duration:
nsconmsg -K newnslog.21 -s time=12Jan2006:00:00 -k short_log.nsl -T 1200 -d copy
Start the log process for newnslog:
nsconmsg -k /var/nslog/newnslog -T 172800 &
If you want to: View the time span of the current newnslog file:
nsconmsg -K newnslog -d setime
View the time span of the archived newnslog file:
zcat filename | nsconmsg -K pipe -d setime
View events in the current newnslog file:
nsconmsg -K newnslog -d event
View console messages in the current newnslog file:
nsconmsg -K newnslog -d consmsg
View counter values in the current newnslog file:
nsconmsg -K newnslog -d stats
View counter values in the current newnslog file:
nsconmsg -K newnslog -d stats –d current
View non-zero counter values in the current newnslog file:
nsconmsg -K newnslog -d statswt0 –d current
to display event information, such as entity up/down, alerts and configuration saves in the shell:
nsconmsg -K newnslog -d event
to display CPU usage in the shell:
nsconmsg -K newnslog -s totalcount=200 -g cpu_use -d current
to display memory utilization in the shell:
nsconmsg -s ConMEM=1 -d oldconmsg
to display established HTTP connections in the shell:
nsconmsg -j server_NSSVC_HTTP_vserver -d current
to display load balancing statistics in the shell:
nsconmsg -K newnslog –s ConLb=x –d oldconmsg
This command gives basic information when x=1 and detailed information when x=2.

use the following command to view traffic distribution from the shell.

nsconmsg -K /var/nslog/newnslog -s time -s ConLB=2 -2 distrconmsg
to display load-balancing information in the shell.
nsconmsg -s ConLb=1 -d oldconmsg
to display monitoring statistics in the shell.
nsconmsg -K newnslog –s ConMon=x –d oldconmsg
This command gives basic information when x=1 and gives detailed information when x=2.

if you want to: View SSL stats for front-end connections:

nsconmsg -K newnslog -s ConSSL=1 -d oldconmsg
View SSL stats for back-end connections:
nsconmsg -K newnslog -s ConSSL=2 -d oldconmsg
View SSL stats for front and back-end connections:
nsconmsg -K newnslog -s ConSSL=3 -d oldconmsg
to display content switching statistics in the shell.
nsconmsg -K newnslog –s ConCSW=1 -d oldconmsg
to display compression statistics in the shell.
nsconmsg -K newnslog –s ConCMP=x -d oldconmsg
This command gives old compression method related statistics when x=1 and gives new compression method related statistics when x=2

to display integrated caching statistics in the shell.

nsconmsg -K newnslog -s ConIC=1 -d oldconmsg
NOTE: Please  If you are going to link to this page please make sure that you linkback/trackback to the orginal forum i dont want to get any credit for someone elses  work http://www.netscalerkb.com/netscaler_tricks_and_guides/nsconmsg_examples-t622.0.html

Share