I need a quick script that will serve as a sort of "real time monitor" for watching some log files. I am using Bourne shell in HP-UX 10.20. I have basically created a script that never ends, unless of course I manually terminate it. Here's the script (it's called qhistory):
clear
echo "REAL TIME MONITOR - QCHECK"
echo "=========================="
echo
qcheck
sleep 1
qhistory
As you can see, if executes the qcheck command, sleeps for a second, then does the same thing over and over.
The script is doing exactly what I want it to do for about 5 minutes, then it dies. I get the following error:
qhistory[3]: The fork function failed. Too many processes already exist.
I'm a rookie at this, and don't reall know the best way to create this "real time monitor". Any suggestions? Thanks!!
-cd