sap-test 521 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#!/bin/sh

if test .$1 = . ; then
   echo usage $0 seconds-of-measurements
   exit -1
else
   sec=$1
fi


dir=/var/lib/qstream/data/sap

y=`date +%Y`
m=`date +%m`
d=`date +%d`
h=`date +%H`

ydir=$dir/$y
test -d $ydir || mkdir $ydir
mdir=$ydir/$m
test -d $mdir || mkdir $mdir
ddir=$mdir/$d
test -d $ddir || mkdir $ddir
#hdir=$ddir/$h
#test -d $hdir || mkdir $hdir

# tmp=$dir/data/tmp/$$
# test -d $tmp || mkdir $tmp

cd $ddir

/usr/bin/qstream -nohead -last $sec -format full -v -net sap.mcast.net:9875 > sap-$y-$m-$d-$h