Ps command does not output JVM arguments

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Ps command does not output JVM arguments
# 1  
Old 11-01-2013
Ps command does not output JVM arguments


My OS is:

SunOS mymachine 5.10 Generic_148888-04 sun4v sparc SUNW,SPARC-Enterprise-T5220

I wish to get as much detailed information regarding a java process like the JVM args etc however my current ps command does not yield any detailed output but just one short line.

bash-3.2$ ps -ef | grep java
     usr1 1167  1143   0   Oct 29 ?         327:45 /opt/app/bea/jdk1.6.0_41/bin/sparcv9/java -server -XX:ParallelGCT

The below are the options with my ps command.

bash-3.2$ ps -xef
ps: illegal option -- x
usage: ps [ -aAdeflcjLPyZ ] [ -o format ] [ -t termlist ]
        [ -u userlist ] [ -U userlist ] [ -G grouplist ]
        [ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ]
  'format' is one or more of:
        user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid
        pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid
        f s c lwp nlwp psr tty addr wchan fname comm args projid project pset

My login id is the same as the one that runs this java process.

Can you please suggest the correct arguments that should be used with the ps command to get the desired detailed output ?

Last edited by mohtashims; 11-01-2013 at 10:04 AM..
# 2  
Old 11-01-2013
We cant invent what is not in the man pages you know... what ps does depend of the OS implementation...
the (very) long listing you want is obtainable on HP-UX where you do have ps -efx

Using ptree could give you clues...
# 3  
Old 11-01-2013
Originally Posted by vbe
We cant invent what is not in the man pages you know... what ps does depend of the OS implementation...
the (very) long listing you want is obtainable on HP-UX where you do have ps -efx

Using ptree could give you clues...
How does

help ?

bash-3.2$ ptree 1167
29373 /bin/sh /opt/app//bea/domains/Myapp78/bin/ 78
  29386 /bin/sh /opt/app//bea/domains/Myapp78/bin/ nodebug n
    1167 /opt/app//bea/jdk1.6.0_41/bin/sparcv9/java -server -XX:ParallelGCT

It does not give me what i desire
# 4  
Old 11-01-2013
Fortunatelly Solaris ships BSD ps utility in /usr/ucb. To get all the java arguments, run:
/usr/ucb/ps awwwx | grep java

Alternatively you can use:
pargs `pgrep java`

# 5  
Old 11-01-2013
Solaris 11 ships without /usr/ucb/ps but integrates the BSD-style args in /usr/bin/ps.
A portable expression is
PATH=/usr/ucb:/bin:/usr/bin ps awwwx | grep java

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

2. Shell Programming and Scripting

Need to collect & compare JVM arguments

I have a server.out file which looks like the below... JAVA Memory arguments: -XX:ParallelGCThreads=12 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=800m -XX:MaxNewSize=800m -XX:SurvivorRatio=8 -XX:-UseBiasedLocking... (1 Reply)
Discussion started by: mohtashims
1 Replies

3. Homework & Coursework Questions

Filter command arguments

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Execute command with integer list arguments such as myScript 8 7 2 3. Take those arguments and square all of... (2 Replies)
Discussion started by: Learn4Life
2 Replies

4. Shell Programming and Scripting

Output only non-empty arguments

Hello, I am VERY new to shell scripting here, so please go easy. I have an assignment that requires creating a script using bash shell, outputting all command line arguments that are not empty ones such as " ", and showing total number of arguments. I know how to show the total with $# and all... (6 Replies)
Discussion started by: moderwarfare
6 Replies

5. Shell Programming and Scripting

output arguments from a sqlplus

Hi. I need to output a 4 queries result into another application using result=`sqlplus -s ${3}/${4}@${2} << EOF ... query1 query2 query3 query4 .... echo "$metrics1" and returning those individual values into another app. (query1 and 3compute one value, query 2 and 4 compute 4... (3 Replies)
Discussion started by: shell_zen
3 Replies

6. UNIX for Dummies Questions & Answers

Command line arguments.

I am working on a script wherein i need the user to enter the Build ID for eg:the command line will show enter the build ID Now on entering the build ID it should be assigned to @ARGV. How can this be done.? (1 Reply)
Discussion started by: Varghese
1 Replies

7. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

8. HP-UX

get whole command arguments in ps -ef?

Hello All, I want to build some monitoring of processes in HP-UX 11.x. Is there any way to get the whole set of commands and arguments instead of the first 60 characters? I read that there's a limitation of the ps -ef command that we can't overcome. In this case is there any other command... (17 Replies)
Discussion started by: usfrog
17 Replies

9. UNIX for Dummies Questions & Answers

arguments in command line

Hi all, How many arguments can we pass while testing a prgm at command line.. I encountered an issue while passing 10 arguments. For $10 its taking argument passed for $1 followed by 'zero'. can we pass more than 9 arguments /Is there any other way. Thanks, rrs (6 Replies)
Discussion started by: rrs
6 Replies

10. Programming

command line arguments

Hi How to pass multi line text as a command line argument to a program. (i.e) ./a.out hi this is sample 0 file1 where hi this is sample should be stored in argv 0 in argv and so on... (3 Replies)
Discussion started by: bankpro
3 Replies
Login or Register to Ask a Question