Modifier and Type | Interface | Description |
---|---|---|
static class |
SystemB.HostCpuLoadInfo |
|
static class |
SystemB.HostLoadInfo |
|
static class |
SystemB.VMStatistics |
|
static class |
SystemB.VMStatistics64 |
Library.Handler
Modifier and Type | Field | Description |
---|---|---|
static int |
CPU_STATE_IDLE |
|
static int |
CPU_STATE_MAX |
|
static int |
CPU_STATE_NICE |
|
static int |
CPU_STATE_SYSTEM |
|
static int |
CPU_STATE_USER |
|
static int |
HOST_CPU_LOAD_INFO |
|
static int |
HOST_LOAD_INFO |
|
static int |
HOST_VM_INFO |
|
static int |
HOST_VM_INFO64 |
|
static SystemB |
INSTANCE |
|
static int |
INT_SIZE |
|
static int |
PROCESSOR_BASIC_INFO |
|
static int |
PROCESSOR_CPU_LOAD_INFO |
|
static int |
UINT64_SIZE |
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER
Modifier and Type | Method | Description |
---|---|---|
int |
getloadavg(double[] loadavg,
int nelem) |
The getloadavg() function returns the number of processes in the system
run queue averaged over various periods of time.
|
int |
host_page_size(int machPort,
LongByReference pPageSize) |
The host_page_size function returns the page size for the given host.
|
int |
host_processor_info(int machPort,
int flavor,
IntByReference procCount,
PointerByReference procInfo,
IntByReference procInfoCount) |
The host_processor_info function returns information about processors.
|
int |
host_statistics(int machPort,
int hostStat,
Structure stats,
IntByReference count) |
The host_statistics function returns scheduling and virtual memory
statistics concerning the host as specified by hostStat.
|
int |
host_statistics64(int machPort,
int hostStat,
Structure stats,
IntByReference count) |
The host_statistics64 function returns 64-bit virtual memory statistics
concerning the host as specified by hostStat.
|
int |
mach_host_self() |
The mach_host_self system call returns the calling thread's host name
port.
|
int |
mach_task_self() |
The mach_task_self system call returns the calling thread's task_self
port.
|
int |
sysctl(int[] name,
int namelen,
Pointer oldp,
IntByReference oldlenp,
Pointer newp,
int newlen) |
The sysctl() function retrieves system information and allows processes
with appropriate privileges to set system information.
|
int |
sysctlbyname(String name,
Pointer oldp,
IntByReference oldlenp,
Pointer newp,
int newlen) |
The sysctlbyname() function accepts an ASCII representation of the name
and internally looks up the integer name vector.
|
int |
sysctlnametomib(String name,
Pointer mibp,
IntByReference size) |
The sysctlnametomib() function accepts an ASCII representation of the
name, looks up the integer name vector, and returns the numeric
representation in the mib array pointed to by mibp.
|
static final SystemB INSTANCE
static final int HOST_LOAD_INFO
static final int HOST_VM_INFO
static final int HOST_CPU_LOAD_INFO
static final int HOST_VM_INFO64
static final int CPU_STATE_MAX
static final int CPU_STATE_USER
static final int CPU_STATE_SYSTEM
static final int CPU_STATE_IDLE
static final int CPU_STATE_NICE
static final int PROCESSOR_BASIC_INFO
static final int PROCESSOR_CPU_LOAD_INFO
static final int UINT64_SIZE
static final int INT_SIZE
int mach_host_self()
int mach_task_self()
int host_page_size(int machPort, LongByReference pPageSize)
machPort
- The name (or control) port for the host for which the page
size is desired.pPageSize
- The host's page size (in bytes), set on success.int host_statistics(int machPort, int hostStat, Structure stats, IntByReference count)
machPort
- The control port for the host for which information is to be
obtained.hostStat
- The type of statistics desired (HOST_LOAD_INFO, HOST_VM_INFO,
or HOST_CPU_LOAD_INFO)stats
- Statistics about the specified host.count
- On input, the maximum size of the buffer; on output, the size
returned (in natural-sized units).int host_statistics64(int machPort, int hostStat, Structure stats, IntByReference count)
machPort
- The control port for the host for which information is to be
obtained.hostStat
- The type of statistics desired (HOST_VM_INFO64)stats
- Statistics about the specified host.count
- On input, the maximum size of the buffer; on output, the size
returned (in natural-sized units).int sysctl(int[] name, int namelen, Pointer oldp, IntByReference oldlenp, Pointer newp, int newlen)
name
- MIB array of integersnamelen
- length of the MIB arrayoldp
- Information retrievedoldlenp
- Size of information retrievednewp
- Information to be writtennewlen
- Size of information to be writtenint sysctlbyname(String name, Pointer oldp, IntByReference oldlenp, Pointer newp, int newlen)
name
- ASCII representation of the MIB nameoldp
- Information retrievedoldlenp
- Size of information retrievednewp
- Information to be writtennewlen
- Size of information to be writtenint sysctlnametomib(String name, Pointer mibp, IntByReference size)
name
- ASCII representation of the namemibp
- Integer array containing the corresponding name vector.size
- On input, number of elements in the returned array; on output,
the number of entries copied.int host_processor_info(int machPort, int flavor, IntByReference procCount, PointerByReference procInfo, IntByReference procInfoCount)
machPort
- The control port for the host for which information is to be
obtained.flavor
- The type of information requested.procCount
- Pointer to the number of processorsprocInfo
- Pointer to the structure corresponding to the requested flavorprocInfoCount
- Pointer to number of elements in the returned structureint getloadavg(double[] loadavg, int nelem)
loadavg
- An array of doubles which will be filled with the resultsnelem
- Number of samples to return