I have a script that I'm using to capture some status of the server at 10 second intervals.
The script is as follows:
for (( ; ; )) do /usr/local/apache/bin/apachectl fullstatus sleep 10 done
And I am running the script using:
nohup /path/to/scriptname.sh | gzip > logfile.log.gz &
It will run in the background and keep running if I disconnect from ssh. However, after about 3-4 hours the output stops getting transferred to the logfile. The script is still running and shows up if I run ps -elf | grep scriptname, but the logfile does not update. Why does the output stop sending? Is this possibly a problem with the buffer?