linux - RHEL Java application - specific name instead of generic java process -
i have custom java application running on rhel machine. running java application bash exec script parameters , options appended. result, java application gets generic name "java" in system processes not useful me apply monitoring process (to know when crashed or not) , name not unique, potentially deploy similar java application, therefore not able distinguish them.
how give java application specific unique name?
example top below...
pid_no user 20 0 other_info java pid_no user 20 0 other_info java pid_no user 20 0 other_info java
ideally have...
pid_no user 20 0 other_info my_app1 pid_no user 20 0 other_info my_app2 pid_no user 20 0 other_info my_app3
thank in advance.
it seems have maybe 2 relatively simple options -
- create soft link java "desired" application name, , start app that
for example:
ln -s /usr/bin/java /usr/bin/yourapp /usr/bin/yourapp {options} yourapp.class ps -ef |grep yourapp
- pass dummy parameter application @ start identifies app.
for example:
java {options} -dyourapp="yourapp" yourapp.class ps -ef |grep yourapp
if goal monitor application, consider jvmtop or have app write heartbeat log, , monitor that.
Comments
Post a Comment