Java process title editing  
Author Message
Aleksi Kallio





PostPosted: 2003-8-29 15:51:00 Top

java-programmer, Java process title editing I need a component that takes a String and puts it into Unix process
table by calling natively setproctitle. On Windows it can do nothing, I
don't care.

Also a possibility to use variables such as number_of_threads would be cool.

Why? When running a lot of Java server stuff on a Linux box it's really
hard to tell which process is which. Especially in production
environment "kill -9":ing makes me always feel quite uncomfortable...

If there is no such thing, then I'll have to roll my own. But better to
check first, don't wan't to reinvent stuff. :) Google didn't turn out
anything. ..

 
Gordon Beaton





PostPosted: 2003-8-29 16:18:00 Top

java-programmer >> Java process title editing On Fri, 29 Aug 2003 10:51:21 +0300, Aleksi Kallio wrote:
> I need a component that takes a String and puts it into Unix process
> table by calling natively setproctitle. On Windows it can do
> nothing, I don't care.

You can't do this kind of thing in pure Java, as you probably already
realize. It should be trivial to write one using a native method
though.

> Also a possibility to use variables such as number_of_threads would
> be cool.
>
> Why? When running a lot of Java server stuff on a Linux box it's
> really hard to tell which process is which. Especially in production
> environment "kill -9":ing makes me always feel quite
> uncomfortable...

As it should. Normally you should only need to use SIGKILL (i.e. 9)
for processes that are truly stuck and unresposive to SIGHUP, SIGINT,
SIGQUIT or SIGTERM. Give them a chance to terminate cleanly.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e