Ascend Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(ASCEND) Re: ascend-users-digest V96 #770




I wrote a very lame-brain simple script to show number of connects at 
various speeds..


If someone wanted to write a more elegant one I'd be interested in getting a
copy.

Thanks.


sample output:

dav-max-3.mother.com/detail.19970818.gz / 3349

Speed  Percent
=====  =======
64000: 15%
56000: 1%
54000: 0%
52000: 0%
50000: 0%
48000: 0%
46000: 0%
44000: 0%
42000: 0%
40000: 0%
38000: 0%
36000: 0%
34000: 0%
32000: 0%
33600: 16%
31200: 10%
28800: 18%
26400: 9%
24000: 2%
21600: 0%
19200: 2%
16800: 2%
14400: 15%
12000: 0%
 9600: 0%
 4800: 0%
 2400: 0%
 1200: 0%
  300: 0%
    0: 4%


Script:

--------- cut here -------
#! /bin/sh
#
### rad: Simple connect rate processor for RADIUS detial files    ###
### Written by Zachariah Johnson <zjohnson@mother.com>            ###
### Usage: rad [filename]                                         ###
### Note: It is assumed that file is a gziped RADIUS detail file. ###
#
#set -x
#if test -z $1 ; then TARGET=$USER
#else TARGET=$1
#fi
zcat $1 | grep "Rate" > tf
CALLS=`grep -c "Rate" tf`

echo $1 / $CALLS
echo ""
echo "Speed  Percent"
echo "=====  ======="
N640=`grep Rate tf | grep -c "= 64000$"`
N560=`grep Rate tf | grep -c "= 56000$"`
N540=`grep Rate tf | grep -c "= 5400$"`
N520=`grep Rate tf | grep -c "= 5200$"`
N500=`grep Rate tf | grep -c "= 50000$"`
N480=`grep Rate tf | grep -c "= 48000$"`
N460=`grep Rate tf | grep -c "= 46000$"`
N440=`grep Rate tf | grep -c "= 44000$"`
N420=`grep Rate tf | grep -c "= 42000$"`
N400=`grep Rate tf | grep -c "= 40000$"`
N380=`grep Rate tf | grep -c "= 38000$"`
N360=`grep Rate tf | grep -c "= 36000$"`
N340=`grep Rate tf | grep -c "= 34000$"`
N320=`grep Rate tf | grep -c "= 32000$"`
N336=`grep Rate tf | grep -c "= 33600$"`
N312=`grep Rate tf | grep -c "= 31200$"`
N288=`grep Rate tf | grep -c "= 28800$"`
N264=`grep Rate tf | grep -c "= 26400$"`
N240=`grep Rate tf | grep -c "= 24000$"`
N216=`grep Rate tf | grep -c "= 21600$"`
N192=`grep Rate tf | grep -c "= 19200$"`
N168=`grep Rate tf | grep -c "= 16800$"`
N144=`grep Rate tf | grep -c "= 14400$"`
N120=`grep Rate tf | grep -c "= 12000$"`
N96=`grep Rate tf | grep -c "= 9600$"`
N48=`grep Rate tf | grep -c "= 4800$"`
N24=`grep Rate tf | grep -c "= 2400$"`
N12=`grep Rate tf | grep -c "= 1200$"`
N3=`grep Rate tf | grep -c "= 300$"`
N0=`grep Rate tf | grep -c "= 0$"`
echo "64000:" $[($N640 * 100) / $CALLS]"%"
echo "56000:" $[($N560 * 100) / $CALLS]"%"
echo "54000:" $[($N540 * 100) / $CALLS]"%"
echo "52000:" $[($N520 * 100) / $CALLS]"%"
echo "50000:" $[($N500 * 100) / $CALLS]"%"
echo "48000:" $[($N480 * 100) / $CALLS]"%"
echo "46000:" $[($N460 * 100) / $CALLS]"%"
echo "44000:" $[($N440 * 100) / $CALLS]"%"
echo "42000:" $[($N420 * 100) / $CALLS]"%"
echo "40000:" $[($N400 * 100) / $CALLS]"%"
echo "38000:" $[($N380 * 100) / $CALLS]"%"
echo "36000:" $[($N360 * 100) / $CALLS]"%"
echo "34000:" $[($N340 * 100) / $CALLS]"%"
echo "32000:" $[($N320 * 100) / $CALLS]"%"
echo "33600:" $[($N336 * 100) / $CALLS]"%"
echo "31200:" $[($N312 * 100) / $CALLS]"%"
echo "28800:" $[($N288 * 100) / $CALLS]"%"
echo "26400:" $[($N264 * 100) / $CALLS]"%"
echo "24000:" $[($N240 * 100) / $CALLS]"%"
echo "21600:" $[($N216 * 100) / $CALLS]"%"
echo "19200:" $[($N192 * 100) / $CALLS]"%"
echo "16800:" $[($N240 * 100) / $CALLS]"%"
echo "14400:" $[($N144 * 100) / $CALLS]"%"
echo "12000:" $[($N120 * 100) / $CALLS]"%"
echo " 9600:" $[($N96 * 100) / $CALLS]"%"
echo " 4800:" $[($N48 * 100) / $CALLS]"%"
echo " 2400:" $[($N24 * 100) / $CALLS]"%"
echo " 1200:" $[($N12 * 100) / $CALLS]"%"
echo "  300:" $[($N3 * 100) / $CALLS]"%"
echo "    0:" $[($N0 * 100) / $CALLS]"%"

#printf "31200: %d", $CALLS / $N312
-----cut here------



. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  Zachariah D. Johnson          Work Phone: 1(916)757-8070           
  Network Engineer              Home Phone: 1(916)759-0231           
  mother.com                    Voice Mail: 1(916)757-8082 Ext. #11  
  P.O. Box 4466                 I-net Mail: zjohnson@mother.com      
  Davis, CA 95617-4466          WWW: http://www.mother.com/~zjohnson 

++ Ascend Users Mailing List ++
To unsubscribe:	send unsubscribe to ascend-users-request@bungi.com
To get FAQ'd:	<http://www.nealis.net/ascend/faq>