7 Replies Latest reply on Dec 22, 2010 6:24 AM by 702994

    How to check  Memory Usage of Weblogic Server


      Ours is a small company can;t afford licence for JProbe or any other commercial tool .
      Please tell me still is it possible to check the memory usage of the server increasing over time?

      Our J2EE application hangs in middle .
      Thanks in advance .

      Edited by: user672373773 on Dec 13, 2009 2:25 AM
        • 1. Re: How to check  Memory Usage of Weblogic Server
          Jay SenSharma MiddlewareMagic

          Option 1).
          You can use JMX code to Monitor the Heap Usages of your Application Server in the Runtime...as well as you can send some E-Mail alert codes also in it.

          Here is a Sample for it: (This Simple code can monitor Every thing you want Like JMS/JDBC/ThreadPoolStatistics/*JVM runtime Statistics*)



          Option 2). You can use WLDF feature provided as part of WebLogic for Automatic Watch and Notifications.


          Jay SenSharma
          http://jaysensharma.wordpress.com (WebLogic Cool Stuff)

          Edited by: Jay SenSharma on Jan 7, 2010 3:04 PM
          • 2. Re: How to check  Memory Usage of Weblogic Server
            Faisal WebLogic Wonders
            You will have to use ur own logic to implement it in WLST.. like loopinng, getting server names.. and performing some task in heap size is beyond certain threshold...

            you can get the heap size for one server in the followin way..

            heapSize = cmo.getHeapSizeCurrent()
            print heapSize
            • 3. Re: How to check  Memory Usage of Weblogic Server

              In addition to the above posts, I would like to add two more options:
              1. You can use JConsole(which is free), which will come along with Sun JDK and you can find this inside the jdk/bin .
              2. You can even try using the Administration console Monitoring tab for heap usage and threads usage information.

              • 4. Re: How to check  Memory Usage of Weblogic Server
                Hi Sreedevi

                I found the Jconsole under jdk/bin. Can you please tell me how to use that. Is it a GUI based console or just a command line monitoring tool.

                PC i
                • 5. Re: How to check  Memory Usage of Weblogic Server
                  JConsole is GUI based and you may refer following links for more details:


                  Hope this helps.

                  • 6. Re: How to check  Memory Usage of Weblogic Server
                    What platform are you on?

                    If the server is linux/unix then you will need to do some X or sit at the console on the server(asuming running a X manager) and just
                    <path to jconsole>jconsole &

                    If windows server you can do the same sit at console, RDP, or I use Xming....(unix server) windows Terminal server....Xming will allow
                    you to login to unix/linux box and run jconsole....(remember to set your DISPLAY)

                    It works real nice...

                    You can also do Jconsole and connect to a remote server using IIOP/rmi.....but I haven't had much success getting that to
                    go...MBEAN browsing produces marshalling errors for size of tree...can see very little of the advertised MBEAN directory
                    • 7. Re: How to check  Memory Usage of Weblogic Server
                      below are the simple steps to know the jvm usage of your managed server:

                      if your os is unix flavour ...


                      2) java weblogic.Admin -url hostip:port -username weblogic -password weblogic GET -pretty -type JVMRuntime

                      output should be something like below :

                      MBeanName: "mydomain:Location=myserver,Name=myserver,ServerRuntime=myserver,Type=JVMRuntime"
                      CachingDisabled: true
                      HeapFreeCurrent: 221438512
                      HeapSizeCurrent: 265879552
                      JavaVendor: Sun Microsystems Inc.
                      JavaVersion: 1.5.0_15
                      Name: myserver
                      OSName: Windows XP
                      OSVersion: 5.1
                      ObjectName: myserver
                      Parent: myserver
                      Registered: true
                      Type: JVMRuntime