System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

What's the difference between binaries "java" and "java_q3p"?

SOLVED
Go to solution
Ralph Grothe
Honored Contributor

What's the difference between binaries "java" and "java_q3p"?

Hello,

again I had a script failing because of seemingly wrong assumptions about a program's appearance in the process table.

Though this should have been a known issue to me,
since I already had posted this thread
( http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1201739 )
almost two years ago (unfortunately without the hoped for solution then),
it just has haunted me back.

The silly and bewildering mystery to me is its two guises it shows up as.

See what I mean?

# UNIX95= ps -C java -o pid,ppid,comm,args
PID PPID COMMAND COMMAND

# UNIX95= ps -C java_q3p -o pid,ppid,comm,args
PID PPID COMMAND COMMAND
12952 12951 java /opt/java1.5/bin/PA_RISC2.0/java -Xms512m -Xmx2048m -XX:NewSize

# UNIX95= ps -p 12952 -o comm,args
COMMAND COMMAND
java /opt/java1.5/bin/PA_RISC2.0/java -Xms512m -Xmx2048m -XX:NewSize

# UNIX95= ps -p 12952 -o comm
COMMAND
java

# UNIX95= ps -p 12952
PID TTY TIME CMD
12952 ? 03:05:15 java

# ps -p 12952
PID TTY TIME COMMAND
12952 ? 185:16 java_q3p


In the Java15JDK package where this belongs to
there are two differently named (and obviously different) binaries of same size.


# swlist -l file Java15JDK|grep java_q3p
Java15JDK.Jdk15.JDK15-PA20: /opt/java1.5/bin/PA_RISC2.0/java_q3p
Java15JDK.Jre15.JRE15-PA20: /opt/java1.5/jre/bin/PA_RISC2.0/java_q3p

# ll -i /opt/java1.5/bin/PA_RISC2.0/java{,_q3p}
8546 -r-xr-xr-x 1 bin bin 126648 Oct 17 2006 /opt/java1.5/bin/PA_RISC2.0/java
8547 -r-xr-xr-x 1 bin bin 126648 Oct 17 2006 /opt/java1.5/bin/PA_RISC2.0/java_q3p

# diff /opt/java1.5/bin/PA_RISC2.0/java{,_q3p}
Binary files /opt/java1.5/bin/PA_RISC2.0/java and /opt/java1.5/bin/PA_RISC2.0/java_q3p differ


I am really curious what the meaning is of this duplicity?

Regards
Ralph
Madness, thy name is system administration
7 REPLIES
Dennis Handly
Acclaimed Contributor
Solution

Re: What's the difference between binaries "java" and "java_q3p"?

>I am really curious what the meaning is of this duplicity?

If you tell java you need a larger heap, it invokes the chatr +q3p version of java, for 1 Gb more.
Ralph Grothe
Honored Contributor

Re: What's the difference between binaries "java" and "java_q3p"?

Thank you for the explanation Dennis.

Since we asked for a heap size between 512-2048 MB (i.e. args -Xms512m -Xmx2048m to JVM) it has started the java_q3p binary.

Now I know how and when to distinguish.

Btw, just for me as a memory hook, does q3 refer to "quadrant 3" in terms of imaginative memory mapping?
Madness, thy name is system administration
Don Morris_1
Honored Contributor

Re: What's the difference between binaries "java" and "java_q3p"?

Yes, this has a direct analogy to the char_pa(1) q3p / q4p sections and signifies Java running with the 3rd Quadrant private.
Don Morris_1
Honored Contributor

Re: What's the difference between binaries "java" and "java_q3p"?

Argh... typo -- that should have been "chatr_pa(1)", of course. Sorry.
Ralph Grothe
Honored Contributor

Re: What's the difference between binaries "java" and "java_q3p"?

So guys, I now changed my script so that it would hopefully catch the JVM's PID, no matter in what memory quadrant it has been placed,
by using

e.g.

jvm_pid=$(NIX95= ps -C java,java_q3p,java_q4p -o pid=)


So while this would fail

$ UNIX95= ps -C java
PID TTY TIME CMD

this seems to work

$ UNIX95= ps -C java,java_q3p,java_q4p -o pid=
3527

$ ps -fp 3527
UID PID PPID C STIME TTY TIME COMMAND
www 3527 1 0 Oct 26 ? 8:58 /opt/java1.5/bin/PA_RISC2.0/java -Xms512m -Xmx2048m -XX:NewSize


Of course, you now may now argue that if I had several JVMs in possibly several quadrants running, it would still break.

But that's ok since there ought to be running only one JVM per node.
Madness, thy name is system administration
Dennis Handly
Acclaimed Contributor

Re: What's the difference between binaries "java" and "java_q3p"?

>that's ok since there ought to be running only one JVM per node.

You can have one JVM for each java application.
Ralph Grothe
Honored Contributor

Re: What's the difference between binaries "java" and "java_q3p"?

> You can have one JVM for each java application.

I know, but these are dedicated cluster nodes with each of them running exactly one Tomcat instance (which itself isn't a cluster shared resource as part of an MC/SG package).
Madness, thy name is system administration