setsysinfo(2)
NAME
setsysinfo − 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 setsysinfo system call modifies system information. The op argument specifies the operation to be performed. Values for op are defined in the <sys/sysinfo.h> 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 may be used with certain op values for additional information. When arg is not required it should be set to NULL. The optional flag argument may 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 pre-defined system variables. Buffer is an array of name value pairs, where name is one of a pre-defined set of system variables defined in the <sys/sysinfo.h> header file. Possible name values are:
SSIN_NFS_NOBODY
The value used to perform NFS server root uid mapping.
SSIN_NFS_PORTMON
A boolean which determines whether incoming NFS traffic is originating at a privileged port or not.
SSIN_DAEMON_LOCKING
A boolean which determines whether NFS (daemon) style file and record locking is 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
A boolean which deteremines whether or not the system prints an "unaligned access fixup" message. Use of this is restricted to superuser.
SSIN_UACPARNT
A boolean which is set in the current processes’ 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
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 arguments are not used.
op = SSI_STRUCT_ZERO
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 side statistics.
SSIS_NFS_SVSTAT
NFS server side 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_STRUCT_VALUE
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 is the amount of data stored at buffer that is to be transferred.
RETURN VALUE
A 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 ALSO
System Calls