Modifier and Type | Interface and Description |
---|---|
static class |
SystemB.Group
Return type for getgrgid
|
static class |
SystemB.HostCpuLoadInfo |
static class |
SystemB.HostLoadInfo |
static class |
SystemB.IFdata
Data type as part of IFmsgHdr
|
static class |
SystemB.IFdata64
Data type as part of IFmsgHdr
|
static class |
SystemB.IFmsgHdr
Return type for sysctl CTL_NET,PF_ROUTE
|
static class |
SystemB.IFmsgHdr2
Return type for sysctl CTL_NET,PF_ROUTE
|
static class |
SystemB.Passwd
Return type for getpwuid
|
static class |
SystemB.ProcBsdInfo |
static class |
SystemB.ProcTaskAllInfo |
static class |
SystemB.ProcTaskInfo |
static class |
SystemB.RUsageInfoV2 |
static class |
SystemB.Statfs
The statfs() routine returns information about a mounted file system.
|
static class |
SystemB.Timeval
Time value
|
static class |
SystemB.Timezone
Time Zone
|
static class |
SystemB.VMMeter |
static class |
SystemB.VMStatistics |
static class |
SystemB.VMStatistics64 |
static class |
SystemB.VnodeInfoPath |
static class |
SystemB.VnodePathInfo |
static class |
SystemB.XswUsage
Return type for sysctl vm.swapusage
|
LibCAPI.size_t, LibCAPI.ssize_t
Resource.Rlimit
Library.Handler
Modifier and Type | Field and 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 |
MAXCOMLEN |
static int |
MAXPATHLEN |
static int |
MFSTYPENAMELEN |
static int |
MNAMELEN |
static int |
MNT_DWAIT |
static int |
MNT_NOWAIT |
static int |
MNT_WAIT |
static int |
PROC_ALL_PIDS |
static int |
PROC_PIDPATHINFO_MAXSIZE |
static int |
PROC_PIDTASKALLINFO |
static int |
PROC_PIDTASKINFO |
static int |
PROC_PIDTBSDINFO |
static int |
PROC_PIDVNODEPATHINFO |
static int |
PROCESSOR_BASIC_INFO |
static int |
PROCESSOR_CPU_LOAD_INFO |
static int |
RUSAGE_INFO_V2 |
static int |
UINT64_SIZE |
HOST_NAME_MAX
RB_AUTOBOOT, RB_DISABLE_CAD, RB_ENABLE_CAD, RB_HALT_SYSTEM, RB_KEXEC, RB_POWER_OFF, RB_SW_SUSPEND
RLIMIT_AS, RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_LOCKS, RLIMIT_MEMLOCK, RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_NLIMITS, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_RTPRIO, RLIMIT_RTTIME, RLIMIT_SIGPENDING, RLIMIT_STACK
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 and Description |
---|---|
int |
getfsstat64(SystemB.Statfs[] buf,
int bufsize,
int flags)
The getfsstat() function returns information about all mounted file systems.
|
SystemB.Group |
getgrgid(int gid)
This function searches the group database for the given group name pointed to
by the group id given by gid, returning the first one encountered.
|
int |
getpid()
Returns the process ID of the calling process.
|
SystemB.Passwd |
getpwuid(int uid)
This function searches the password database for the given user uid, always
returning the first one encountered.
|
int |
gettimeofday(SystemB.Timeval tp,
SystemB.Timezone tzp)
The system's notion of the current Greenwich time and the current time zone
is obtained with the gettimeofday() call, and set with the settimeofday()
call.
|
int |
host_page_size(int hostPort,
LongByReference pPageSize)
The host_page_size function returns the page size for the given host.
|
int |
host_processor_info(int hostPort,
int flavor,
IntByReference procCount,
PointerByReference procInfo,
IntByReference procInfoCount)
The host_processor_info function returns information about processors.
|
int |
host_statistics(int hostPort,
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 hostPort,
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_port_deallocate(int port,
int name)
Decrement the target port right's user reference count.
|
int |
mach_task_self()
The mach_task_self system call returns the calling thread's task_self port.
|
int |
proc_listpids(int type,
int typeinfo,
int[] buffer,
int buffersize)
Search through the current processes
|
int |
proc_pid_rusage(int pid,
int flavor,
SystemB.RUsageInfoV2 buffer)
Return resource usage information for the given pid, which can be a live
process or a zombie.
|
int |
proc_pidinfo(int pid,
int flavor,
long arg,
Structure buffer,
int buffersize)
Return in buffer a proc_*info structure corresponding to the flavor for the
specified process
|
int |
proc_pidpath(int pid,
Pointer buffer,
int buffersize)
Return in buffer the name of the specified process
|
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(java.lang.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(java.lang.String name,
Pointer mibp,
IntByReference size)
This 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.
|
close, getdomainname, getegid, getenv, geteuid, getgid, gethostname, getloadavg, getuid, msync, munmap, setdomainname, setegid, setenv, seteuid, setgid, sethostname, setuid, unsetenv
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
static final int MAXCOMLEN
static final int MAXPATHLEN
static final int PROC_PIDPATHINFO_MAXSIZE
static final int PROC_ALL_PIDS
static final int PROC_PIDTASKALLINFO
static final int PROC_PIDTBSDINFO
static final int PROC_PIDTASKINFO
static final int PROC_PIDVNODEPATHINFO
static final int MFSTYPENAMELEN
static final int MNAMELEN
static final int MNT_WAIT
static final int MNT_NOWAIT
static final int MNT_DWAIT
static final int RUSAGE_INFO_V2
int gettimeofday(SystemB.Timeval tp, SystemB.Timezone tzp)
tp
- Timeval structuretzp
- Timezone structureint mach_host_self()
int mach_task_self()
int mach_port_deallocate(int port, int name)
port
- The port holding the right.name
- The port's name for the right.kern_return_t
code otherwise.int host_page_size(int hostPort, LongByReference pPageSize)
hostPort
- 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 hostPort, int hostStat, Structure stats, IntByReference count)
hostPort
- 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 hostPort, int hostStat, Structure stats, IntByReference count)
hostPort
- 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(java.lang.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(java.lang.String name, Pointer mibp, IntByReference size)
The number of elements in the mib array can be determined by calling sysctlnametomib() with the NULL argument for mibp.
The sysctlnametomib() function is also useful for fetching mib prefixes. If size on input is greater than the number of elements written, the array still contains the additional elements which may be written programmatically.
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 hostPort, int flavor, IntByReference procCount, PointerByReference procInfo, IntByReference procInfoCount)
hostPort
- 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 structureSystemB.Passwd getpwuid(int uid)
uid
- The user IDSystemB.Group getgrgid(int gid)
gid
- The group IDint proc_listpids(int type, int typeinfo, int[] buffer, int buffersize)
type
- types of processes to be searchedtypeinfo
- adjunct information for typebuffer
- a C array of int-sized values to be filled with process
identifiers that hold an open file reference matching the
specified path or volume. Pass NULL to obtain the minimum buffer
size needed to hold the currently active processes.buffersize
- the size (in bytes) of the provided buffer.int proc_pidinfo(int pid, int flavor, long arg, Structure buffer, int buffersize)
pid
- the process identifierflavor
- the type of information requestedarg
- argument possibly needed for some flavorsbuffer
- holds resultsbuffersize
- size of resultsint proc_pidpath(int pid, Pointer buffer, int buffersize)
pid
- the process identifierbuffer
- holds resultsbuffersize
- size of resultsint proc_pid_rusage(int pid, int flavor, SystemB.RUsageInfoV2 buffer)
pid
- the process identifierflavor
- the type of information requestedbuffer
- holds resultsint getfsstat64(SystemB.Statfs[] buf, int bufsize, int flags)
buf
- Array of statfs structures that will be filled with results. If
buf is given as NULL, getfsstat() returns just the number of
mounted file systems.bufsize
- Size of the buffer to fillflags
- If flags is set to MNT_NOWAIT, getfsstat() will directly return
the information retained in the kernel to avoid delays caused by
waiting for updated information from a file system that is perhaps
temporarily unable to respond. Some of the information returned
may be out of date, however; if flags is set to MNT_WAIT or
MNT_DWAIT instead, getfsstat() will request updated information
from each mounted filesystem before returning.int getpid()