Query: setuname
OS: hpux
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
uname(2) System Calls Manual uname(2)NAMEuname(), setuname() - get information about computer system; set node name (system name)SYNOPSISDESCRIPTIONuname() The system call places information identifying the computer system in the structure pointed to by name. The structure, defined in is set up as follows: Each field is a null-terminated string. The field contains the name of the operating system, on standard HP-UX systems. The field contains the name by which the computer system is known in a communications network. The field contains the release identifier of the operating system, such as The field contains additional information about the operating system. This value can change in future releases. The first character of the field identifies the license level: Two-user system 16-user system 32-user system 64-user system 8-user system 128-user, 256-user, or unlimited-user system The field contains the hardware and model identifiers of the computer system. On this field always returns The field contains a unique identification number within that class of hardware, possibly a hardware or software serial number. This field contains a null string if there is no identification number. On systems this number may not be unique. To get a unique id, use the option of setuname() The system call sets the node name (system name), as returned in the field of the structure, to name, which has a length of namelen charac- ters. This is usually executed by at system boot time. Names are limited to 1 characters; is defined in Security Restrictions The actions associated with this system call require the privilege Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges.RETURN VALUEand return the following values: Successful completion. n is a nonnegative value. Failure. is set to indicate the error. The function may return truncated results when the non-expanded version of the structure is used. SeeERRORSIf or fails, is set to one of the following values. name points to an illegal address. The reliable detection of this error is implementation dependent. was attempted by a process lacking appropriate privileges. This error may be detected and indicates that the structure version used does not accommodate the full values of one or more fields.WARNINGSreturns one of two versions of the structure: o HP-UX compatible version (compatible with all HP-UX versions) o Expanded version of the structure which can accommodate larger values. The compatible structure is used by default. To use the expanded structure, see nodehostnamesize(5). If the administrator has configured a node name with a length larger than 8 bytes, the compatible version of the structure, as returned by contains just the first 8 bytes (plus null) in the field. In a future release the field will not contain any data bytes if the entire node name cannot fit. Setting a node name of more than 8 bytes with is only possible with the appropriate configuration options enabled. It is strongly recom- mended that all related documentation be completely understood before setting a larger node name. A node name larger than 8 bytes can cause anomalous behavior or failure in applications which use the command or the system function to access the name. It is recommended that, whenever possible, programs use the host name as returned by the function rather than the field. It can be given a sufficiently large buffer to avoid truncation issues. See gethostname(2) for more information.AUTHORwas developed by AT&T and HP.SEE ALSOhostname(1), uname(1), setuname(1M), gethostname(2), sethostname(2), nodehostnamesize(5), privileges(5).STANDARDS CONFORMANCEuname(2)
Related Man Pages |
---|
uname(2) - redhat |
hostname(1) - hpux |
settimeofda(2) - hpux |
setuname(2) - hpux |
uname(2) - hpux |
Similar Topics in the Unix Linux Community |
---|
ipaddress in HP-UX |
How to move the entire system to a new larger drive? |