init build.ems main
This commit is contained in:
28
tools/catch
Executable file
28
tools/catch
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# != 2 ] ; then
|
||||
echo "Catch SNMP package of EMS"
|
||||
echo "Usage: catch param/subs/csta/cdr fileName"
|
||||
exit
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
"param")
|
||||
port=4958;;
|
||||
"subs")
|
||||
port=4959;;
|
||||
"csta")
|
||||
port=4954;;
|
||||
"cdr")
|
||||
port=4968;;
|
||||
"heartbeat")
|
||||
port=4957;;
|
||||
*)
|
||||
echo "Error kind $1"
|
||||
exit
|
||||
esac
|
||||
|
||||
echo "Catch ... After finishing, you can get the package from /usr/local/apache/htdocs/"
|
||||
`tcpdump -x port $port -s1500 -v -w /usr/local/apache/htdocs/$2.cap`
|
||||
parse_snmp /usr/local/apache/htdocs/$2.cap > /usr/local/apache/htdocs/$2_out.txt
|
||||
|
||||
Reference in New Issue
Block a user