File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Monitoring script

 
Bhargo Dev Arya
Greenhorn
Posts: 8
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,

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.

thanks in advance
bhargo
 
Bhargo Dev Arya
Greenhorn
Posts: 8
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also if we exclude the option of a cron job then what can we do to run a monitoring script?

thanks in advance
bhargo
 
Tim Moores
Bartender
Pie
Posts: 2488
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define "monitoring script". What are the requirements?
 
Bhargo Dev Arya
Greenhorn
Posts: 8
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are a few processes that are running on the host....
I want to monitor whether they are up and running, if not then some action is taken...
 
Tim Moores
Bartender
Pie
Posts: 2488
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. In order to suggest alternatives we'd have to know why you regard running the script as a cron job deficient.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11833
181
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bhargo Dev Arya
Greenhorn
Posts: 8
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone

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
Bartender
Pie
Posts: 2488
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's better not to involve Java, it just complicates matters without providing much of a benefit. This is what cron is for.
 
Ifteqar Ahmed
Ranch Hand
Posts: 85
Java Linux MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.....

It helped me
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic