Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uname(2) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hostname(1)

uname(1)

gethostname(2)

sethostname(2)

UNAME(2)

NAME

uname − get name of current HP-UX system

SYNOPSIS

#include <sys/utsname.h>

int uname (name)
struct utsname ∗name;

HP-UX COMPATIBILITY

Level: HP-UX/RUN ONLY

Origin: System V

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 include:

#define UTSLEN9
#define SNLEN15
charsysname[UTSLEN];
charnodename[UTSLEN];
charrelease[UTSLEN];
charversion[UTSLEN];
charmachine[UTSLEN];
charidnumber[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.  Machine contains a standard name that identifies the hardware on which the HP-UX system is running.  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. 


­[EFAULT] Uname will fail if name points to an invalid address. 

HARDWARE DEPENDENCIES

Series 200/500:
The first character of the version field is set to "A" for single user, and "B" for 16-user. 

Series 500 only:
The first character of the version field is set to "C" for 32-user systems, and "D" for 64-user systems. 

RETURN VALUE

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

SEE ALSO

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

Hewlett-Packard  —  last mod. May 11, 2021

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