Author Topic: Nsconmsg examples  (Read 1896 times)

Offline Paul B

  • Hero Member
  • *****
  • Posts: 123
  • Karma: 14
Nsconmsg examples
« on: June 10, 2009, 06:03:50 AM »
The netscaler logs are binary (ie non-human readable) so you have to use the netscaler application "nsconmsg" to extract information. There are many options for the command, and about the only documentation I've ever seen is in the netscaler training course manual!

Many of the commands should only be entered on the day of the full moon, or by people who have scored in excess of 98% in the netscaler exam :-)

Let me cut & paste some examples....

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

Offline jmelika

  • Administrator
  • Hero Member
  • *****
  • Posts: 284
  • Karma: 4
Re: Nsconmsg examples
« Reply #1 on: June 10, 2009, 05:40:18 PM »
Thank you!