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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
06-05-2008, 02:53 AM
#1
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:
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?
06-05-2008, 04:26 AM
#2
LQ Newbie
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5
Rep:
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.
06-05-2008, 05:10 AM
#3
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:
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?
06-05-2008, 06:13 AM
#4
LQ Newbie
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5
Rep:
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.
06-05-2008, 07:01 AM
#5
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:
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?
06-05-2008, 07:02 AM
#6
LQ Newbie
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5
Rep:
Hi,
My DISPLAY is set to :0.0
Ben.
06-05-2008, 07:06 AM
#7
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:
I was afraid you were going to say that....
06-05-2008, 07:10 AM
#8
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:
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 07:12 AM .
06-06-2008, 05:44 AM
#9
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:
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)
06-06-2008, 05:56 AM
#10
LQ Newbie
Registered: Jun 2008
Location: UK
Distribution: Mandriva 2008.0
Posts: 5
Rep:
Ah, useful, I'll remember that one.
Ben.
All times are GMT -5. The time now is 02:29 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News