I am trying to create a monitoring script. I have created a script that checks for the mandatory processes.
I want to now what are the other ways in which this script can be run apart from being run as a daemon process.
I agree with Tim - not enough information to go on.
This may simply be a homework assignment, in which case certain answers would not normally be deemed reasonable alternatives. Or there may be a real production need, wherein practicality may trump theoretical "best".
Assuming that I do not have access to cron, I might consider whether a CGI script would suffice - again, this is very dependent on your (non stated) requirements.
please excuse my naivety, I am fairly new to unix and probably I havent been able to explain myself properly.
I am just trying to explore more options apart from cron and daemon.
I know these can work perfectly when it comes to monitoring processes, but is it better to have a java code having a thread that executes a script that monitors continuously, rather than executing the script on the server itself.
what would be a better approach?
this is not my homework...... :P
Joined: Sep 21, 2011
It's better not to involve Java, it just complicates matters without providing much of a benefit. This is what cron is for.
Tim Moores wrote:It's better not to involve Java, it just complicates matters without providing much of a benefit. This is what cron is for.
Actually, in cases where you're monitoring, this is what Nagios, Big Brother, etc. are for. They not only allow periodic execution of a query script, they provide a central dashboard to monitor a whole raft full of query scripts.
Customer surveys are for companies who didn't pay proper attention to begin with.