Add shell vty helper
Yet another vty helper that opens vtys in tmux - this one is more related to PS service.
This commit is contained in:
parent
20c16d811a
commit
983453313d
1 changed files with 37 additions and 0 deletions
|
@ -121,6 +121,43 @@ vt ()
|
||||||
tmux attach -t vtys ;
|
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() {
|
bA() {
|
||||||
source /home/rhizomatica/bin/vars.sh
|
source /home/rhizomatica/bin/vars.sh
|
||||||
tmux has-session -t bts 2>/dev/null
|
tmux has-session -t bts 2>/dev/null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue