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
regards
bhargo
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2329
posted
0
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.
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"