Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uname(2) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hostname(1)

uname(1)

gethostname(2)

sethostname(2)

UNAME(2)  —  HP-UX

NAME

uname − get name of current HP-UX system

SYNOPSIS

#include <sys/utsname.h>

int uname (name)
struct utsname ∗name;

DESCRIPTION

Uname stores information identifying the current HP-UX system in the structure pointed to by name.

Uname uses the structure defined in <sys/utsname.h> whose members are:

#define UTSLEN 9
#define SNLEN 15


char sysname[UTSLEN];
char nodename[UTSLEN];
char release[UTSLEN];
char version[UTSLEN];
char machine[UTSLEN];
char idnumber[SNLEN];

Uname returns a null-terminated string in each field.  Sysname contains "HP-UX".  Similarly, nodename contains the name that the system is known by on a communications network and is accessible via hostname(1), sethostname(2), and gethostname(2).  Release contains the release number of the operating system, e.g. "1.0" or "3.0.1".  Version contains additional information about the operating system.  The first character of the version field is set to "A" for single user systems, "B" for 16-user systems, "C" for 32-user systems, and "D" for 64-user systems.  (Note that the contents of the version field may change on future releases as AT&T license agreement restrictions change.)  Machine contains a standard name that identifies the hardware on which the idnumber contains an identification number which is unique within that class of hardware, possibly a hardware or software serial number.  This field may return the null string to indicate the lack of an identification number. 

ERRORS

[EFAULT] Uname will fail if name points to an invalid address.  The reliable detection of this error will be implementation dependent. 

RETURN VALUE

Upon successful completion, a non-negative value is returned.  Otherwise, −1 is returned and errno is set to indicate the error. 

AUTHOR

Uname was developed by AT&T Bell Laboratories and the Hewlett-Packard Company. 

SEE ALSO

hostname(1), uname(1), gethostname(2), sethostname(2).

Hewlett-Packard Company  —  Version B.1,  April 12, 1993

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