CpuInfo (Sigar API)
Date: 2010-04-28

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.sigar
Class CpuInfo

    java.lang.Object
      org.hyperic.sigar.CpuInfo

All Implemented Interfaces:
  java.io.Serializable

    public class CpuInfo

extends java.lang.Object
implements java.io.Serializable

CpuInfo sigar class.

See Also:
  Serialized Form

Constructor Summary
`CpuInfo()`

Method Summary
`void` | `gather(Sigar sigar)`
`long` | `getCacheSize()` Get the CPU cache size.
`int` | `getCoresPerSocket()` Get the Number of CPU cores per CPU socket.
`int` | `getMhz()` Get the CPU speed.
`java.lang.String` | `getModel()` Get the CPU model.
`int` | `getTotalCores()` Get the Total CPU cores (logical).
`int` | `getTotalSockets()` Get the Total CPU sockets (physical).
`java.lang.String` | `getVendor()` Get the CPU vendor id.
`java.util.Map` | `toMap()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CpuInfo

    public CpuInfo()

Method Detail

### gather

    public void gather(Sigar sigar)
                throws SigarException

  Throws:
    `SigarException`

### getVendor

    public java.lang.String getVendor()

  Get the CPU vendor id.

  Supported Platforms: AIX, FreeBSD, Linux, HPUX, Solaris, Win32.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    CPU vendor id

### getModel

    public java.lang.String getModel()

  Get the CPU model.

  Supported Platforms: AIX, FreeBSD, Linux, HPUX, Solaris, Win32.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    CPU model

### getMhz

    public int getMhz()

  Get the CPU speed.

  Supported Platforms: AIX, FreeBSD, HPUX, Linux, Solaris, Win32.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    CPU speed

### getCacheSize

    public long getCacheSize()

  Get the CPU cache size.

  Supported Platforms: AIX, Linux.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    CPU cache size

### getTotalCores

    public int getTotalCores()

  Get the Total CPU cores (logical).

  Supported Platforms: Undocumented.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    Total CPU cores (logical)

### getTotalSockets

    public int getTotalSockets()

  Get the Total CPU sockets (physical).

  Supported Platforms: Undocumented.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    Total CPU sockets (physical)

### getCoresPerSocket

    public int getCoresPerSocket()

  Get the Number of CPU cores per CPU socket.

  Supported Platforms: Undocumented.

  System equivalent commands:

  - AIX: `lsattr -El proc0`
  - Darwin: ``
  - FreeBSD: ``
  - HPUX: ``
  - Linux: `cat /proc/cpuinfo`
  - Solaris: `psrinfo -v`
  - Win32: ``

  Returns:
    Number of CPU cores per CPU socket

### toMap

    public java.util.Map toMap()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2004-2009 Hyperic. All Rights Reserved.