How to check the Memory consumtions and time taken by a Java Program??

HI all,
I want to know how to check for the Memory Usage of an XML Parser.
See, a product was developed completely in DOM parser and now I am replacing that thing with SAX Parser Completely, because the DOM parser was taking huge memory as u may have guessed.
BUt the thig is that, now I want to check how much memory is being taken by the SAX parser alone and DOM parser alone so that I can compare them.
Can anyone suggest me how to do that ???
Thanx in Advance
Kaushik

Thanx boss ..thanx a lot
I tried that, but in the API docs, it is mentioned that freeMemory()Returns the amount of free memory "in the system"
and totalMemory() Returns the total amount of memory in the "Java Virtual Machine".
So if I compare both the Values then would it give the Correct result to me ???? Beacuse the freeMemory() gives the data in terms of the Host System whereas totalMemory() provides the data in terms of Java Virtual Machine ..... are they Same ?????
I think I am clear in explaining what exactly is going on my mind ...
Please clarify
Thanx again
Kaushik

Similar Messages

  • How to check the memory and CPU usage on NPU

    Hi expert ,
    Could you tell me how to check the memory and cpu usage on NPU?
    I think ASR1000 has this command (show platform hardware qfp active...) , but I coudn't find the same command on ASR9001.
    I checked " show controllers np counters all"  command, but I did not find it.
    Platform: ASR9001
    version: 4.3.2
    NP: Tyhoon
    Thanks,

    Hi Kanako,
    understand your question, but something like that doesnt exist for the trident/typhoon NPU's for the asr9k.
    in fact cpu usage is not really applicable for parallel/serialized hardware forwarders, but mainly the KPI is here
    the PPS it handles.
    The max pps it can handle is dependent on feature set.
    What you could do is measure the rates on the PARSE_FABRIC_RECEIVE count (packets received from fabric, so egress direction), PARSE_ENET_RECEIVE count (packets received from the interface to the fabric, so ingress) and the LOOPBACK count, that is packets that are recirculated for extra processing. The sum of these 3 gives an idea of the PPS rate the NPU is working on.
    Memory consumption is something tricky also, there are many memories attached to the NPU, notably:
    TCAM used for vlan matching, ACL and QOS matching
    Search memory for L2 and L3 (shared on Trident, separated on Typhoon)
    Frame memory for packet bufferin in QOS
    Stats memory, for all kinds of counters of QOS maps, interface stats etc
    their usage is rather dynamic also.
    The few things you want to verify on these are:
    - ACL usage (in terms of Tcam entries)
    - MAC table size (2M max on typhoon)
    - FIB size (4M max on typhoon)
    frame memory is dependent on the buffering, which is a sum of all the packets instant queue length and size of all pmaps attached to interfaces served by the same NPU. there is no good overview as to how much you have available of that, but it has a rather significant size 1G or 2G depending on the TR or SE cards (typhoon specific).
    regards
    xander
    Xander Thuijs CCIE #6775
    Principal Engineer 
    ASR9000, CRS, NCS6000 & IOS-XR

  • How to get the client date and time ?

    Dear Sirs...
    Using jdeveloper 10.1.2.0
    How can i get the client date and time using the HttpServletRequest ?
    thanks for any help in advance
    best regards

    If your code is running on the client pc you can just create a new instance of the java.util.Date class. That class automatically defaults to the current time of the client machine. Otherwise if you're running the code on the server, you could insert/post the client date/time by adding its string representation as a parameter to the HTTP request object.
    Ronald

  • How to get the current data and time of SCOM server via SCOM SDK (API) calls?

    Hi,
    I need to read the current date and time of SCOM server via SOM SDK.
    Is there a class in SDK that provides this info ?
    Thanks,
    satheesh

    To get time and date of Alerts of SCOM, You can use following command let "get-scomalert"
    Also, You can refer below links
    http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

  • How to display the current Date and time in xslt version 1

    i am using xslt version 1 .i want to display the current date and time in the output xml using xslt(Jdeveloper) ..i just added the namespace xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
         xmlns:ns1="urn:oracle:integration:b2b:7D30046DC68A4FA689956D8241FA3B99">
    and used thsi function <xsl:value-of select = "xp20:current-date()"/>
    but it does not works for me ..help needed????
    Edited by: user9519185 on Jan 20, 2009 3:04 AM

    Use a formula: =NOW()
    Format the cell for Date and Time, with both the Date part and the Time part displayed. Format the two parts as you wish, using the choices in the Inspector's menus.
    The cell will update each time the table is recalculated.
    (Description is for Numbers '09 (Mac), Numbers for iOS will be similar, but not necessarly identical in details.)
    Regards,
    Barry

  • How to check the DHCP lease remaining time

    Hello Community,
    I am troubleshooting a connectivity issue on my Macbook pro which APPARENTLY ignores the DHCP ACK messages sent in reply to Unicast DHCP Requests (the ones sent when T1 timer expires at 50% of the lease time) from a particular DHCP server.
    Do you happen to know the command which shows the current remaining lease time for the assigned DHCP IP address? I need that to confirm my assumptiom.
    By checking in the /leases folder you may only see the original lease Start date, which is the time the initial DHCP DORA process took place. When the 'refresh' DHCP requests are sent after 50% of the lease, and consequently the DHCP ACKs from the server are received the value in that file does not change. That means that this command is not good to check what I need.
    I.e.:
    xxxxxxx-mac:db xxxxxxi$ sudo cat /private/var/db/dhcpclient/leases/en1-1,<omitted-MAC>
    Password:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>IPAddress</key>
              <string>192.168.1.14</string>
              <key>LeaseLength</key>
              <integer>600</integer>
              <key>LeaseStartDate</key>
              <date>2012-03-02T09:16:14Z</date>
              <key>PacketData</key>
              <data>
              AgEGAKA9KL0AAAAAAAAAAMCoAQ7AqAEBAAAAAAAmuxA9XwAAAAAAAAAAAAAAAAAAAAAA
              AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
              AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
              AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
              AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjglNjNQEFNgTAqAEBMwQAAAJY
              AQT///8AAwTAqAEBBgTAqAEBDwRob21lKgTDDQGZ/wAAAAAAAAAAAAAAAAAA
              </data>
              <key>RouterHardwareAddress</key>
              <data>
              6L6BA24U
              </data>
              <key>RouterIPAddress</key>
              <string>192.168.1.1</string>
    </dict>
    </plist>
    Even when a subsequent DHCP ACK message is received that value remains unchanged.
    I need a command or application which shows instead the actual lease timer.
    thanks,
    Riccardo

    apparently I am not getting lucky by putting the question this way.. let me try another approach giving more background details.
    PROBLEM:
    When I am in a particular location my mac get disconnected from the network every 30 minutes when my DHCP IP address expires. The DHCP server grants 30 minutes IP leases only.
    I took some capture (I sniffed DHCP transactions) and I could see that when 50% of the lease time is reached (T1) my mac sends a new unicast DHCP request to the DHCP server which replies immediately with a DHCP ACK confirming 30 more minutes.
    Unfortunately I did not find any command to see if the lease gets actually extended.
    What I see is that after few minutes (matching the 87.5% T2 timer) my match fires a new DHCP request, which is also answered immediately with a ACK. Then in the last minutes before the 30 minutes threshold I see many other requests which are also all answered. Nevertheless when the origianal 30 minutes lease expires my MAC releases the IP and start a new Discovery process (sending a bcast request). After few seconds the DORA process completes and usually the mac gets the same IP address. The issue for me is that in the meantime my VPN session to my corporate network goes down and all the services associated with that go down too (softphone, presence, chat, email etc).
    I did some test in my place and I configured my DHCP server to assign IP addresses with a 30 minutes lease time too. Strangely the issue does not happen. On my place every 15 minutes (again the famous T1 timer = 50% of the lease) my mac sends a request and the DHCP replies with an ACK. This time apparently the lease gets extended as I don't see all the other requests. Needless to say that the IP does not get released at any time.
    I compared the wireshark capture to spot any difference between that DHCP ACK I got in that given location and the one I got in my place but they look the same to me.
    So the question is, how would you troubleshoot this issue? Which kinds of logs, outputs or debugs should I take?
    thanks,
    Riccardo

  • How to detect the iPhone Date and Time

    Hi guys,
    I am new this plateform and I am working on an iPhone application in Objective-C. I need to detect the date and time of iphone clock in the objective-c.
    Please let me know if anybody knows how can I do it.
    Thanks,
    Ranjit Singh

    Ranjit,
    Be sure to consult the docs for the iPhone SDK. If you are running the simulator, you probably have access to frameworks and classes not available on the phone itself. The iPhone docs don't show NSCalendarDate as a valid class for iPhone (but it exists for MacOS). I think you'll need to use NSCalendar if you wish to have it run on the device (and not just the simulator).
    Do you have a device you are testing on? It would be good to verify this (I don't and therefore must use the simulator).
    Cheers,
    George

  • How to set the system date and time in LabVIEW 6i?

    Hi,
    How can I set the time of the computer from Labview 6i? Is there any function to do this?
    Thanks.

    Arnau wrote in message news:<[email protected]>...
    > Hi,
    >
    > How can I set the time of the computer from Labview 6i? Is there any
    > function to do this?
    >
    > Thanks.
    Not natively that I know of. You could use a LabVIEW DLL call to link
    to a Win32 API call which sets the date and time. You would need to
    have privileges to do it.
    Doug D.
    [email protected]

  • How to check the OLite version and isntalled patches?!

    Hi,
    A couple of months ago we installed the consolidated patch 9535503 in the Mobile Server version (10.3.0.2.0). All the clients (WIN32) were supossed to make a synchronization with mSync.exe and install the patch when exit the sync (similar to first installation)
    There is now a client which faces the same bug (or this looks like) and i don't know how to check if it is possible to check if the above patch has been installed in the client or not.
    Any idea?
    Thanks in advance...
    Tomeu

    the device manager should be running, if not start it up. the client version should be on the main display screen, and you can see the individual component versions in file>version
    If it is patches you are looking for, open the polite.ini file and there should be a section at the end [DMC.UPDATE] that should show the installed patches

  • Testing time taken by a Java Program

    Dear all,
    Would the following code suffice in getting a good average running time of a Java program.
    long start, end;
    float seconds;
    long counter = 0;
    start = System.currentTimeMillis();//get starting time
    while((System.currentTimeMillis() - start) < 100000){
    //call your program
    counter++;
    end = System.currentTimeMillis();
    seconds = (end - start)/1000;
    System.out.println("seconds :- " + seconds +" counter:- " + counter );
    System.out.println("Average time:- " + (seconds/counter));
    Thanks in advance for any help

    well.. what pops out immediatly is that you didnt calculate first how long the loop itself takes.
    meaning.. in the time result that you get, there are also all the loop operations.
    measure an empty look running the same number of times and reduce it from your result.
    by the way, do you know an easy way to decide if a string can be a valid class name?

  • How to print the current date and time?

    Hi Friends!
    I have tried this program to print the current time and date,
    #include <iostream>
    #include <time.h>
    using namespace std;
    int main()
    time_t tim;
    time(&tim);
    cout << ctime(&tim);
    return 0;
    But it show the warning as;
    warning C4996: 'ctime': This function or variable may be unsafe. Consider using ctime_s instead.
    Can anyone suggest whats wrong with this?

    i also got many warring when i use old version keyword. as i note on think thatin new vc++ has many keyword change with _s. the old keyword works even get warring.or you can change to as it suggest.For About ctime_s
    Check this link for more detail (RefLink)
    No, it shows error, when you use ctime_s instead of ctime.
    error C2660: 'ctime_s' : function does not take 1 arguments

  • How to get the system date and time using java

    hi,
    I want system date in my out put. how to access system date. can v use utill packaegs (or) sql. which one is the best to get.
    Thanks & Regards,
    Kenny.

    import java.util.Date;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    public class MyClass {
    public void setTimeStamp() {
    int hour, minute, second, time = 0;
    Date dt=new Date();
    System.out.println(dt.getDate());
    System.out.println(dt.getMonth());
    System.out.println(dt.getYear());
    Calendar cal = new GregorianCalendar();
    hour = cal.get(Calendar.HOUR_OF_DAY);
    minute = cal.get(Calendar.MINUTE);
    second = + cal.get(Calendar.SECOND);
    System.out.println (hour + ":" + minute + ":" + second);
    public static void main (String args[]){
    MyClass app = new MyClass();
    app.setTimeStamp();
    }

  • How to check the maximum Value and Last value in Reports CP column

    Hi all
    First of all i am sory that iam posting this question in forms instead of Reports....i had posted it in reports but no one reply and i need uirgent solution so I post here....
    My problem is that in Report I have calculated some values in CP column......Like
    :CP_Total := :Frieght * Rate ...etc
    Know i want to ask that how can I get the last value that will be return the by this column????and also the maximum value that it will return
    Thanks in advance
    Shayan
    [email protected]

    You mast build Summary column out of the query and select maximum to your maximum value of CP in Report level (or last for last value).

  • How to check the contents of my time capsule back up

    My new Time Capsule has treid to back up my MAcBook since yesterday. In the Time MAchine list, I can find the folder but not the size of the back up or any other details which files etc. were backed up. The symbol in the upper part oif the sreen (what is hte name) is working or not.
    Time Capsule is also quite hot.
    I have connected the Time Capsule with ethernet to MacBook, not to my modem. Is that correct?
    BR maritafromhelsinki

    You also access it from the finder just double click on the time machine icon then you can see the backups on the drive right click on a backup and select get into.  Or you can open airport utility and click on the manual button, when your get to the next screen click on the disk up top then click on the time capsule in the window it will get you info.

  • How to check the spool info

    Hello
    kindly let me know how can i check how much portion of the spool is currently occupies (So that when its getting filled , we will be able to manually delete the spool)
    - How to check the free percentage and configured amount of spool
    regards

    HI,
    How is that?
    How to check the SPOOL capacity
    Seems to be duplicate!!!
    Regards,

Maybe you are looking for

  • Regarding Updating Purchase order status

    Hi, Could any one tell me how we relate equipment(IE02/IE01-EQUNR) with purchase order(AUFK-AUFNR). how we will find that for a single equipment how many purchase orders are existed. and i want to update user status in purchase order could any one te

  • Polite use of these forums

    To Apple Community Forum Moderators: I have owned Apples for almost twenty years and periodically have found myself in need of advice on an Apple hardware issue, network compatibility, or Apple Application issue. The Apple website “recommends” that w

  • What do I do if I forgot my answers to my security questions??

    What do I do if I forgot my answers to my security questions??

  • To set up SS Native client

    Hi, I'm to set up Sql server 2008 Native client on Win 2012 server, but I did get this PS C:\Users\Administrator> choco install sql2008r2.nativeclient choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or opera

  • Premiere Shortcut Keyboard - Beta Testers Required

    Hey Guys, It's Mark from Editors Keys. (We're the company which produces the colour coded shortcut keyboards for Adobe Premiere.) We're currently working on our new shortcut keyboard for Adobe Premiere CC and we would love to get the opinion from som