I have been doing Java for many years, but for the Linux environment is basically small white one, before doing a Java timing processing, but it seems to be 10 days will hang off.
But Java also has no logs. So it's not clear how to investigate. So I want to write a timer monitoring program, if you monitor the Java program hangs, then start the Java program again.
A time-lapse monitoring code was added to the Linux crontab.
The following code is added to the file Etc/crontab:
#/etc/crontab:system-wide Crontab
# Unlike any and crontab you don ' t has to run the ' crontab '
# command to install the new version when you edit this file
# and Files in/etc/cron.d. These files also has username fields,
# That's none of the other crontabs does.
Shell=/bin/sh
Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m H Dom Mon Dow UserCommand
* * * *root CD/&& run-parts--report/etc/cron.hourly
6* * *roottest-x/usr/sbin/anacron | | (CD/&& run-parts--report/etc/cron.daily)
6* * 7roottest-x/usr/sbin/anacron | | (CD/&& run-parts--report/etc/cron.weekly)
* *roottest-x/usr/sbin/anacron | | (CD/&& run-parts--report/etc/cron.monthly)
*/59 * * *root sh/alidata/runall.sh Monitor >>/alidata/log/monitor.log
#
-------------------------------finished-------------------------------------
Timing monitoring in Linux environment with small white writing