*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: sysinfo | Section: 2 | Source: Digital UNIX | File: sysinfo.2.gz
sysinfo(2) System Calls Manual sysinfo(2) NAME sysinfo - manages system information strings SYNOPSIS #include <sys/systeminfo.h> long sysinfo ( int command, char *buf, long count ); PARAMETERS Specifies the commands that manage the system information strings. They are described in the Available Commands section. Specifies the buffer used for the storage of system information. Specifies the size of the buffer pointed to by the buf parameter. DESCRIPTION The sysinfo function retrieves and sets information relating to the op- erating system into a buffer pointed to by the buf parameter. This function is similar to the sysconf function which returns an integer instead of a string. Available Commands This section describes the commands that may be specified with the com- mand parameter. The commands allow you to set certain attributes and they are listed in alphabetical order: Copies a string into the speci- fied buffer that describes the instruction set of the current system's architecture. These names cannot conflict with predefined names in the C language compilation system. Copies a string into the specified buffer that represents the name of the present host machine. This is the same string that would be returned by the uname function in the nodename field. The name is typically the hostname or nodename that the machine is recognized by locally. The hostname is the name of the target machine as it is used in a network. Although the hostname may differ on various net- works, the nodename that is presented to the appropriate network directory or name-to-address mapping service should produce a transport end point address. The name may not be fully quali- fied. Internet host names can be up to 256 bytes in length including the terminating null. Copies a string into the specified buffer that represents the name of the hardware manufacturer. This command is not supported in this implementation of the operating system. Copies a string into the specified buffer the ASCII representation of the hardware-specific serial number of the ma- chine that executed the function call. This can be initiated in Read Only Memory through the software constants set when the ma- chine is built. The string can contain non-numeric characters. This command is not supported in this implementation of the op- erating system. Copies a string into the specified buffer that represents the name of the machine. This is the same string that would be returned by the uname function in the machine field. Copies a string into the specified buffer that repre- sents the name of the release. This is the same string that would be returned by the uname function in the release field. Copies the null-terminated contents of the specified buffer into the string that is maintained by the kernel. This value will be returned by successive calls to the sysinfo function when used with the SI_HOSTNAME command. Superuser privileges are required to perform this action. Specifies that the string returned by the sysinfo function using the SI_SRPC_DOMAIN command is to be set to the value of the array pointed to by the buf parameter. This command is not supported in this implementation of the op- erating system. The command SI_SET_SYSNAME sets the system name. Copies the Secure Remote Procedure Call command name into the specified buffer. This command is not supported in this im- plementation of the operating system. Copies a string into the specified buffer the value that would be returned by the uname function in the sysname field. This is the name of the imple- mentation of the operating system. RETURN VALUES On success, the return value specifies the size in bytes required for the buffer to hold the value and terminating character of the string. If this value does not exceed the value specified in the count parame- ter, the string is copied. If this value exceeds the value specified by the count parameter, the string that is copied to the specified buffer is truncated to the count-1 bytes and a terminating character. If an error is encountered, a value of -1 is returned and errno is set to indicate the error. RESTRICTIONS Two commands, SI_SRPC_DOMAIN and SI_SET_SRPC_DOMAIN, are not currently supported. If either of these commands is specified, a value of -1 is returned and errno is set. ERRORS Specifies that the buf parameter does not point to a valid address, or that the data for a SET command is not allowed in this implementation. Specifies that an invalid command was specified. See the RESTRICTIONS section. Specifies that the process does not have the appropriate privileges for a SET command. RELATED INFORMATION Functions: getrlimit(2), setrlimit(2), sysconf(3), uname(2). delim off sysinfo(2)

Navigation Options