Update rccn util functions

This commit is contained in:
Monocots 2019-06-16 11:47:36 +00:00
parent 179919452f
commit a050b6f1ab

View file

@ -12,14 +12,14 @@ waitfor0calls () {
done
}
chans () {
while [ 1 == 1 ]
do
_output=`fs_cli -x 'show channels as delim |' | csvcut -d\| -c 3,2,6,8,10,11,13,15,18 | csvlook -I`
clear
echo "$_output"
sleep 1
done
chans ()
{
while [ 1 == 1 ]; do
_output=`fs_cli -x 'show channels as delim |' | csvcut -d\| -c 3,2,6,8,10,11,13,15,18 | csvlook -I`;
clear;
echo "$_output";
sleep 1;
done
}
topcalls () {
@ -43,6 +43,22 @@ hlr() {
sudo /usr/bin/sqlite3 -column -header $OSMO_HLR
}
tl() {
if [ "$1" == "" ] ; then
tail -f /var/log/rccn/*log
else
less -RS +F /var/log/rccn/$1.log
fi
}
r() {
sudo -i bash -c "cd /var/rhizomatica/rccn; exec bash --login"
}
o() {
sudo -i bash -c "cd /etc/osmocom; exec bash --login"
}
rk_ext() {
IMSI=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/index/msisdn_bin/$1 2>/dev/null| python -c "import sys, json; print json.load(sys.stdin)['keys'][0]")
echo $IMSI
@ -57,14 +73,3 @@ rk_imsi() {
echo
}
tl() {
if [ "$1" == "" ] ; then
less -RS +F /var/log/rccn/*log
else
less -RS +F /var/log/rccn/$1.log
fi
}
r() {
sudo -i bash -c "cd /var/rhizomatica/rccn; exec bash --login"
}