To display the statistics of compression ratio, run the following command from the command line interface of the appliance:
> stat cmp -detail
The following is a sample output of the preceding command:
HTTP Compression Statistics Rate (/s) Total HTTP compression requests 784 5878107571 Compressible bytes received 20429711 162854243323506 Compressible packets received 15444 122613145477 Compressed bytes transmitted 5349534 43803620464040 Compressed packets transmitted 4496 36433799738 HTTP compression ratio 3.7
In the sample statistics, notice that the compression ratio is 3:7. The following is the calculation to find the compression ratio:
(162854243323506 / 43803620464040) = 3.7
This infers that after compression, the NetScaler appliance sends the 27 percent, which is [(1/ratio)* 100] or (1/3.7) * 100, of the traffic that the appliance receives. For example, if the appliance receives 100 mbps traffic, then after compression it sends 27 mbps traffic.
This metrics is logged in the newnslog file. To display the compression statistics from the newnslog file, run the following command:
#nsconmsg –K <Newnslog_File_Name> -s ConCMP=1 –d oldconmsg
current time is Thu Feb 26 08:24:00 2009 HTTPTotl:HRes=10896089700 Hin=189523123798491 Hout=71813885350650 Hratio=2.64(38%) CMPTotal: Req=5807488556 Bin=161037468696072 Bout=43328230248231 ratio=3.72(27%) CMP Rate: Req=1039 In=201 Out=53 ratio=3.81(26%) CMPResps:CRes=7274 Cin=175746455 Cout=46071896 Cratio=3.81(26%) Response: Res=12800 Rin=210385359 Rout=80710800 Rratio=2.61(38%) CPU:16.1% MEM:467972740 UP:127.00:18:59 since:Wed Oct 22 08:05:01 2008
In the preceding output, the CMPTotal entry indicates the compression ratio and the traffic rate values.