Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getsysinfo(2) — Ultrix WS 2.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setsysinfo(2)

getsysinfo(2)

NAME

getsysinfo − get system information

SYNTAX

#include <sys/types.h>
#include <sys/sysinfo.h>

getsysinfo(op, buffer, nbytes, start, arg)
unsignedop;
char*buffer;
unsigned nbytes;
int *start;
char *arg;

DESCRIPTION

The getsysinfo 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 op values are:

GSI_PROG_ENV
Return the compatibility mode of the process.  Possible values are A_BSD, A_POSIX, A_SYSTEM_FIVE as defined in <sys/exec.h>.

GSI_MAX_UPROCS
Return the maximum number of processes allowed per user id.

GSI_TTYP
Return the major/minor number of the controlling terminal.

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 and must be initially set to 0. The start argument is updated to reflect the current logical location within the system  table, allowing successive executions of getsysinfo to retrieve information about all the system structures specified by op.

The start argument is set to 0 when all system information requested by op has been retrieved. 

The optional arg argument may be used by certain op’s for additional information.  When arg 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 op dependent. 

RETURN VALUE

Upon successful completion, a value indicating the number of requested items stored in buffer is returned.  If the information requested by op is not available, getsysinfo returns a 0.  Otherwise, −1 is returned and the global variable errno is set to indicate the error.

DIAGNOSTICS

EFAULT
Either buffer, start, or arg causes an illegal address to be referenced. 

EINVAL
The op argument is invalid. 

EPERM
Permission is denied for a the operation requested

SEE ALSO

setsysinfo(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026