[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
For some reason my background script keeps stopping
From: |
Mun |
Subject: |
For some reason my background script keeps stopping |
Date: |
Fri, 26 Feb 2021 16:53:10 -0800 |
Hi all,
I'm using:
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
I have a script which I run in the background that basically contains
a loop that runs every minute (via 'sleep') and does a 'df' and puts
the output into a file and then the script reads in the file and
processes it per my needs. The processing of the file is via:
while read line
do
...
done <myfile
For some reason I often find that the file has Stopped. I can put it
into the fg and hit <Return> and then push it back to the bg and it
will run for hours/days and then I find that it has Stopped.
I'm wondering if anyone knows why the script is entering the Stopped
state when it doesn't require input from the user?
Also, is there any way for me to debug this further to know why it has
stopped? Is the -x flag my only option?
Thank you,
--
Mun
- For some reason my background script keeps stopping,
Mun <=