setsysinfo(2)setsysinfo(2)Namesetsysinfo - set system information
Syntax
#include <sys/types.h>
#include <sys/sysinfo.h>
setsysinfo(op, buffer, nbytes, arg, flag)
unsigned op;
char *buffer;
unsigned nbytes;
unsigned arg;
unsigned flag;
Description
The system call modifies system information. The op argument specifies
the operation to be performed. Values for op are defined in the header
file. The optional buffer and nbytes arguments are used to pass data,
which varies depending upon op. When buffer and nbytes are not
required, they should be set to NULL. The optional arg argument can be
used with certain op values for additional information. When arg is
not required, it should be set to NULL. The optional flag argument can
be used with certain op and arg values for additional information.
When flag is not required it should be set to NULL.
Possible op values are:
op = SSI_NVPAIRS
Use a list of name-value pairs to modify predefined system vari‐
ables. Buffer is an array of name-value pairs, where name is one
of a predefined set of system variables defined in the <sys/sys‐
info.h> header file.
Possible name values are:
SSIN_NFSPORTMON
A Boolean that determines whether incoming NFS traffic is
originating at a privileged port or not.
SSIN_NFSSETLOCK
A Boolean that determines whether NFS (daemon) style file and
record locking are enabled or not.
SSIN_PROG_ENV
Set the compatibility mode of the process. Possible values
are A_BSD, A_POSIX, or A_SYSV.
SSIN_UACSYS (RISC only)
A Boolean that determines whether or not the system prints an
"unaligned access fixup" message. Use of this is restricted
to the superuser.
SSIN_UACPARNT (RISC only)
A Boolean that is set in the current process's parent proc
structure. It turns printing of ``unaligned access fixups''
on or off. This flag is inherited across forks and execs.
If parent is init, it returns EPERM.
SSIN_UACPROC (RISC only)
A Boolean value that is set in the proc structure to turn
off/on printing of ``unaligned access fixup'' messages. This
flag is inherited across forks and execs.
The value is a legal value for name. The nbytes argument defines
the number of name-value pairs in buffer. The arg and flag argu‐
ments are not used.
op = SSI_ZERO_STRUCT
Each member of a system structure is set to zero. The arg defines
the structure type.
Possible values for arg are:
SSIS_NFS_CLSTAT
NFS client statistics.
SSIS_NFS_SVSTAT
NFS server statistics.
SSIS_RPC_STAT
RPC statistics. The flag argument is used for a particular
arg value, to further define the operation or a resultant
action to be performed. The buffer and nbytes arguments are
not used.
Permission checking is done on a structure-by-structure basis.
op = SSI_SET_STRUCT
Each member of a system structure is set to a supplied value. The
arg defines the structure type.
Possible values for arg are as defined for op SSI_STRUCT_ZERO.
The flag argument is used for a particular arg value, to further
define the operation or a resultant action to be performed. The
buffer argument is the address of a structure of the appropriate
type that contains the desired values. The nbytes argument speci‐
fies the amount of data to be transferred that is stored at buf‐
fer.
Return Values
A zero (0) is returned if the call succeeds. If the call fails, -1 is
returned, and the global variable errno is set to indicate the error.
Diagnostics
[EFAULT] Either buffer or arg causes an illegal address to be
referenced.
[EINVAL] The op, arg, or flag argument is invalid.
[EPERM] Permission is denied for the operation requested
See Alsogetsysinfo(2)setsysinfo(2)