diff --git a/modules/rhizo_base/templates/rccn-functions.sh.erb b/modules/rhizo_base/templates/rccn-functions.sh.erb index afe96cd..704e2e2 100644 --- a/modules/rhizo_base/templates/rccn-functions.sh.erb +++ b/modules/rhizo_base/templates/rccn-functions.sh.erb @@ -121,6 +121,43 @@ vt () tmux attach -t vtys ; } +vtps () +{ + tmux has-session -t vty_ps 2> /dev/null; + if [ $? -eq 0 ]; then + tmux a -t vty_ps + return; + fi; + tmux start-server; + tmux new -s vty_ps -d -n VTY; + for vty in msc sg hlr; + do + if [ "$vty" == "msc" ]; then + pane=0; + fi; + if [ "$vty" == "hlr" ]; then + pane=2; + fi; + if [ "$vty" == "sg" -o "$vty" == "hlr" ]; then + split=h; + else + split=v; + fi; + tmux split-window -t $pane -$split "vty $vty $*"; + done; + tmux select-pane -t:.0; + tmux send "b0 /usr/local/bin/pcu" C-m + tmux select-pane -t:.1; + tmux send "show mm-context all" C-m + tmux select-pane -t:.2; + tmux send "show subscriber cache" C-m + tmux select-pane -t:.3; + tmux send "show subscribers last-seen" C-m + tmux select-pane -t:.0; + tmux send "show ms all" C-m + tmux attach -t vty_ps +} + bA() { source /home/rhizomatica/bin/vars.sh tmux has-session -t bts 2>/dev/null