I am running the monitoring scripts in the background. They are supposed to all day (24x7).
In the script, based on the monitor output I have a function to start a process using nohup
, redirecting the output to the log file /home/nohub_logs/logfile.txt
.
The script works fine for few hours but after these few hours the log file is still zero bytes length. Sometimes if I kill the monitoring script and restart the script I get some output.
nohup startprocessscript.sh >> /home/nohuplog &
Logs are getting generated after some time. For example, if the script is running for the first 24 hours, then after 24 hours the logs are not getting created. If we restart the script the logs are created.
I am not sure why sometime the nohup
log files are not getting any generated data. Can anyone help me, please.