This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Is it possible to get some information (like the server status (active/inactive), number of active sessions, number of threads & their states) from Weblogic server? I want to get these information programmatically from a Servlet running in another Weblogic server. How can I achieve this? Weblogic version we use is 5.1.
I'm not sure about 5.1, but 6.x and 7.x let you access all of that information via JMX. The hard way is to write a JMX client directly. The easy way is to execute their admin tool to run JMX commands and then parse the results. Also, there's an SNMP interface which may have the same info (never played with it too much). You might want to poke around the 5.1 docs and see if either of these are options for that version.
<a href="http://www.javaranch.com/bookpromo.jsp" target="_blank" rel="nofollow">WebLogic Book Giveaway</a> 2/25-2/27
Joined: Mar 11, 2002
Thanks for the replies. Figured out how to get the status of the server (using the ping() method in AdminServicesDef class) But looks like I can't get the information regarding the session & thread details. Another question: Based on which parameters should I decide the load on the server? Should I look for the number of active threads? waiting threads? Memory? or something else? In other words, which factor(s) is (are) vital to decide whether the server is heavily loaded? [ February 28, 2003: Message edited by: R Manivannan ]
Joined: Feb 25, 2003
I'd say that's up to you. You might care if the memory usage gets high, but that's not necessarily an indication of load -- one request can churn through gobs of memory, leaving several CPUs unused, but maybe you want to know how the memory usage is doing for some reason. Active threads is certainly a good indicator, as the threads aren't active unless some sort of request processing is going on. But how many is "too many" depends on the number of CPUs, the number of execute threads/reader threads (see the other message board thread where those settings are being discussed), and so on. Waiting threads doesn't tell you much, except insofar as it's a zero sum game with the active threads. WebLogic tracks stalled or locked threads too, which is really a sign of application problems (or I/O problems or something) more than load, but may be of interest depending on what you're doing.