How to get memory usage of the JVM...

Hi,
I want to know the total amoutn of memory used by the JVM, while I am doing some particular transaction over my web application.
One way is to use the methods in java.lang.Runtime. But the output seems to be fluctuating to a significant extent.
Is there an alternative way to accomplish the same.
TIA,
Basu.

Complie with the setting -verbose:gc,
whenever the GC runs, it prints out the acutal amount of mem originally used, the amount used after GC and the JVM mem usage.

Similar Messages

  • How to get CPU usage in the app?

    Is there any api that can get CPU usage through the code in an iphone app, thanks.

    Maybe you could use getloadavg():
    double la[3];
    getloadavg(la, 3);
    NSLog(@"%f - %f - %f", la[0], la[1], la[2]);

  • Is there any Vi for getting the CPU and Memory usage of the Local as well as Remote System

    Is there any Vi for getting the CPU and Memory usage of the Local as well as Remote System

    Find the attachment(LV8.5) for local machines. 
    You can use shared variables to monitor the remote machine's usage.
    Attachments:
    Task Monitor 85.vi ‏25 KB

  • How to limit the maximum memory used by the JVM

    Dears
    we enabled sybase webservice and started it , and now find the process is running much memory,
    how could I limit the maximum memory used by the JVM ?
    aidcd02:/> prstat -p 8164 -p 17768
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP      
      8164 sybase   1079M  848M sleep   59    0   0:10:44 0.0% java/30  
    aidcd02:/> pargs 8164
    8164:   /sybase/shared/JRE-6_0_24/bin/java -Dsybase.home=/sybase -Docs.home=OCS-15_0 -D
    argv[0]: /sybase/shared/JRE-6_0_24/bin/java
    argv[1]: -Dsybase.home=/sybase
    argv[2]: -Docs.home=OCS-15_0
    argv[3]: -Dcom.sybase.ase.ws.libtcl=
    argv[4]: -classpath
    argv[5]: /sybase/WS-15_0/lib/axis.jar:/sybase/WS-15_0/lib/jaxrpc.jar:/sybase/WS-15_0/lib/saaj.jar:/sybase/WS-15_0/lib/commons-logging-1.0.4.jar:/sybase/WS-15_0/lib/commons-discovery-0.2.jar:/sybase/WS-15_0/lib/log4j-1.2.4.jar:/sybase/WS-15_0/lib/wsdl4j-1.5.1.jar:/sybase/jConnect-6_0/classes/jconn3.jar:/sybase/jConnect-6_0/classes/jTDS3.jar:/sybase/WS-15_0/lib/xercesImpl.jar:/sybase/WS-15_0/lib/xmlParserAPIs.jar:/sybase/WS-15_0/lib/server.jar:/sybase/WS-15_0/lib/sqlx.jar:/sybase/WS-15_0/lib/flexlm.jar:/sybase/WS-15_0/lib/servlet-api-2.5-20081211.jar:/sybase/WS-15_0/lib/jetty-6.1.22.jar:/sybase/WS-15_0/lib/jetty-sslengine-6.1.22.jar:/sybase/WS-15_0/lib/jetty-util-6.1.22.jar:/sybase/WS-15_0/lib/tools.jar:/sybase/WS-15_0/lib/jcert.jar:/sybase/WS-15_0/lib/jnet.jar:/sybase/WS-15_0/lib/jsse.jar:/sybase/WS-15_0/lib/jce1_2_2.jar:/sybase/WS-15_0/lib/sunjce_provider.jar:/sybase/WS-15_0/lib/ws.jar:/sybase/shared/lib/dsparser.jar:/sybase/WS-15_0/props:/sybase/WS-15_0/producer/WEB-INF
    thanks.

    You can limit the maximum memory used via command line options to the VM.
    Noting of course that typically if you are in fact actually using that memory that reducing it is going to have some negative impact on your application including catastrophic failure.
    Conversely if the application is not in fact actively using that memory then limiting it just because some tool reports that the OS has reserved it then limiting it is pointless. 

  • Memory leak in the JVM leading to system oom

    Hi,
    We are running application server using java 1.5, tomcat 5.5 ...
    The problem is that the JVM is allocating memory continuously.
    If we look at the JVM memory from JConsole everything is OK the amount of memory allocated in the heap does not grow significantly.
    If we look at the JVM memory consumption from the system perspective, the memory usage is growing until the system runs out of memory and kill the JVM. The JVM memory usage goes beyong 1.5 Go of memory whatever options you use when launching the JVM.
    The memory allocation is so intense that it can lead to a crash in few hours with very few users connected to the application.
    We have tried JDK 1.5.05 and 1.5.06 still the same.
    We are running on a Linux Debian system wth a 2.6.8 kernel.
    Any idea of where all this memory goes ?
    Any idea on how to track and solve this memory leak ?

    Hi Martinux,
    Tiger and Mustang come with a number of diagnosing tools that could help
    you spot memory problems. In particular there's something called 'jmap' which can
    take a snapshot of the JVM memory.
    Danny Coward has recently written a nice blog to emphasize the existence
    of this new tools - see
    "Crash Course: Java SE Monitoring, Management and Troubleshooting"
    http://blogs.sun.com/roller/page/dannycoward?entry=crash_course_java_se_monitoring
    Of course if the problem isn't in the JVM...
    BTW: you did also look at the non-heap memory, right? and also at the total
    number of loaded classes?
    hope this helps,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/roller/page/jmxetc

  • How to capture memory usage for web application

    In OATS openscripts, how to capture memory usage for web application? Does it have the exisitng java method that we can call to get the memory data (e.g. peak bytes, private bytes) consumed by web application?

    JProbe

  • Getting memory usage details in ABAP program

    Hello,
    Is there any method to get the memory used by the program and control the program like restricting the memory usage to some limit or any other control measures which can be taken in the program itself if the memory usage by the program exceeds a maximum limit. Or kindly let me know where i can find the details.

    Hi,
    > Is there any method to get the memory used by the program
    investigate the methods of class cl_abap_memory_utilities (e.g. GET_TOTAL_USED_SIZE)
    >and control the program like restricting the memory usage to some limit
    report rsmemory can change the systemwide quotas
    >or any other control measures which can be taken in the program itself if the memory
    >usage by the program exceeds a maximum limit
    needs to be implemented manually if neede program specific...
    Kind regards,
    Hermann

  • How to monitor memory usage of "Memory-based Snapshot" executable (MRCNSP)  in Linux?

    We have noticed in the past that MRCNSP/Memory-based Snapshot program executable consumes around 3.8 GB of memory on the linux VM. I understand that value change planning  is 32 bit executable so 4 GB is the limit. I want to monitor the memory usage of the executable when the program runs. The program usually runs overnight. I wanted to check with you experts if you have any MRP executable memory usage monitoring script that I could use.
    I found the metalink note OS Environment and Compile Settings for Value Chain and MRP/Supply Chain Planning Applications (Doc ID 1085614.1) which talks about "top -d60 >>$HOME/top.txt". Please share your ideas for monitoring this process.
    We do not use Demand Planning or Demanta or Advanced Supply Chain Planning which are 64 bit application. That is our future direction.
    Environment:
    EBS : R12.1.2 on Linux. The concurrent manager is on 64 bit linux VM, web services on 32 bit VMs.
    DB: Oracle DB 11.2.0.3 on HP UX Itanium 11.31. Single database instance.
    Thanks
    Cherrish Vaidiyan

    RAM on the controller is not the same as the C: drive. With respect to the controller, you can think of it in the same terms as your computer. RAM is volatile memory and your C: drive is non volatile flash memory.
    Depending on the frequency of the temperature excursions above and below your 70C threshold, the service life of the controller and the method you used to append to the file, there could be a number of issues that may creep up over time.
    The first, and the one you brought up is the size of the file over time. Left unchecked this file could grow continuously until the system literally runs out of flash memory space and chokes. Depending on how your are appending data to this file, you could also use more than a trivial slice of processor time to read and write this big file on disk. While I have not personally ever run one of the RT controllers out of "disk space", I can't imagine that any good could come of that.
    One thought is to keep a rolling history of say the last 3 months. Each month, start a new file and append your data to it during the course of the month. Each time a new file is created, delete the data file from something like 3 months ago. This will ensure that you will always have the last 3 months of history on the system, however the monthly deletion of the oldest data file will limit you to say 3 files at whatever size they happen to be. Unless there are hundreds of thousands of transitions above and below your threshold this should keep you in good shape.
    I also eluded to the method you use to write to this file. I would ensure that you are appending data using the actual file functions and not first reading in the file, appending your data as a string then writing the entire file contents back to disk. In addition to causing the highest load on the file system this method also has the largest system RAM requirements.

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • I deleted most visited, latest headlines, getting started, yahoo, youtube, apple in mozilla's folder,how to get it back like the first time i installed? thx

    i deleted most visited, latest headlines, getting started, yahoo, youtube, apple in mozilla's folder,how to get it back like the first time i installed? thx

    if you hid the menu bar and the navigation bar simply press the alt button, this will bring back the menu bar and form there you can right click and select which bars you want shown

  • How to get Open Balance for the year and Total Ending Balance?

    For a given account, how to get Open Balance for the year (Cumulative Ending Balance) and Total Ending Balance (Cumulative Ending Balance)?
    Is there any function module available? or should I read from some tables? Please advice.

    Hello Paul,
    You could try calling one of the following BAPIs - see which one meets your requirement. They are documented well so shouldn't be a problem finding out the correct one for your requirements.
    BAPI_GL_GETGLACCBALANCE      
    BAPI_GL_GETGLACCCURRENTBALANCE
    BAPI_GL_ACC_GETBALANCE      
    BAPI_GL_ACC_GETCURRENTBALANCE
    BAPI_GL_ACC_GETPERIODBALANCES
    BAPI_COND_VAL_DECRE_BALANCES
    You might have to put in some of your own logic after the BAPI call to get what you want.
    Hope this helps,
    Cheers,
    Sougata.
    p.s. Also look at FM FAGL_GET_ACCOUNT_BALANCE
    Edited by: Sougata Chatterjee on May 7, 2008 11:47 AM

  • How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    Use a normal question, and do not add the score to the total score. That will give you a correct score at the end. But the total number of questions, that system variable will still take into account all questions. You'll need a user variable, and calculate its value by subtracting 1 from the system variable cpQuizInfoTotalQuestionsPerProject. Same for the progress indicator if you want to show it?
    Customized Progress Indicator - Captivate blog
    If you want to allow Review, you'll have to tweak as well. You didn't specify the version, and all those questions I now mentioned.
    And my approach, since you talk about only one question: create a custom question, because you'll have total control then.

  • How to get boot camp in the emac

    how to get boot camp in the emac

    Furthermore, eMacs can only emulate the Windows environment, whereas Intel CPU Macs including the iMac you have running 10.6.8 can virtualize Windows.  Emulation is a poor man's solution, because software is used to replace functions that normally take place with hardware.  You can use the iMac to do any data conversion before it gets sent back to the eMac over a network.  See my FAQ* regarding Windows on the Mac:
    http://www.macmaps.com/macosxnative.html#WINTEL

  • Have a new PC desktop with 4 hard drives, new c, d and old c, d, My ipad library is in old c, how to get my itune open the right drive, it keeps on open in new c drive.

    Have a new PC desktop with 4 hard drives, new c, d and old c, d, My ipad library is in old c, how to get my itune open the right drive, it keeps on open in new c drive. It said my computer is not authorized. I want to move all the old c to the new c drive, or get the itune to open my old c drive when I log in.

    might be some help on one of these links.
    Windows - Change iPad default backup location
    http://apple-ipad-tablet-help.blogspot.com/2010/07/change-ipad-default-backup-lo cation.html
    Windows - Changing IPhone and iPad backup location
    http://goodstuff2share.wordpress.com/2011/05/22/changing-iphone-and-ipad-backup- location/
    Sync Your iOS Device with a New Computer Without Losing Data
    http://www.howtogeek.com/104298/sync-your-ios-device-with-a-new-computer-without -losing-data/
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive
    https://discussions.apple.com/docs/DOC-3141
     Cheers, Tom

  • HT4889 Replacing System hard drive with a new one. How to get everything over to the new boot drive?

    Replacing System hard drive with a new one. How to get everything over to the new boot drive? Should I use Carbon Copy or does apple have a better untility to do this?
    I can't get my current system drive (OSX 10.8.3) to start on the first try. I always have to shut down and restart again to finally see the Apple logo.
    Have used disc utility to repair the disc and permissions several times and that works. The next time I boot up, it works fine and I get the apple logo, but then the second time I boot up, it's back to the blank screen again and it only boots after the second try.  I have tried this repair three different times now always with the same result. Works right the first try (after the repair) then from the second time on it doesn't work. I just get the white screen until I reboot a second time.
    Thinking I should change drives but what's the easist and best way to move everything over to the new drive so it will boot correctly with all my data on it. This is the system drive for a Pro Tools 10HD setup. MacPro 3,1 with 16 gigs ram and OSX10.8.3 on it.
    Thanks for any help!

    If you have a time machine back up of your current drive you can do this
    Shut down your computer, install the new drive. While the computer is off plug in the external hard drive that you have your time machine back up on. Hold Option key while the computer turnes on, let go of the option key once you get a grey screen. Shortly after you'll see  a list of bootable drives, select the one that has your time machine back up on it and boot into that drive.
    From there go into disk utility, format your new drive too, osx extended journaled ( I think, double check that, its been awhile since ive had to do this), hit format
    Exit disk utility and then you can use time machine to copy all your exisit data to the new hhd and then your pretty much done.
    There is also a program called Carbon Cloner that will do esentially the same thing however I've never uesed it.

Maybe you are looking for