LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-05-2008, 03:53 AM   #1
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Rep: Reputation: 30
Linux doesn't show java flags??


Hello All,

I'm running a SUN One application server, and according to it, it is running the JVM with these flags:

-Xms4M -Xmx64M

But when I do a ps -ef I see the process, BUT without the flags?!?!

My Question:

Is there any other way to see which options the JVM is running with?
 
Old 06-05-2008, 05:26 AM   #2
Hex_uk
LQ Newbie
 
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5

Rep: Reputation: 0
Hi,

Well one way would be to use JConsole. From the command line type jconsole and a small swing app should start and hopefully list the java processes running on your machine. Select the process you are interested in. Then you can click on the VM tab and see information about the process including the flags that were passed to the vm.

Interesting that you can't see the flags from ps as on my SuSE and Mandriva boxes ps does show the vm flags. Which distro are you using?

Hope this helps,

Ben.
 
Old 06-05-2008, 06:10 AM   #3
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
Is there any other way to run jconsole other than via an X session... I am trying everything in the book, but I can't get it to display:

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'SERVER123456789:10.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:93)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.Toolkit$2.run(Toolkit.java:821)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1592)
at java.awt.EventQueue.invokeLater(EventQueue.java:809)
at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1198)
at sun.tools.jconsole.JConsole.mainInit(JConsole.java:664)
at sun.tools.jconsole.JConsole.main(JConsole.java:827)



Is it possible to run in command line mode?
 
Old 06-05-2008, 07:13 AM   #4
Hex_uk
LQ Newbie
 
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5

Rep: Reputation: 0
Hi,

No, I'm afraid you cannot run Jconsole as a command line app.

Where did SERVER123456789:10.0 come from, is your server really called SERVER123456789?

Ben.
 
Old 06-05-2008, 08:01 AM   #5
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
Let's say that SERVER123456789 is the name I use here, don't want to give the name away you know...

I tried using :0.0 and servername:0.0 which work in other environments, but not here...

Any ideas? What DISPLAY variable do you use?
 
Old 06-05-2008, 08:02 AM   #6
Hex_uk
LQ Newbie
 
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5

Rep: Reputation: 0
Hi,

My DISPLAY is set to :0.0

Ben.
 
Old 06-05-2008, 08:06 AM   #7
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
I was afraid you were going to say that....
 
Old 06-05-2008, 08:10 AM   #8
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
Hey I got it! In another machine, but OK, let's play with it...

I got the console in my screen, but now I have a tab that reads "Local", and it's all empty...?

Last edited by vous; 06-05-2008 at 08:12 AM.
 
Old 06-06-2008, 06:44 AM   #9
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
Hey I found the command line versions of it....hope it helps!!

1) jinfo


Attaching to process ID 16664, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_01-b08
-XX:NewRatio=2 -Xmx2G -Dcom.sun.aas.defaultLogFile=/apps/kam/var/opt/SUNWappserver/nodeagents/gsx129.kpn-mobile.net/aminstanceA/logs/server.log -Djava.endorsed.dirs=/apps/kam/opt/SUNWappserver/appserver/lib/endorsed -Djava.security.auth.login.config=/apps/kam/var/opt/SUNWappserver/nodeagents/gsx129.kpn-mobile.net/aminstanceA/config/login.conf -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.dgc.client.gcInterval=3600000 -Djava.ext.dirs=/usr/jdk/entsys-j2se/jre/lib/ext:/apps/kam/var/opt/SUNWappserver/nodeagents/gsx129.kpn-mobile.net/aminstanceA/config/aminstanceA-config/lib/ext:/apps/kam/var/opt/SUNWappserver/nodeagents/gsx129.kpn-mobile.net/aminstanceA/lib/ext:/apps/kam/opt/SUNWappserver/appserver/lib/jdbcdrivers -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.Ap pserverConfigEnvironmentFactory -Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar -Dcom.sun.enterprise.taglisteners=jsf-impl.jar -Dcom.sun.appserv.pluggable.features=com.sun.enterprise.ee.server.pluggable.EEPluggableFeatureImpl -Dcom.sun.appserv.nss.db=/apps/kam/var/opt/SUNWappserver/nodeagents/gsx129.kpn-mobile.net/aminstanceA/config -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver -DLOG_COMPATMODE=Off -Djava.protocol.handler.pkgs=com.iplanet.services.comm -Ds1is.java.util.logging.config.class=com.sun.identity.log.s1is.LogConfigReader -Dcom.iplanet.am.serverMode=true -Dserver.name=aminstanceA -DJMX_SYSTEM_CONNECTOR_PORT=53353 -DIIOP_LISTENER_PORT=53360 -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Dcom.sun.aas.configName=aminstanceA-config -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Ddomain.name=gsx129.kpn-mobile.net -Djmx.invoke.getters=true -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFac toryImpl -Dcom.sun.aas.promptForIdentity=true -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser -DIIOP_SSL_LISTENER_PORT=53350 -DIIOP_SSL_MUTUALAUTH_PORT=53347 -DHTTP_LISTENER_PORT=58080 -Dcom.sun.aas.instanceRoot=/apps/kam/var/opt/SUNWappserver/nodeagents/gsx129.kpn-mobile.net/aminstanceA -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFact oryImpl -Dcom.sun.aas.domainName=gsx129.kpn-mobile.net -DHTTP_SSL_LISTENER_PORT=58081 -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager -Dproduct.name=Sun-Java-System/Application-Server -Dcom.sun.enterprise.overrideablejavaxpackages=javax.faces,javax.servlet.jsp.jstl,javax.xml.bind,java x.help -Dcom.sun.aas.configRoot=/apps/kam/opt/SUNWappserver/appserver/config -Djava.library.path=/usr/jdk/entsys-j2se/usr/jdk/entsys-j2se/jre/lib/sparc/client:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc/server:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc:/usr/jdk/instances/jdk1.5.0/jre/../lib/sparc:/usr/lib/mps/secv1:/apps/kam/opt/SUNWappserver/appserver/lib:/usr/lib/lwp:/usr/lib/mps/secv1:/apps/kam/opt/SUNWappserver/appserver/lib:/usr/lib/lwp:/usr/jdk/entsys-j2se/usr/jdk/entsys-j2se/jre/lib/sparc/client:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc/server:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc:/usr/jdk/instances/jdk1.5.0/jre/../lib/sparc:/usr/lib/mps/secv1:/apps/kam/opt/SUNWappserver/appserver/lib:/usr/lib/lwp:/usr/lib/mps/secv1:/apps/kam/opt/SUNWappserver/appserver/lib:/usr/lib/lwp:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc/server:/usr/jdk/instances/jdk1.5.0/jre/lib/sparc:/usr/jdk/instances/jdk1.5.0/jre/../lib/sparc:/usr/lib/mps/secv1:/apps/kam/opt/SUNWappserver/appserver/lib:/usr/lib::/usr/lib:/usr/lib -Dcom.sun.aas.instanceName=aminstanceA -Dcom.sun.aas.processLauncher=SE -Dcom.sun.aas.launcherReturn=hold


2) jmap

Attaching to process ID 9943, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_01-b08

using thread-local object allocation.
Parallel GC with 2 thread(s)

Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 201326592 (192.0MB)
NewSize = 2228224 (2.125MB)
MaxNewSize = 4294901760 (4095.9375MB)
OldSize = 1441792 (1.375MB)
NewRatio = 2
SurvivorRatio = 32
PermSize = 16777216 (16.0MB)
MaxPermSize = 67108864 (64.0MB)

Heap Usage:
PS Young Generation
Eden Space:
capacity = 9306112 (8.875MB)
used = 539816 (0.5148086547851562MB)
free = 8766296 (8.360191345214844MB)
5.800660898987676% used
From Space:
capacity = 720896 (0.6875MB)
used = 540736 (0.51568603515625MB)
free = 180160 (0.17181396484375MB)
75.0088778409091% used
To Space:
capacity = 720896 (0.6875MB)
used = 0 (0.0MB)
free = 720896 (0.6875MB)
0.0% used
PS Old Generation
capacity = 25165824 (24.0MB)
used = 0 (0.0MB)
free = 25165824 (24.0MB)
0.0% used
PS Perm Generation
capacity = 16777216 (16.0MB)
used = 5566792 (5.308906555175781MB)
free = 11210424 (10.691093444824219MB)
33.18066596984863% used


3) jstack

JVM version is 1.5.0_01-b08
Thread t@21: (state = BLOCKED)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.util.pool.BasicRunnable.run() @bci=150, line=452 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)


Thread t@20: (state = BLOCKED)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.util.pool.BasicRunnable.run() @bci=150, line=452 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)


Thread t@1: (state = BLOCKED)


Thread t@19: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=50, line=450 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.multibroker.fullyconnected.ClusterListener.run() @bci=30, line=1508 (Interpreted frame)


Thread t@18: (state = BLOCKED)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.multibroker.CallbackDispatcher.run() @bci=30, line=276 (Interpreted frame)


Thread t@17: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=50, line=450 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.net.tcp.TcpProtocol.accept() @bci=279, line=233 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.service.imq.IMQService.run() @bci=125, line=579 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)


Thread t@16: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=50, line=450 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.net.tcp.TcpProtocol.accept() @bci=279, line=233 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.service.imq.IMQService.run() @bci=125, line=579 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)


Thread t@15: (state = BLOCKED)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.multibroker.BrokerConsumers.run() @bci=39, line=365 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)


Thread t@14: (state = IN_NATIVE)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) (Interpreted frame)
- java.net.PlainSocketImpl.accept(java.net.SocketImpl) @bci=7, line=384 (Interpreted frame)
- java.net.ServerSocket.implAccept(java.net.Socket) @bci=50, line=450 (Interpreted frame)
- java.net.ServerSocket.accept() @bci=48, line=421 (Interpreted frame)
- com.sun.messaging.jmq.jmsserver.service.PortMapper.run() @bci=51, line=384 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)


Thread t@13: (state = BLOCKED)
- java.lang.Object.wait(long) (Compiled frame; information may be imprecise)
- com.sun.messaging.jmq.util.timer.TimerThread.mainLoop() @bci=213, line=476 (Compiled frame)
- com.sun.messaging.jmq.util.timer.TimerThread.run() @bci=7, line=410 (Interpreted frame)


Thread t@7: (state = BLOCKED)


Thread t@6: (state = BLOCKED)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Interpreted frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=132 (Interpreted frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159 (Interpreted frame)


Thread t@5: (state = BLOCKED)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait(long) (Interpreted frame)
- java.lang.Object.wait() @bci=2, line=474 (Interpreted frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Interpreted frame)
 
Old 06-06-2008, 06:56 AM   #10
Hex_uk
LQ Newbie
 
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5

Rep: Reputation: 0
Ah, useful, I'll remember that one.

Ben.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Image won't show - JAVA, complete code Nimoy Programming 5 11-01-2007 12:10 PM
how to show phtos(.jpg,.png etc) using java pranith Programming 1 01-08-2005 01:04 PM
show me a site:Java alaios Programming 3 06-15-2004 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration