getsysinfo(2)getsysinfo(2)Namegetsysinfo - get system information
getsysinfo(op, buffer, nbytes, start, arg)
The system call retrieves information from the system.
The op argument specifies the operation to be performed. Values for op
are defined in the <sys/sysinfo.h> header file.
Possible values for the op argument are as follows:
Return the BOOTDEV string, which is used for the installation.
Return the entire NETBLK structure, which is used for the network
Return the compatibility mode of the process. Possible values are
A_BSD, A_POSIX, A_SYSTEM_FIVE as defined in the <sys/exec.h> header
Return the maximum number of processes allowed per user id.
Return the major and minor numbers of the controlling terminal.
GSI_UACSYS (RISC only)
Return the current value of the flag that determines whether or not
to print the "unaligned access fixup" message on a system-wide
GSI_UACPARNT (RISC only)
Return the current value of the flag in the parent process's struc‐
ture for printing unaligned access messages.
GSI_UACPROC (RISC only)
Return the current value of the flag in the process's structure for
printing unaligned access messages.
GSI_MMAPALIGN (RISC only)
Return the minimum alignment required for an address specified with
the option in the system call.
The nbytes argument defines the size of buffer into which the system
information is returned.
The start argument is the current logical location within the internal
system table referenced by the op argument, and it must be initially
set to The start argument is updated to reflect the current logical
location within the system table, allowing successive executions of to
retrieve information about all the system structures specified by the
The start argument is set to 0 when all system information requested by
the op argument has been retrieved.
The optional arg argument may be used by some op arguments for addi‐
tional information. When the arg argument is not required, it should
be set to NULL.
When information about multiple system structures is returned, it is
stored within consecutive buffer locations. The information for each
system structure is dependent upon the op argument.
Upon successful completion, a value indicating the number of requested
items stored in buffer is returned. If the information requested by
the op argument is not available, the system call returns a zero. Oth‐
erwise, -1 is returned, and the global variable, is set to indicate the
[EFAULT] Either buffer, start, or arg causes an illegal address
to be referenced.
[EINVAL] The op argument is invalid.
[EPERM] Permission is denied for the operation requested