admhostls(1M)

NAME
admhostls - lists one or all host entries

SYNOPSIS

admhostls [-l] [-h] [-x ns=NIS+|NIS|NONE]
[-x domain=domain|rhost=host1[host2,...]] [ host... ]

DESCRIPTION
The Solstice admhostls command lists one or all host entries in the system databases.

AVAILABILITY

SUNWsacb package.

OPTIONS

-l  Long listing. Cannot be used with the -h option.

-h  Hardware listing. The admhostls command queries each host and reports hardware configuration information about the host. Cannot be used with the -l option.

-x  Indicates that extended, nonstandard options follow.

    ns=NIS+|NIS|NONE
        Sets name service. The default is to use the name service configured on the host on which the command is run. The precedence is NIS+, NIS, then NONE.
        NIS+
            Uses the NIS+ host configuration tables for the current domain.

        NIS Uses the NIS host configuration tables for the current domain.

        NONE
            Updates the local host configuration files.

    domain=domain|rhost=host1[host2,...]
        Specifies domain or remote host. The domain can be specified when the value for the ns parameter is NIS+ or NIS. The domain defaults to the current system domain. The rhost can be specified when the value for the ns parameter is NONE. The rhost defaults to the current system. The rhost parameter can be used to perform the operation on one or more specified hosts. The host or hosts specified as an argument to rhost must be running AdminSuite 2.1 or later for the command to complete successfully.

host...
    The host, or hosts, to list.

DISPLAY FORMATS
When used without the -l option, admhostls displays a column-oriented output with each host on a separate line. Four columns are displayed: the host name, the IP address, the Ethernet address, and the host type. When used with the -l option, admhostls displays the output for each host in a block of key/value pairs followed by a blank line to delimit each host block. Each key/value is on a separate line. The key name is delimited from the value by a colon (:). For example,
Host name: root
The current keys are Host name, IP addr, Ethernet addr, Client type, Time zone, OS, Server, Root path, Swap path, Swap size (MB), Disconnectable, Disk Conf, Terminal type, Install path, Boot path, Profile, and OS Services. The value for OS Services is a comma-delimited list of OS services. Additional keys for new attributes may be added in the future, so a script using this command should not depend on just these keys as output of the -l option. When used with the -h option, admhostls displays a column-oriented output with each host on a separate line. Ten columns are displayed: the host name, the system status, the processor type, the machine hardware name, the hardware platform, the number of disks attached to the system, the total amount of disk space in gigabytes, the amount of memory in megabytes, the number of processors, and a comma-delimited list of the speed of each processor in megahertz. The system status can be "up","down", or "NM". The status "NM" is used if the system is not manageable by the admhostls command. If any value is not available, a dash (-) is used as a placeholder in the column.

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of admhostls: LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES.

ERRORS

The admhostls command exits with one of the following values:

0   Success.

1   Invalid command syntax. A usage message for the admhostls command is displayed.

2   An error occurred while executing the command. An exception code and error message are displayed.

RESTRICTIONS
You must be a member of UNIX group 14, the sysadmin group, to execute this command. Also, if ns=NIS+, you must be a member of the NIS+ admin group (See nisgrpadm(1)). If an entry is part of a multihomed host, then only the host name and IP address are shown. The type shows as a "-".

EXAMPLES
The following command lists hardware information about the machines named osserver and inst. admhostls -h osserver inst The following command provides a detailed (long) listing of information about the machine named osserver. admhostls -l osserver

FILES
/etc/inet/hosts
/etc/ethers
/etc/timezone
/etc/bootparams

SEE ALSO
admhostadd(1M), admhostdel(1M), admhostmod(1M)