Sponsored Content
Full Discussion: How to get jboss pid?
Operating Systems Linux Red Hat How to get jboss pid? Post 302448631 by pbsdis on Thursday 26th of August 2010 05:09:41 PM
Old 08-26-2010
Thank you guys for your help. It works now!

---------- Post updated at 04:09 PM ---------- Previous update was at 11:51 AM ----------

Woops, I guess I should have tried more before I replied.

Now I have issues -

The command I used ps -ef | awk '/jbos[s]/ {print $2} some time return one number which is correct and I can kill the process using the number - that's what happened when I replied; but later I found that it sometime returned two numbers, the first one is not the right one so my program trying to kill the process failed and quit.

Then I logged on the remote machine and tried to get the jboss (ps -ef | grep jboss), I did see the output:

Quote:
[SERVER /]$ ps -ef | grep jboss
usr_name 364 31548 0 16:44 pts/0 00:00:00 grep jboss
root 32261 1 12 16:35 ? 00:01:04 /comp/java/bin/java -Dprogram.name=run.sh -server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/apps/tparty/jboss/inuse/lib/endorsed -classpath /apps/tparty/jboss/inuse/bin/run.jar:/comp/java/lib/tools.jar org.jboss.Main -c comp

[SERVER /]$ ps -ef | grep jboss
root 507 1 0 16:44 ? 00:00:00 /bin/sh /apps/tparty/jboss/inuse/bin/run.sh -c comp
root 530 507 8 16:44 ? 00:00:57 /comp/java/bin/java -Dprogram.name=run.sh -server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/apps/tparty/jboss/inuse/lib/endorsed -classpath /apps/tparty/jboss/inuse/bin/run.jar:/comp/java/lib/tools.jar org.jboss.Main -c comp
usr_name 952 31548 0 16:55 pts/0 00:00:00 grep jboss
You can see that my program returned the right number (32261) in the first trial, but after jboss was restarted, the second run of my program failed because it returned 507 and 530 (530 is the right one but program failed trying to kill 507 first).

I am new Linux user and would like to know why is that, and how can I modify my program (or the command) to make it always work?


Thanks,
Peter
 

10 More Discussions You Might Find Interesting

1. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

2. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

3. UNIX for Advanced & Expert Users

jboss and websphere monitoring scripts for hobbit

HI, A very good morning.... i need extensions/plugins for monitoring jboss and websphere for hobbit.. kindly if any one has the ext. or associated scripts pls send me the script or the link from where i can download the scripts(and any dependency for those scripts). Await ur reply.. ... (0 Replies)
Discussion started by: suvra
0 Replies

4. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

5. Red Hat

JBoss Application Server 5 CR1 available

The first candidate release (CR1) for JBoss Application Server 5 has been released. There is a lot of good background from Sacha Labourey and feature details from project lead Dimitris Andreadis. Now that version 5 of the new application server has been through alpha and beta stages, this... (0 Replies)
Discussion started by: Linux Bot
0 Replies

6. AIX

Creating startup service for JBoss

Hello Friends, Does anyone know how to create a startup script for Jboss on IBM AIX 5.3? Please help me, I'd be highly grateful to you... Thanks & Regards, Vinit (0 Replies)
Discussion started by: vpatil6688
0 Replies

7. AIX

Installing jboss on aix

Hi, anybody knows how to configure and install jboss on aix. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

8. UNIX and Linux Applications

Jboss Stop Issue

Hello Everybody, I have recently setup a Jboss-4.2.3 server in a RHEL machine.I copied the "/etc/init.d/jboss" script from another Jboss server and added the same to chkconfig. When i run - "service jboss start" - the Jboss server starts fine. However when i run - "service jboss stop" - it... (1 Reply)
Discussion started by: Hari_Ganesh
1 Replies

9. Shell Programming and Scripting

Recycle Jboss server script

Hello, I need help writing a script to restart our Jboss server when it crashes. I am not very good with scripting but here is the basics. 1) I'm hoping to use KornShell 2) The command to stop the Jboss is "/var/opt/HP/ALM/jboss/bin/run.sh stop" 3) I want to verify the jboss is stopped before... (1 Reply)
Discussion started by: Blogger11
1 Replies

10. Web Development

Starting Web Application on Jboss

Hello, I installed Jboss EAP 6 on a remote Linux server in standalone mode, and deployed a HelloWorld war file successfully. Opened a browser on my PC and pointed to http://127.0.0.1:8080/filename. I can see “Hello World!” on my browser. However, if the browser points to http://server's... (3 Replies)
Discussion started by: learnix
3 Replies
javap(1)						      General Commands Manual							  javap(1)

NAME
javap - Java class file disassembler SYNOPSIS
javap [ options ] class ... DESCRIPTION
The javap command disassembles a Java class file. The options determine the output. If no options are used, javap prints out the package, protected, and public fields and methods of the classes passed to it. The javap command displays its output to stdout. For example, com- pile the following class declaration: import java.awt.*; import java.applet.*; public class DocFooter extends Applet { String date; String email; public void init() { resize(500,100); date = getParameter("LAST_UPDATED"); email = getParameter("EMAIL"); } public void paint(Graphics g) { g.drawString(date + " by ",100, 15); g.drawString(email,290,15); } } The output from javap DocFooter yields: Compiled from DocFooter.java public class DocFooter extends java.applet.Applet { java.lang.String date; java.lang.String email; public void init(); public void paint(java.awt.Graphics); public DocFooter(); } OPTIONS
The following options are supported: -b Ensures backward compatibility with javap in JDK 1.1. -bootclasspath path Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in jre/lib/rt.jar and jre/lib/charsets.jar. -c Prints out disassembled code, that is, the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the Java Virtual Machine Specification. -classpath path Specifies the path javap uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons (:). Thus the general format for path is: .:<your_path> For example: .:/home/avh/classes:/usr/local/java/classes -extdirs dirs Overrides location at which installed extensions are searched. The default location for extensions is jre/lib/ext. -help Prints out help message for javap. -Jflag Passes flag directly to runtime system. javap -J-version javap -JJ-Djava.security.manager -Djava.security.policy=MyPolicy MyClassName -l Displays line and local variable tables. -package Shows only package, protected, and public classes and members. This is the default. -private Shows all classes and members. -protected Shows only protected and public classes and members. -public Shows only public classes and members. -s Displays internal type signatures. -verbose Prints stack size, number of locals, and args for methods. ENVIRONMENT VARIABLES
CLASSPATH Used to provide the system with a path to user-defined classes. Directories are separated by colons. For example: .:/home/avh/classes:/usr/local/java/classes SEE ALSO
java(1), javac(1), javadoc(1), javah(1), jdb(1) 13 June 2000 javap(1)
All times are GMT -4. The time now is 06:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy