Add functions to see active pdp contexts
This commit is contained in:
parent
1149a58bfd
commit
7643099f6f
1 changed files with 9 additions and 0 deletions
|
@ -86,3 +86,12 @@ b<%= index %>() {
|
||||||
ssh -o StrictHostKeyChecking=no root@<%= bts["ip"] %>
|
ssh -o StrictHostKeyChecking=no root@<%= bts["ip"] %>
|
||||||
}
|
}
|
||||||
<% end -%>
|
<% 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
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue