#!/bin/sh
SLP=$1
[ -z "$SLP" ] && SLP=3

export PDF_VIEWER=echo
T=1
while [ 1 ]; do
/usr/sbin/lkstbuf read -f tmplogdata ;
lkstlogdiv tmplogdata
lkstla syscall -s -T tmplogdata-* | tee syscall.log ;
/usr/bin/lkst_plot_stat syscall.log ;
if [ $T -eq 1 ] ; then
xpdf -remote demo Systemcallanalyzer.pdf &
T=0
else
xpdf -remote demo -reload
fi
sleep $SLP;
done
