File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Monitoring Java Programs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Monitoring Java Programs" Watch "Monitoring Java Programs" New topic

Monitoring Java Programs

ind sakthi

Joined: Nov 09, 2006
Posts: 2

I'm running several stand-alone java programs as batch files, each doing a specific job. I want to monitor from a centralized place that all are running or not. Any suggestions how do I do it?

Thanks in advance,

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195


Welcome to JavaRanch!

We have a strict policy on display names, which must be a real first and last name with a space between.

Please go here and fix your display name up, pronto. Thanks, pardner!

[Jess in Action][AskingGoodQuestions]
ind sakthi

Joined: Nov 09, 2006
Posts: 2
Done. Actually ind are the initials.

Thanks and Regards,
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15041

A few years ago I made something like this myself. I wrote a class that started a thread to listen on a TCP/IP port. Each of the processes to be monitored started this thread (each using a different TCP/IP port, ofcourse). The monitoring program could connect to that port and send some simple commands (with a very small application protocol that I invented myself) to see if the program was running and to get some statistics.

If I'd have to do something like that now, I'd probably use JConsole and program a few MBeans into my application. JConsole is a tool added in Java 5.0 to monitor applications: Using JConsole to Monitor Applications.
[ November 09, 2006: Message edited by: Jesper Young ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
It is sorta covered in the JavaRanch Style Guide.
subject: Monitoring Java Programs
It's not a secret anymore!