Keith Whyte has uploaded this change for review. ( https://gerrit.osmocom.org/11811
Change subject: Add expect script: 'vty' for easy access to all vtys ...................................................................... Add expect script: 'vty' for easy access to all vtys This expect script can be run as: ./vty bsc ./vty msc ./vty sip ... etc (no need to remember ports) One can edit the script itself to configure the preferred logging configuration for each component. Requires expect, available on most distributions. Change-Id: I64ec5f2a8e04f3a8ea9cd0910ba9614fcd37ecec --- A vty 1 file changed, 70 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/11/11811/1 diff --git a/vty b/vty new file mode 100755 index 0000000..ce37cf3 --- /dev/null +++ b/vty @@ -0,0 +1,70 @@ +#!/usr/bin/expect -f + +set vty [lindex $argv 0] + +switch $vty { + hlr { set port 4258 } + bsc { set port 4242 } + mgw { set port 4243 } + sg { set port 4245 } + msc { set port 4254 } + sip { set port 4256 } + gg { set port 4260 } + default { set port 4242 } +} + +spawn telnet localhost $port +expect ">" +send "enable\r" +expect "#" +send "logging enable\r" +expect "#" +send "logging print category 1\r" +expect "#" +send "logging print level 1\r" +expect "#" + +switch $vty { + + hlr - + sip { + send "logging level all debug\r" + expect "#" + } + + bsc { + send "logging level msc error\r" + expect "#" + send "logging level mm debug\r" + expect "#" + send "logging level rr debug\r" + expect "#" + } + + msc { + send "logging level vlr fatal\r" + expect "#" + send "logging level mncc debug\r" + expect "#" + send "logging level cc debug\r" + expect "#" + } + + mgw { + send "logging level lglobal debug\r" + expect "#" + send "logging level rtp debug\r" + expect "#" + } + + default { + send "logging level all everything\r" + expect "#" + } + +} + + +send "logging filter all 1\r" +expect "#" +interact -- To view, visit https://gerrit.osmocom.org/11811 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I64ec5f2a8e04f3a8ea9cd0910ba9614fcd37ecec Gerrit-Change-Number: 11811 Gerrit-PatchSet: 1 Gerrit-Owner: Keith Whyte <ke...@rhizomatica.org>