How to read system memory size, processor speed of a system

Hi all,
How to read system memory size, processor speed of a system and how to read how much of it are in use in a running system. (using java)
any help would be great.
-thanks

How to read system memory size, processor speed of a
system and how to read how much of it are in use in a
running system. (using java)Using Java: not at all. You'll need JNI.

Similar Messages

  • How to extend RAM memory size in Mac Book pro.

    Sir,
    I have Mac Book Pro.This system have 4 GB RAM only.but I need 8 GB RAM for install Window OS purpose.So How to extend RAM memory size in Mac Book Pro.
    Regards,
    M.Muthukumar

    http://support.apple.com/kb/HT1270

  • How to read system eventlog using java program in windows?

    How to read system eventlog using java program in windows?
    is there any java class available to do this ? or any one having sample code for this?
    Your friend Zoe

    Hi,
    There is no java class for reading event log in windows, so we can do one thing we can use windows system 32 VBS script to read the system log .
    The output of this command can be read using java program....
    we can use java exec for executing this system32 vbs script.
    use the below program and pass the command "eventquery"
    plz refer cscript,wscript
    import java.io.*;
    public class CmdExec {
    public static void main(String argv[]) {
    try {
    String line;
    Process p = Runtime.getRuntime().exec("Command");
    BufferedReader input =
    new BufferedReader
    (new InputStreamReader(p.getInputStream()));
    while ((line = input.readLine()) != null) {
    System.out.println(line);
    input.close();
    catch (Exception err) {
    err.printStackTrace();
    This sample program will list all the system log information....
    Zoe

  • How to read system evenlog using java program in windows

    How to read system evenlog using java program in windows???
    is there any java class available to do this ? or any one having sample code for this?
    Your friend Zoe

    Welcome to the Sun forums.
    >
    How to read system evenlog using java program in windows???>
    JNI. (No.)
    >
    is there any java class available to do this ? or any one having sample code for this?>You will generally get better help around here if you read the documentation, try some sample code and come back with a specific question (hopefully with an SSCCE included).
    >
    Your friend Zoe>(raised eyebrow) Thank you for sharing that with us.
    Note also that one '?' denotes a question, while 2 or more generally denotes a dweeb.

  • How can I check what the processor speed is

    We have an old white dome base iMac, running OSX 10.1  How can I check the processor speed - it is not available to choose in the 'about this Mac' dropdown?

    Turns out it is a mind blowing 40 MHz!
    Something read wrong. The slowest FP iMac was 700mHz.
    While in OSX, can you see if 10.1 has its own version of System Profiler? In newer OSX versions it's in Applications >Utilties.
    I jumped from OS9 to 10.2 so, like Eustace, can't remember what 10.1 has--or doesn't have.
    You can look dor the sticker/decal with the serial number. That usually gives the processor speed also:
    http://support.apple.com/kb/HT2994

  • How to get free memory size of a card with javax.smartcardio

    Hi,
    How can I find how much memory of a card is free with javax.smartcardio?
    Please your advice.
    Thank in advance.

    gizmo wrote:
    I wanted to read the free memory size with a card reader and javax.smartcardio.
    Is it possible to send a APDU Command to select the root 3F00 and read the properties?There is no built-in smartcardio funationality to do this. What you can do is send an APDU and get the memory by calling the code mentioned already.

  • How to Increase the memory size of a File in the Application Server

    Hello Abaper's
    I have generated a XML file for the data of  internal table (with 10 Records). When i download , i can see the XML file for the Entire 10 Records.
    But , while transferring the XML file to Applicationserver , it's  transferring only upto max 4 Records.I     assume that the memory is insufficient to  allocate 10  Records. Can we Increase the Memory size of the File on Application server. OR,  is there any error in My Source Code.
    Code i used to Transfer the XML File to Application server.
    OPEN DATASET FNAME FOR OUTPUT IN BINARY MODE.
    IF sy-subrc EQ 0.
       LOOP AT it_xmltab INTO wa_xmltab.
           TRANSFER wa_xmltab TO FNAME.
       ENDLOOP.
    ELSE.
      MESSAGE e004(zmsg5) WITH 'File FNAME not opened'.
    ENDIF.
    CLOSE DATASET FNAME.
    Regards
    Jv

    Hi,
    DATA : filename TYPE rlgrap-filename.
    DATA : doc_name TYPE char30.
    DATA : bin_size TYPE i.
    SELECT matnr matkl meins
           FROM mara INTO TABLE it_mara
           UP TO 10 ROWS.
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
      EXPORTING
        i_filename           = filename
        i_xml_doc_name       = doc_name
      IMPORTING
        pe_bin_filesize      = bin_size
      TABLES
        i_tab_sap_data       = it_mara         "  contains  10 Records
      CHANGING
        i_tab_converted_data = it_xmltab.
    placing XML File in Appl. Server
    DATA : FNAME(60) VALUE 'xyz_File'.
    DATA : num TYPE i.
    DATA : xmldata(256) TYPE x.
      For Writing The data in Application Server
    OPEN DATASET FNAME FOR OUTPUT IN BINARY MODE. " ENCODING DEFAULT.
    IF sy-subrc EQ 0.
      LOOP AT it_xmltab INTO wa_xmltab.
        TRANSFER wa_xmltab TO FNAME.
      ENDLOOP.
    ELSE.
      MESSAGE e004(zmsg5) WITH 'File FNAME not opened'.
    ENDIF.
    CLOSE DATASET FNAME.
      For Reading The data in Application Server
    OPEN DATASET FNAME FOR INPUT IN BINARY MODE. " ENCODING DEFAULT.
    DO.
      IF sy-subrc EQ 0.
        READ DATASET fname INTO xmldata.
        WRITE :/ xmldata.
        Clear xmldata.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    CLOSE DATASET FNAME.
    at runtime i can see   
    it_mara  --> contain 10 records
    it_xmltab --> contain 7 lines (Each line size is 255 char). This table have XML format data,  (unknow format , with all numeric 
                        digits)
    it_xmltab is trasferred to application server , but the xml format is generated upto 4 records, and for the remaining records
    the XML format is not generated.
    the XML data in application server file is
    <?xml version="1.0"?><TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY1</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">PC
    </MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">0-BUY2</MATNR><MATKL Datatype="C" Length="18">012</MATKL><MEINS Datatype="C" Length="6">
    PC </MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000001</MATNR><MEINS Datatype="C" Length="6">EA</MEINS>
    </TY_MARA><TY_MARA><MATNR Datatype="C" Length="36">000000000000000002</MATNR
    Regards
    JV

  • How to calculate OS memory size in java?

    I want to calculate free memory size , when I tried by Runtime class
    like this Runtime.getRuntime().freeMemory() it gives JVS free memory size
    But I want OS free memory size
    If anybody know then plz reply me ASAP

    Since the question was asked the last time (yesterday afternoon), I don't think Java has changed much, so the answer is still: you can't do it with Java.

  • How to read music file size?

    I have the third generation iPad. I've sync'd (via iTunes of course) a CD album in Apple Lossless and another CD album in AIFF. Most other audio that have already been sync'd is in MP3 format.
    So how can I see the file size of each song in the iPad?

    Well that's how to see the file size in iTunes. But I'm concerned (suspicious actually) that there's some background modification or something after getting sync'd with the iPad.
    So I'm curious about how to see the file size of each song IN THE iPAD directly.
    Or not possible?

  • How to query the tablespace size increment speed?

    Hello,
    Do you have any directions or ideas on how to know the tablespace size increments history. or how to know the frequency of tablespace size increment.
    when I went into new database, I never managed this database before, i want to know the tabelspace size increments speed for do the reasonable space extend.
    so could you please give us a guide thanks!

    RLUO wrote:
    Hello,
    Do you have any directions or ideas on how to know the tablespace size increments history. or how to know the frequency of tablespace size increment.
    when I went into new database, I never managed this database before, i want to know the tabelspace size increments speed for do the reasonable space extend.
    so could you please give us a guide thanks!Hi, there good way is using DBMS_SPACE.OBJECT_GROWTH_TREND as Rajesh mentioned that.But also you can use some AWR views to getting this information.Seee below link.
    tablespaces' growth trend

  • How to read phone memory of E51?

    I have bought E51.It have inbuilt file manager software which can read memory on memory card and phone memory.But the problem in reading phone memory is that it only raeds messages,contacts,calenders etc.It does not read or show memory occupied by installed softwares and other files.How to see them or do I need any software to read it?
    My phone shows 16MB occupied memory but none can be seen under file manager software.
    My next question is even if I installed softwares on memory card some phone memory is used.Is it normal event or something is wrong in my E51?

    Dial  *#7370#  followed by 12345 (default Code unless changed by you) when prompted ..
    You may also perform a Hard Reset by 
    Press and hold GREEN + RED + CAMERA keys while powering up. ..Keep the keys pressed until you see the Nokia Logo

  • 32gig Memory on Macpro 8 Core - How to use it all the memory and processor speed

    Hello Everyone,
    I was wondering if any of you out there know a way to have my Mac Pro use more of the memory it has. I have 32gig of memory and I would like to have it use more processor power and memory if possible. I am aware you can use the "renice -10 -p PIDNUMBER"
    How can I make it use more of the processors and memory my machine has. Ex. Running Photoshop or Final Cut, Imovie etc.

    Using the Unix nice command raises the priority of a process, but software will use the amount of memory it needs.  You cannot make a program use memory it does not need.  Same with processor cores, if software is written to use only one processor or core you cannot make it use more, the software has to be designed for multi-threading to do that.

  • How to determine the Memory size of my computer?

    I need to find a way to determine how much computer RAM i have left. I was suggested to use System class methods like "Runtime.getRuntime().getFreeMemory()", and I need to determine how much Memory I need to use when I launch Java VM with Xmx option.
    I wonder if there is more detail I need to know at this moment? If this question is more suitable in Java VM forum, please let me know.

    This is a slightly messed version of the one in the J2D Demo, use JFrame.add(new MemoryMonitor());
    I'm not entirely sure if it'll work straight off since I messed with it but it should, all the memory stuff is hidden away there somewhere even if it won't.
    Shish
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.awt.geom.Line2D;
    import java.awt.geom.Rectangle2D;
    import java.util.Date;
    import javax.swing.*;
    import javax.swing.border.EtchedBorder;
    import javax.swing.border.TitledBorder;
    public class MemoryMonitor extends JPanel {
        static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp");
        public Surface surf;
        JPanel controls;
        boolean doControls;
        JTextField tf;
        public MemoryMonitor() {
         note=n;
            setLayout(new BorderLayout());
            setBorder(new TitledBorder(new EtchedBorder(), "Memory Monitor"));
            add(surf = new Surface());
            controls = new JPanel();
            controls.setPreferredSize(new Dimension(135,80));
            Font font = new Font("serif", Font.PLAIN, 10);
            JLabel label = new JLabel("Sample Rate");
            label.setFont(font);
            label.setForeground(Color.black);
            controls.add(label);
            tf = new JTextField("1000");
            tf.setPreferredSize(new Dimension(45,20));
            controls.add(tf);
            controls.add(label = new JLabel("ms"));
            label.setFont(font);
            label.setForeground(Color.black);
            controls.add(dateStampCB);
            dateStampCB.setFont(font);
            addMouseListener(new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                   removeAll();
                   if ((doControls = !doControls)) {
                       surf.stop();
                       add(controls);
                   } else {
                       try {
                           surf.sleepAmount = Long.parseLong(tf.getText().trim());
                       } catch (Exception ex) {note.alert(ex);}
                       surf.start();
                       add(surf);
                   validate();
                   repaint();
        public void start() {
         surf.start();
        public class Surface extends JPanel implements Runnable {
            public Thread thread;
            public long sleepAmount = 1000;
            private int w, h;
            private BufferedImage bimg;
            private Graphics2D big;
            private Font font = new Font("Times New Roman", Font.PLAIN, 11);
            private Runtime r = Runtime.getRuntime();
            private int columnInc;
            private int pts[];
            private int ptNum;
            private int ascent, descent;
            private float freeMemory, totalMemory;
            private Rectangle graphOutlineRect = new Rectangle();
            private Rectangle2D mfRect = new Rectangle2D.Float();
            private Rectangle2D muRect = new Rectangle2D.Float();
            private Line2D graphLine = new Line2D.Float();
            private Color graphColor = new Color(46, 139, 87);
            private Color mfColor = new Color(0, 100, 0);
            private String usedStr;
            public Surface() {
                setBackground(Color.black);
                addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
                        if (thread == null) start(); else stop();
            public Dimension getMinimumSize() {
                return getPreferredSize();
            public Dimension getMaximumSize() {
                return getPreferredSize();
            public Dimension getPreferredSize() {
                return new Dimension(135,80);
            public void paint(Graphics g) {
                if (big == null) {
                    return;
                big.setBackground(getBackground());
                big.clearRect(0,0,w,h);
                float freeMemory = (float) r.freeMemory();
                float totalMemory = (float) r.totalMemory();
                // .. Draw allocated and used strings ..
                big.setColor(Color.green);
                big.drawString(String.valueOf((int) totalMemory/1024) + "K allocated",  4.0f, (float) ascent+0.5f);
                usedStr = String.valueOf(((int) (totalMemory - freeMemory))/1024)
                    + "K used";
                big.drawString(usedStr, 4, h-descent);
                // Calculate remaining size
                float ssH = ascent + descent;
                float remainingHeight = (float) (h - (ssH*2) - 0.5f);
                float blockHeight = remainingHeight/10;
                float blockWidth = 20.0f;
                float remainingWidth = (float) (w - blockWidth - 10);
                // .. Memory Free ..
                big.setColor(mfColor);
                int MemUsage = (int) ((freeMemory / totalMemory) * 10);
                int i = 0;
                for ( ; i < MemUsage ; i++) {
                    mfRect.setRect(5,(float) ssH+i*blockHeight,
                                    blockWidth,(float) blockHeight-1);
                    big.fill(mfRect);
                // .. Memory Used ..
                big.setColor(Color.green);
                for ( ; i < 10; i++)  {
                    muRect.setRect(5,(float) ssH+i*blockHeight,
                                    blockWidth,(float) blockHeight-1);
                    big.fill(muRect);
                // .. Draw History Graph ..
                big.setColor(graphColor);
                int graphX = 30;
                int graphY = (int) ssH;
                int graphW = w - graphX - 5;
                int graphH = (int) remainingHeight;
                graphOutlineRect.setRect(graphX, graphY, graphW, graphH);
                big.draw(graphOutlineRect);
                int graphRow = graphH/10;
                // .. Draw row ..
                for (int j = graphY; j <= graphH+graphY; j += graphRow) {
                    graphLine.setLine(graphX,j,graphX+graphW,j);
                    big.draw(graphLine);
                // .. Draw animated column movement ..
                int graphColumn = graphW/15;
                if (columnInc == 0) {
                    columnInc = graphColumn;
                for (int j = graphX+columnInc; j < graphW+graphX; j+=graphColumn) {
                    graphLine.setLine(j,graphY,j,graphY+graphH);
                    big.draw(graphLine);
                --columnInc;
                if (pts == null) {
                    pts = new int[graphW];
                    ptNum = 0;
                } else if (pts.length != graphW) {
                    int tmp[] = null;
                    if (ptNum < graphW) {    
                        tmp = new int[ptNum];
                        System.arraycopy(pts, 0, tmp, 0, tmp.length);
                    } else {       
                        tmp = new int[graphW];
                        System.arraycopy(pts, pts.length-tmp.length, tmp, 0, tmp.length);
                        ptNum = tmp.length - 2;
                    pts = new int[graphW];
                    System.arraycopy(tmp, 0, pts, 0, tmp.length);
                } else {
                    big.setColor(Color.yellow);
                    pts[ptNum] = (int)(graphY+graphH*(freeMemory/totalMemory));
                    for (int j=graphX+graphW-ptNum, k=0;k < ptNum; k++, j++) {
                        if (k != 0) {
                            if (pts[k] != pts[k-1]) {
                                big.drawLine(j-1, pts[k-1], j, pts[k]);
                            } else {
                                big.fillRect(j, pts[k], 1, 1);
                    if (ptNum+2 == pts.length) {
                        // throw out oldest point
                        for (int j = 1;j < ptNum; j++) {
                            pts[j-1] = pts[j];
                        --ptNum;
                    } else {
                        ptNum++;
                g.drawImage(bimg, 0, 0, this);
            public void start() {
                thread = new Thread(this);
                thread.setPriority(Thread.MIN_PRIORITY);
                thread.setName("MemoryMonitor");
                thread.start();
            public synchronized void stop() {
                thread = null;
                notify();
            public void run() {
                Thread me = Thread.currentThread();
                while (thread == me && !isShowing() || getSize().width == 0) {
                    try {
                        thread.sleep(500);
                    } catch (InterruptedException e) { return; }
                while (thread == me && isShowing()) {
                    Dimension d = getSize();
                    if (d.width != w || d.height != h) {
                        w = d.width;
                        h = d.height;
                        bimg = (BufferedImage) createImage(w, h);
                        big = bimg.createGraphics();
                        big.setFont(font);
                        FontMetrics fm = big.getFontMetrics(font);
                        ascent = (int) fm.getAscent();
                        descent = (int) fm.getDescent();
                    repaint();
                    try {
                        thread.sleep(sleepAmount);
                    } catch (InterruptedException e) { break; }
                    if (MemoryMonitor.dateStampCB.isSelected()) {
                         System.out.println(new Date().toString() + " " + usedStr);
                thread = null;
    public static void main(String s[]) {
            final MemoryMonitor demo = new MemoryMonitor();
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
                public void windowDeiconified(WindowEvent e) { demo.surf.start(); }
                public void windowIconified(WindowEvent e) { demo.surf.stop(); }
            JFrame f = new JFrame("Java2D Demo - MemoryMonitor");
            f.addWindowListener(l);
            f.getContentPane().add("Center", demo);
            f.pack();
            f.setSize(new Dimension(200,200));
            f.setVisible(true);
            demo.surf.start();

  • Reading the memory size of a machine

    Dear all,
    I'm writing a java program that can read the size of the memory (RAM) of a machine. Does anyone have an idea as to whether this can be done in Java, and if so, what libraries to use.
    Thanks
    Regards,

    Here's an old thread about the same issue (please search before you post) : http://forum.java.sun.com/thread.jspa?threadID=701152&messageID=4067516 .
    PS - ChuckBing also answered that one... Nice :P

  • How to change the memory size of Iphoto to put more pictures??  I don't have no more space!!!

    Hi....
    I wonted to put some more pictures to Iphoto...but I can't do it because it is telling me that I don't have enough space.... I so that memory on the hard disk for Iphoto is only 37gb ... how can I change that?????  I wont to have all my photos in this program!!
    Thank you for your answers...

    I have trued to clean my hard disk --- but this is not the problem!!
    "IPhoto nn può imporate le foto perchè nn c'è abbastanza spazio libero sul VOLUME che contiene la libreria di Iphoto"
    this is the messege how is coming out....
    it means...
    Iphoto can not import the fotos, because there is not enough free space of VOLUME that containse the library of Iphoto
    do you now that could it be???

Maybe you are looking for