Browse code

core: relocated some folders from root and utils to misc

- utils keeps only the applications related to kamailio c code
- the other are now in misc/tools
- utils/misc/vim moved to misc/extra/
- obsolete and scripts folders moved to misc/

Daniel-Constantin Mierla authored on 07/12/2016 11:46:38
Showing 1 changed files
1 1
deleted file mode 100755
... ...
@@ -1,106 +0,0 @@
1
-#!/bin/sh -x
2
-
3
-# profile filename
4
-PREF=$1
5
-# number of cycles
6
-NROFCYCLES=4
7
-# functions to go into report
8
-MYFN="eat_line|eat_space|eat_token"
9
-# set to non-zero if only a report is to be generated
10
-#REPONLY=tru
11
-
12
-CONFIG=profile.cfg
13
-
14
-SRD=${HOME}/sip_router
15
-PRO=${SRD}/profile
16
-REP=$PRO/$PREF.txt
17
-EXEC=ser
18
-
19
-
20
-function usage()
21
-{
22
-cat << EOF
23
-usage: $0 profile_name
24
-
25
-currently, this script starts a remote sender at alioth.
26
-The sender iterates through all messages available in its
27
-directory and send them many times (should be configurable).
28
-Sip-router is configured to relay requests to benetnash:sink
29
-and responses are built to be routed there too.
30
-This repeats NROFCYCLES-times. Results of all cycles are then
31
-dumped into <profile_name>-<cycle number>.txt and a
32
-report <profile_name>.txt is generated.
33
-
34
-EOF
35
-
36
-exit 1
37
-}
38
-
39
-if [ "$#" -ne 1 ] ; then
40
-	usage
41
-fi
42
-
43
-cd $SRD
44
-
45
-function run()
46
-{
47
-j=0
48
-while [ $j -lt "$NROFCYCLES" ] ; do
49
-i=`printf "%.3d" $j`
50
-j=`expr $j + 1`
51
-
52
-echo "*** Entering cycle $j"
53
-
54
-/usr/bin/time --output="$PRO/${PREF}-${i}-time.txt" ${SRD}/$EXEC -l 192.168.99.100 -D -E -d -f ${PRO}/$CONFIG &
55
-
56
-#rsh -l jku benetnash.fokus.gmd.de 'nohup bin/sock -s -u 5060 '
57
-
58
-rsh -l jku alioth.fokus.gmd.de 'nohup tmp/sipp/start.sh '
59
-
60
-killall -INT $EXEC
61
-
62
-gprof $EXEC > $PRO/${PREF}-${i}.txt
63
-
64
-done
65
-}
66
-
67
-function report()
68
-{
69
-cat > $REP << EOF
70
-first line ... time spent in tested procedure
71
-second line (yyrestart) ... total time
72
-third line (receive_msg) ... numer of calls
73
-   %   cumulative   self              self     total
74
- time   seconds   seconds    calls  ms/call  ms/call  name
75
-EOF
76
-
77
-j=0
78
-while [ $j -lt "$NROFCYCLES" ] ; do
79
-i=`printf "%.3d" $j`
80
-j=`expr $j + 1`
81
-  FN="${PRO}/${PREF}-${i}.txt"
82
-  echo >> $REP
83
-  echo >> $REP
84
-  echo $FN >> $REP
85
-  egrep "($MYFN|yyrestart)" $FN | grep -v '\[' >> $REP
86
-  grep 'receive_msg \[.\]' $FN | grep -v '\/' >> $REP
87
-  echo >> $REP
88
-  cat $PRO/${PREF}-${i}-time.txt >> $REP
89
-
90
-done
91
-
92
-cat >> $REP << EOF
93
-
94
-
95
-Execution environment:
96
-EOF
97
-cat /proc/cpuinfo /proc/meminfo >> $REP
98
-}
99
-
100
-if [ -z "$REPONLY" ] ; then
101
-	run
102
-fi
103
-report
104
-
105
-echo '*** finished ***'
106
-echo
Browse code

nasty stats added

Jiri Kuthan authored on 07/11/2001 18:41:08
Showing 1 changed files
... ...
@@ -9,9 +9,12 @@ MYFN="eat_line|eat_space|eat_token"
9 9
 # set to non-zero if only a report is to be generated
10 10
 #REPONLY=tru
11 11
 
12
+CONFIG=profile.cfg
13
+
12 14
 SRD=${HOME}/sip_router
13 15
 PRO=${SRD}/profile
14 16
 REP=$PRO/$PREF.txt
17
+EXEC=ser
15 18
 
16 19
 
17 20
 function usage()
... ...
@@ -48,15 +51,15 @@ j=`expr $j + 1`
48 51
 
49 52
 echo "*** Entering cycle $j"
50 53
 
51
-/usr/bin/time --output="$PRO/${PREF}-${i}-time.txt" ${SRD}/sip_router  -l 192.168.99.100 -D -E -d -f ${PRO}/profile.cfg  &
54
+/usr/bin/time --output="$PRO/${PREF}-${i}-time.txt" ${SRD}/$EXEC -l 192.168.99.100 -D -E -d -f ${PRO}/$CONFIG &
52 55
 
53 56
 #rsh -l jku benetnash.fokus.gmd.de 'nohup bin/sock -s -u 5060 '
54 57
 
55 58
 rsh -l jku alioth.fokus.gmd.de 'nohup tmp/sipp/start.sh '
56 59
 
57
-killall -INT sip_router
60
+killall -INT $EXEC
58 61
 
59
-gprof sip_router > $PRO/${PREF}-${i}.txt
62
+gprof $EXEC > $PRO/${PREF}-${i}.txt
60 63
 
61 64
 done
62 65
 }
Browse code

Tools for automated network profiling.

Jiri Kuthan authored on 06/10/2001 22:20:55
Showing 1 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,103 @@
1
+#!/bin/sh -x
2
+
3
+# profile filename
4
+PREF=$1
5
+# number of cycles
6
+NROFCYCLES=4
7
+# functions to go into report
8
+MYFN="eat_line|eat_space|eat_token"
9
+# set to non-zero if only a report is to be generated
10
+#REPONLY=tru
11
+
12
+SRD=${HOME}/sip_router
13
+PRO=${SRD}/profile
14
+REP=$PRO/$PREF.txt
15
+
16
+
17
+function usage()
18
+{
19
+cat << EOF
20
+usage: $0 profile_name
21
+
22
+currently, this script starts a remote sender at alioth.
23
+The sender iterates through all messages available in its
24
+directory and send them many times (should be configurable).
25
+Sip-router is configured to relay requests to benetnash:sink
26
+and responses are built to be routed there too.
27
+This repeats NROFCYCLES-times. Results of all cycles are then
28
+dumped into <profile_name>-<cycle number>.txt and a
29
+report <profile_name>.txt is generated.
30
+
31
+EOF
32
+
33
+exit 1
34
+}
35
+
36
+if [ "$#" -ne 1 ] ; then
37
+	usage
38
+fi
39
+
40
+cd $SRD
41
+
42
+function run()
43
+{
44
+j=0
45
+while [ $j -lt "$NROFCYCLES" ] ; do
46
+i=`printf "%.3d" $j`
47
+j=`expr $j + 1`
48
+
49
+echo "*** Entering cycle $j"
50
+
51
+/usr/bin/time --output="$PRO/${PREF}-${i}-time.txt" ${SRD}/sip_router  -l 192.168.99.100 -D -E -d -f ${PRO}/profile.cfg  &
52
+
53
+#rsh -l jku benetnash.fokus.gmd.de 'nohup bin/sock -s -u 5060 '
54
+
55
+rsh -l jku alioth.fokus.gmd.de 'nohup tmp/sipp/start.sh '
56
+
57
+killall -INT sip_router
58
+
59
+gprof sip_router > $PRO/${PREF}-${i}.txt
60
+
61
+done
62
+}
63
+
64
+function report()
65
+{
66
+cat > $REP << EOF
67
+first line ... time spent in tested procedure
68
+second line (yyrestart) ... total time
69
+third line (receive_msg) ... numer of calls
70
+   %   cumulative   self              self     total
71
+ time   seconds   seconds    calls  ms/call  ms/call  name
72
+EOF
73
+
74
+j=0
75
+while [ $j -lt "$NROFCYCLES" ] ; do
76
+i=`printf "%.3d" $j`
77
+j=`expr $j + 1`
78
+  FN="${PRO}/${PREF}-${i}.txt"
79
+  echo >> $REP
80
+  echo >> $REP
81
+  echo $FN >> $REP
82
+  egrep "($MYFN|yyrestart)" $FN | grep -v '\[' >> $REP
83
+  grep 'receive_msg \[.\]' $FN | grep -v '\/' >> $REP
84
+  echo >> $REP
85
+  cat $PRO/${PREF}-${i}-time.txt >> $REP
86
+
87
+done
88
+
89
+cat >> $REP << EOF
90
+
91
+
92
+Execution environment:
93
+EOF
94
+cat /proc/cpuinfo /proc/meminfo >> $REP
95
+}
96
+
97
+if [ -z "$REPONLY" ] ; then
98
+	run
99
+fi
100
+report
101
+
102
+echo '*** finished ***'
103
+echo