Add functions to see active pdp contexts

This commit is contained in:
Keith Whyte 2020-05-03 03:06:13 +02:00
parent 1149a58bfd
commit 7643099f6f

View file

@ -86,3 +86,12 @@ b<%= index %>() {
ssh -o StrictHostKeyChecking=no root@<%= bts["ip"] %>
}
<% end -%>
pdp () {
expect -c 'spawn -noecho telnet 0 4245; expect >; send enable\r; expect #; send "show pdp-context all\r"; expect #' | grep "PDP Address" | grep -v invalid | sort;
echo Count: $(pdpc)
}
pdpc () {
expect -c 'spawn -noecho telnet 0 4245; expect >; send enable\r; expect #; send "show pdp-context all\r"; expect #' | grep "PDP Address" | grep -v invalid | wc -l
}