 |
Index for Section 8 |
|
 |
Alphabetical listing for H |
|
 |
Bottom of page |
|
hwmgr(8)
NAME
hwmgr - Command line interface to hardware device data
SYNOPSIS
/sbin/hwmgr command [subsystem] [parameters]
Brief Description
The hwmgr utility works with the KSM hardware set and the kernel hardware
management module. It enables you to manage hardware components and the
hardware sub-systems that maintain information about hardware components. A
hardware component can be a storage peripheral, such as a disk or tape, or
a system component such as a CPU or a bus. Use the hwmgr utility to manage
hardware components on either a single system or on a cluster. The default
file permission is -rwxr-xr-x and you must be root to use the hwmgr
utility.
The hwmgr utility provides two types of commands, internal and generic.
Internal commands do not contain a subsystem identifier on the command
line. Generic commands are characterized by a subsystem identifier after
the command name.
Internal Command Synopsis
Use the following syntax for internal /sbin/hwmgr command options. Options
can be abbreviated to the minimum unique string, such as -m instead of
-member.
/sbin/hwmgr -flash light [-dsf dev-special-filename] [-bus scsi-bus |
-target scsi-target | -lun scsi-lun] [-seconds N-seconds] [-nopause]
/sbin/hwmgr -get attribute [saved | default | current] [-a attribute...]
[-a attribute=value] [-a attribute!=value] [-id hardware-component-id]
[-category hardware-category] [-member cluster-member-name] [-cluster]
/sbin/hwmgr -get category
/sbin/hwmgr -help [command | subsystem]
/sbin/hwmgr -set attribute [saved | current] -a attribute=value [-a
attribute=value]... [-id hardware-component-id] [-member cluster-member-
name] [-cluster]
/sbin/hwmgr -view cluster
/sbin/hwmgr -view devices [-dsf device-special-filename] [-category
hardware-category] [-member cluster-member-name] [-cluster]
/sbin/hwmgr -view hierarchy [-id hardware-component-id [-instance
component-instance]] [-member cluster-member-name]
/sbin/hwmgr -view env
/sbin/hwmgr -view timestamps [-reverse] [-a timestamp-attribute...] [-a
timestamp-attribute=time] [-id hardware-component-id] [-category hardware-
category] [-member cluster-member-name] [-cluster]
/sbin/hwmgr -view transaction [-member cluster-member-name] [-cluster]
Generic Commands
Generic commands are characterized by a subsystem identifier after the
command name. The current subsystems are: component, scsi and name.
component subsystem
The component subsystem maintains information on all hardware devices
specified in the binary /etc/dec_hwc_ldb and /etc/dec_hwc_cdb
databases. These databases contain information on all hardware
components currently registered with hardware management. This
includes most devices on a system.
name subsystem
The name subsystem maintains information on all hardware components in
the binary /etc/dec_hw_db database, often referred to as the hardware
topology. The database contains hardware persistence information,
maintained by the kernel driver framework and includes data for buses,
controllers and devices.
scsi subsystem
The scsi subsystem maintains information on all SCSI devices in the
binary /etc/dec_scsi_db database. The SCSI database contains entries
for all devices managed by the SCSI/CAM architecture.
Note that some generic hwmgr commands are duplicated in more than one
subsystem. You should use the subsystem most closely associated with the
type of operation you want to perform. The current list of generic
commands is:
· -add
· -delete
· -edit
· -locate
· -redirect
· -refresh
· -reload
· -scan
· -show
· -unconfigure
· -unload
Generic Command Syntax
Usage for generic commands is unique for each commmand and subsystem
combination. Use the help command to view usage for all commands supported
under a subsystem:
/sbin/hwmgr -help [component | name | scsi]
FLAGS
The following flags are used with many of the commands. Other parameters
are unique to the individual commands and are defined with the commands.
-cluster
Perform the operation on every member of the cluster. This parameter
is valid only when the system is a cluster member.
-member host_name
Perform the operation on the specified cluster member. This parameter
is valid only when the system is a cluster member.
-full
Display extended details where they are provided.
-verbose
Provide detailed information about the return status of this command.
Note that the -verbose switch must be spelled out completely, and
cannot be abbreviated. To make the verbose operation default, define
the environment variable HWMGR_VERBOSE = TRUE.
COMMAND OPTIONS
The following sections describe the flags and parameters for each command
set in turn. Note that you can abbreviate command words to the minimum
number of unique letters, such as -m for -member.
Internal Commands
-view cluster
Displays information on the state of each cluster member. This command
is only useful in a cluster environment.
-view env
Displays the internal Hardware Manager (hwmgr) environment variable
settings, which you can set in your environment configuration file such
as .profile. The variables that exist at present are:
HWMGR_DATA_FILE=pathname
Use this variable to set the location of the main hwmgr data file.
HWMGR_DEBUG=true | false
Use this variable to set debugging on or off.
HWMGR_HEXINTS=true | false
Use this variable to set numbers to hexadecimal.
HWMGR_NOWRAP=true | false
Causes the display output to be truncated at 80 columns rather than
wrapped.
HWMGR_VERBOSE=true | false
Use this variable to set hwmgr to display verbose output by
default. This option can also be specified using the -verbose flag
on the command line.
-view timestamp
Displays event information such as the registration time of any
devices, and the host on which it occurred.
-view transaction
Displays information on the transactions that the hardware management
kernel code uses to perform some requests, including the status of:
·
Any ongoing hardware management transactions
·
Whether the hardware management cluster database is locked
·
The last hardware management transaction that was completed.
-view devices
Use the devices option to display all devices on the system. All
devices on the local host will be returned by default, unless one of
the following parameters are supplied:
-category hardware-category
Specifies a hardware category, such as disk or tape on which the
operation should be performed.
-member cluster-member-name
Specifies the host name of a cluster member on which the operation
should be performed.
-cluster
Specifies that the operation should be performed cluster-wide. If
this option is not specified, only data for the local host will be
returned.
Note that for the purpose of this command, a device is considered to be
any hardware component that has the dev_base_ name attribute.
-view hierarchy
Displays the current hardware component hierarchy. If no cluster member
name is specified this operation defaults to the local system.
-id hardware-component-ID
Displays the hierarchy from the specified component downwards.
Specify a hardware identifier (HWID).
-inst component-instance
Specifies an instance of a hardware component. Some devices may be
in the component hierarchy in more than one place. For example,
SCSI disks on a shared bus would be seen in the hierarchy under two
buses. Each entry for the component in the hierarchy is considered
a different instance.
-member cluster-member-name
Specifies the host name of a cluster member on which the operation
should be performed.
The display hierarchy command always uses the hardware set. It will
display the currently registered hardware components which have been
placed in the system hierarchy.
-flash light
Use this option to flash the display light (LED) on a SCSI disk device
for a default time period of 30 seconds. Note that this operation may
not work on all devices, and you may have to open a cover to access the
light on some systems, particularly where the disk is installed in an
internal bay.
-dsf device-special-filename
Specifies a device by its special filename such as /dev/disk/dsk4.
-bus scsi-bus
Specifies the device(s) on the given SCSI bus number.
-target scsi-target
Specifies the device(s) at the given SCSI target number.
-lun scsi-lun
Specifies the device at the given logical unit number.
-seconds N
Specifies a duration of N seconds for the light to flash. The
default is 30.
-nopause
Specifies no pauses between flashes.
-get attribute
Returns attribute values for a device. You can specify the device
attributes to return, according to their type and one or more optional
matching parameters. The value of an attribute can be:
saved
This is the value of the attribute that has been configured and
stored in the database using the -set saved command option. When
you set the saved value of an attribute, you are setting the value
to be saved across boots and used on subsequent boots.
default
This is the default value of an unconfigured attribute. When you
add a new device and boot the system, the device attributes of the
new device will be at their default values.
current
This is the value of the attribute that the driver is currently
using in its operation of the device. If you set an attribute
using -set current, the saved value is unchanged. When you shut
down and reboot the system, the value of the attribute reverts to
the saved value in the database. If you want the value you are
using to persist across boots, you must use the -set saved command
option. When using the -get command, the current values are
returned by default.
Note that not all attributes can always have a current, saved, or
default value. Attribute values may be assigned to a device by the
system at startup, so that the saved value shows 0, but the current
value may be different. Most attributes have read-only values and are
not settable. Typically, you are only able to set a few attributes for
a given device.
Settable attributes are marked (settable) when you use the (-get
attributes) option. The following truncated display shows an example:
# /sbin/hwmgr -get attributes
path_fail_limit = 5
device_starvation_time = 25 (settable)
cluster_disables = 0
For each attribute status (saved, default, current) you can specify the
following optional parameters:
-a attribute...
Use the -a option to return values of an individual attribute, such
as path_fail_limit, which is a SCSI disk attribute defining the
limit for path failures.
-a attribute=value...
Use the -a option with the =value parameter to return attributes
that match the specified value. For example, to search for devices
that support power management, where the saved value of power
management is enabled (1), use the following command:
# hwmgr -get attribute -a power_mgmt_capable=1
-a attribute!=value...
Use the -a option with the !=value parameter to return attributes
that do not match the specified value.
# hwmgr -get attribute -a power_mgmt_capable!=1
-id hardware-component-id
Returns the attribute values for the specified hardware device
identifier (HWID). For example, the following command returns all
the current attribute values for hardware component 18:
# hwmgr -get attribute current -id 18
-category hardware-category
Specifies a hardware category, such as bus or ide_adapter on which
the operation should be performed. You can display the available
categories using the -get category command option.
-member cluster-member-name
Specifies the host name of a cluster member on which the operation
should be performed.
-cluster
Specifies that the operation should be performed cluster-wide. If
this option is not specified, only data for the local host will be
returned.
-get category
Returns a list of all Hardware Component Categories available on the
system, such as platform, scsi_bus, or disk.
-help
Displays the complete online help screen for the hwmgr utility. You
can optionally add the following parameters to restrict the output to
more specific information:
command
Displays help only for the specified command.
subsystem
Displays help only for the specified subsystem, which can be
component, name or scsi.
-set attribute [saved | current] attribute=value
Sets either the saved (permanent) or current (in use) value for the
specified attribute(s). Refer to the -get flag for more information.
Note that default attribute values cannot be set.
The following parameters can be specified:
-a attribute=value...
At least one attribute and value must be specified, you can specify
other attributes to set as required, subject to limitations on the
command input buffer.
-id hardware-component-id
Specifies a hardware component identifier (HWID) on which the
operation is to be performed.
-member cluster-member-name
Specifies the host name of a cluster member on which the operation
is to be performed.
-cluster
Specifies that the operation is to be performed cluster-wide. If
the system is part of a cluster and this option is not specified,
the operation will only be performed on the local host.
Note that the values of the attributes of a particular hardware
component may not be the same for each member of the cluster. One
hardware component may have different attributes, or different
values for the same attributes, for each separate cluster member.
Warning
You should specify a hardware identifier when setting an
attribute. Failure to do so will set the attribute value on all
hardware components.
The following sections lists the command options for generic commands,
which can target a subsystem. There are three supported subsystems:
component, name and scsi. Syntax for each subsystem is described in turn.
The component Subsystem
The component subsystem references all hardware devices specified in the
binary /etc/dec_hwc_ldb and /etc/dec_hwc_cdb databases. These databases
contain information on all hardware components currently registered with
hardware management. This includes most devices on a system.
The component subsystem supports the following command options:
-delete component -id hardware-component-id
Deletes a hardware component from all members of the cluster, and
removes all occurrences of the hardware component from all system
databases. A hardware component identifier must be supplied.
-locate component -id hardware-component-ID
Finds a hardware component. The locate operation is designed to help
you physically find a piece of hardware. How this is actually
implemented depends on the hardware being located.
If the locate operation is directed to a SCSI disk component, the disk
will attempt to flash the activity light. This is the same as using
the command:
# hwmgr -flash light
The following optional flags can be specified for locate:
-dsf device-special-filename
Specifies the device special filename, such as /dev/disk/dsk1.
-bus scsi-bus scsi-target scsi-lun
Specifies the bus, target, lun (n/n/n/) address.
-seconds number
Specifies a duration of N seconds for the light to flash. The
default is 30 seconds.
-nopause
Specifies no pause between flashes. Note that this operation works
only on SCSI disks and may not work on some devices.
-refresh component
This command will delete (from every database) all hardware components
which are not currently registered. Use this command only if the system
or cluster is set up in an optimal configuration and you want to remove
obsolete hardware entries from all databases.
Any devices that are not plugged in and have not been seen during this
boot session will be removed.
-scan component
Scans the system for new hardware components and if a new component is
found, configure it. If you do not specify any arguments, the command
will scan all hardware on the system. Note that the -scan component
option is asynchronous. When you issue the command it completes
immediately, although the scan can still be working in the kernel. To
test for completion of a scan, use the Event Manager (EVM) evmwatch and
evmshow commands to monitor for an event with the following event name:
sys.unix.hw.scan_completed. For example:
# evmwatch -f '[name sys.unix.hw.scan_completed]' | evmshow
A hardware scan has just completed.
Alternatively, use the graphical EVM Viewer interface to monitor
completion of the scan. (See the EVM(5) reference page for an
introduction to EVM.)
The following flags can be specified with -scan:
-id hardware-component-identifier
Specifies the hardware component identifier (HWID) for the device
on which the -scan operation should be performed.
-category hardware-category
Specifies the hardware category, such as disk or tape, on which the
-scan operation should be performed. See also the -get category
option.
-recurse
Performs a recursive scan downward in the system topology. If this
option is not specified, the scan operation will not scan
recursively to hardware components below the starting component,
unless recursion occurs as part of the normal scanning process for
the component. A bus, for example, would always be scanned
recursively (since that is how the scan code for a bus is written).
A scan of a platform (CPU) would not normally be recursive.
-instance component-instance
Specifies an instance of a hardware component on which the scan
should be performed Some devices may be in the component hierarchy
in more than one place. For example, SCSI disks on a shared bus
would be seen in the hierarchy under two buses. Each entry for the
component in the hierarchy is considered a different instance.
-member cluster-member-name
Specifies the host name of a cluster member on which the operation
should be performed. (See the RESTRICTIONS section.)
-show component
Display hardware components from the hardware component databases. This
includes all hardware components, including hardware components that
were previously registered but may not be currently registered.
The -show component command returns a FLAGS field as part of the
output. The FLAGS field is a series of characters that give information
on the state of a hardware component. The following characters are
used in the FLAGS output for show:
r The component is currently registered with hardware management.
d The component has device nodes associated with it.
c The component has a cluster wide unique name or has cluster-wide
available device special files.
s The component has saved attributes associated with it in the
hardware set.
i A WARNING field that this component has an inconsistency in the
hardware component database.
The following flags can be specified with -show to control the output:
-registered
Shows all hardware components that are currently registered with
hardware management.
-nregistered
Shows all hardware components that are NOT currently registered
with hardware management. These components were previously
registered at one time.
-cshared
Shows all hardware components that are cluster shared. A cluster
shared hardware component is a hardware component that has a name
which is guaranteed to be unique anywhere in the cluster, or has
cluster-wide available device special files.
-ncshared
Shows all hardware components that are NOT cluster shared. See the
-cshared flag for a definition of cluster shared.
-devnodes
Shows all hardware components that have device nodes associated
with them.
-ndevnode
Shows all hardware components that do NOT have device nodes
associated with them.
-savedattr
Shows all hardware components that have saved attributes. See the
-get attribute command for a description of saved attributes.
-nsavedattr
Shows all hardware components that do NOT have saved attributes.
See the -get attribute command for a description of saved
attributes.
-inconsistent
Shows all hardware components that have software inconsistencies in
the hardware component database. An inconsistency is a possible
internal error with the component database. Use the -full switch
with the show command to view detailed information on what may be
wrong with the hardware component.
Note that this command does not fix database inconsistencies; it
only detects inconsistencies. One possible fix may be to reboot
the cluster.
-ninconsistent
Shows all hardware components that do NOT have software
inconsistencies.
-full
Shows detailed information on the hardware component.
-output output-format
Displays output from the show command in an alternate format.
Currently the only other supported output for the show component
command is tcl.
-member cluster-member-name
Specifies a cluster member on which the -show operation should be
performed.
-cluster
Perform the operation on every member of the cluster. This
parameter is valid only when the system is a cluster member.
-id hardware-component-ID
Specifies the hardware component identifier (HWID) for the device
on which the -show operation should be performed.
If no member ID is specified and the -cluster option was not used, the
-show operation defaults to the local cluster member.
-unconfigure component
Unconfigures a hardware component. Unconfiguring a hardware component
will unregister the component from the running system but will not
remove the persistence of the component from the databases. The
following options are supported:
-id hardware-component-ID
Unconfigure database entries with the specified hardware component
identifier.
-instance component-instance
Specifies an instance of a hardware component on which the
operation should be performed. Some devices may be in the component
hierarchy in more than one place. For example, SCSI disks on a
shared bus would be seen in the hierarchy under two buses. Each
entry for the component in the hierarchy is considered a different
instance.
-recurse
Performs a recursive operation downward in the system topology. If
this flag is not specified, the operation will not recurse to
hardware components below the starting component.
-member host_name
Perform the operation on the specified cluster member. This
parameter is valid only when the system is a cluster member.
The name Subsystem
The name subsystem references all hardware components in the /etc/dec_hw_db
binary database which often referred to as the hardware topology. The
database contains hardware persistence information, maintained by the
kernel driver framework, including data for controllers and buses.
-add name
To add a bus, controller or device entry to the name subsystem, use the
following syntax:
hwmgr -add name
-component_name persistence-name
Specifies the base persistence name that should be used for this
persistence entry. For example scsi will be the persistence name
for a SCSI adapter.
-component_num persistence-number
Specifies the persistence number to be associated with this
hardware component. For example, the first SCSI adapter will be 0,
making the persistence entry for the adapter scsi0.
-component_type BUS|CONTROLLER|DEVICE
Specifies the type for a hardware persistence entry.
-parent_name parent-bus/cont
Specifies the persistence name of the parent bus or controller, at
which location the new entry will persist. For example, a SCSI
adapter might persist under parent bus tza.
-parent_num parent-instance number
Specifies the instance number of the parent bus or controller of
the hardware component. For example, the instance number for a SCSI
adapter persisting on a parent tza bus might be instance 0, for
tza0.
-slot_num slot-number
Specifies the slot number occupied by this hardware component. For
example, A SCSI adapter might persist at slot 2 of the tza0 bus
(tza0 slot 2).
To add other (generic) types of entries to the name subsystem, use the
following command syntax:
hwmgr -add name
-component_name persistence-name
As for bus, controller, or device above.
-component_num persistence-number
As for bus, controller, or device above.
-component_type GENERIC
Specifies the type for a hardware persistence entry.
-key string-value
Specifies a key used to identify the persistence entry.
-member cluster-member-name
Specifies a cluster member on which the -add operation should be
performed. (See the RESTRICTIONS section.)
-delete name
Deletes a hardware persistence entry. When you delete a hardware
component it cannot be used. For example, if the system has a network
adapter named tu0 and you add a second network adapter in a lower slot,
the new adapter will be automatically named tu1. However, if you
delete tu0 then both adapters will be automatically renamed in the
order they are discovered (when the system probes buses and
controllers). The new network adapter in the lower slot becomes tu0
and the original adapter is renamed to tu1. (See also the -remove
operation.)
The following parameters should be specified:
-entry hardware-name
Specifies the name of the hardware persistence entry that you want
to delete.
-member cluster-member-name
Specifies a cluster member on which the -delete operation should be
performed. (See the RESTRICTIONS section.)
-edit name
This option enables you to edit hardware persistence of a bus,
controller, or device using the following command syntax:
hwmgr -edit name
-entry hardware-name
Specifies the name of the hardware persistence entry that you want
to edit:
[-parent_name parent-name]
Specifies a changed parent name for this persistence entry.
-parent_num parent-instance number
Specifies a changed parent instance number name for this
persistence entry.
-slot_num slot-number
Specifies a changed slot number name for this persistence
entry.
-member cluster-member-name
Specifies a cluster member on which the -edit operation should be
performed. (See the RESTRICTIONS section.)
To edit a generic persistence entry, use the following command syntax:
hwmgr -edit name
-entry hardware-name
As for bus, controller, or device above.
-key string-value
Specifies a new value for the key for this persistence entry.
-member cluster-member-name
Specifies a cluster member on which the -edit operation should be
performed. (See the RESTRICTIONS section.)
-reload name
This operation does an unload followed by a load, and usually operates
on a driver. (See the -load and -unloadoptions.)
-driver driver-name
Specifies which driver should be reloaded.
[-noconfig]
Specifies that the kernel should not call the driver configuration
routine when the driver is reloaded.
-member cluster-member-name
Specifies a cluster member on which the -reload operation should be
performed. (See the RESTRICTIONS section.)
-remove name
This operation removes a hardware persistence entry from the database
but does not affect any hardware component currently using the name. It
only affects the persistence of the name across reboots. (See also the
-delete operation.)
-entry hardware-name
Specifies the name of the hardware persistence entry that is to be
removed.
-member cluster-member-name
Specifies a cluster member on which the -remove operation should be
performed. (See the RESTRICTIONS section.)
-scan name
This operation scans a hardware persistence entry for new devices.
-entry hardware-name
Specifies the name of the hardware persistence entry that is to be
scanned.
-member cluster-member-name
Specifies a cluster member on which the -scan operation should be
performed. (See the RESTRICTIONS section.)
-cluster
Specifies that the -scan operation is to be performed on every
cluster member.
-show name
This operation displays persistence entries.
-member cluster-member-name
Specifies a cluster member on which the -show operation should be
performed. (See the RESTRICTIONS section.)
-unconfigure name
This operation unconfigures an instance of a hardware persistence
entry.
-entry hardware-name
Specifies the name of the hardware persistence entry that is to be
unconfigured.
-member cluster-member-name
Specifies a cluster member on which the -unconfigure operation
should be performed. (See the RESTRICTIONS section.)
-unload name
This operation unloads a module (usually a driver) from memory after
unconfiguring the module.
-driver driver-suffix
Specifies the suffix for the driver that is to be unloaded from
memory. For example, tu, the driver suffix for the tulip network
interface card
The scsi Subsystem
The scsi subsystem references all SCSI devices in the binary
/etc/dec_scsi_db database. The SCSI database contains entries for all
devices managed by the SCSI/CAM architecture.
-show scsi
Shows entries from the SCSI/CAM Logical ID persistence database. If no
cluster member identifier is specified and the cluster-wide option was
not used, this operation defaults to the local system. The following
flag options can be specified for the -show command:
-id hardware-component-ID
Show any SCSI database entries with the specified hardware
component identifier.
-did scsi-device-ID
Show any SCSI database entries with the specified SCSI device
identifier. The SCSI device ID is a SCSI specific identifier used
by the SCSI/CAM subsystem, it is not related to the hardware ID
used by hardware management.
-bus scsi-bus
Show any SCSI entries with a path (valid or stale) at the specified
bus. A stale path occurs when a device that was previously seen is
no longer accessible at that path.
-target scsi-target
Show any SCSI entries at the specified target.
-lun scsi-lun
Show any SCSI entries at specified lun (logical unit number).
-member cluster-member-name
Specifies a cluster member on which the -show operation should be
performed.
-type SCSI-device-type
Specifies a SCSI device type, such as disk or tape. Note that SCSI
device types are specified in the SCSI standards that are supported
in this release of the operating system software. Supported
standards and restrictions are defined in the Software Product
Description.
-active
Specifies that only SCSI components with valid paths should be
displayed. If a device can be accessed, the path is valid.
-stale
Specifies that only SCSI components with stale paths should be
displayed. A path becomes stale when a device that was previously
seen is no longer accessible at that path.
-full
Specifies that if detailed information on a device is available,
that data should be displayed.
-edit scsi
Use this command to manually assign a unique name to a legacy SCSI
device that does not provide such a name. If a SCSI device does not
provide a unique name, it will be seen as a different device for each
path from which it can be accessed.
Use the -edit scsi command for every place from which the device is
seen, assigning the same name each time. CAM will then provide this
name to the hardware manager, enabling the device to be seen as the
same device no matter what access path is used. The device will also
receive a unique device special file.
-redirect scsi -src source_did -dest target_did
Assign the device special file names, cluster dev_t values, local dev_t
values, Logical ID, and hardware ID of one hardware component to
another. Source and target scsi logical device identifiers (did) must
be supplied.
-delete scsi
This command will get the hardware component for the entry being
deleted and pass the request to the component subsystem handler to
finish the delete. (The -member option is not supported on the SCSI
-delete operation.)
If the entry is not registered in the kernel with HWC (only under
unusual circumstances) the -delete option will remove the entry from
the CAM database without calling the component subsystem.
-didscsi-logical-id
The SCSI device identifier.
-scan scsi
The scan command probes the scsi subsystem for new hardware. If a new
SCSI device has been added to the system you can use the -scan scsi
option to find the new hardware.
The following flag options can be specified for the -scan scsi command:
-bus scsi-bus
Specifies the device(s) on the given SCSI bus number
-target scsi-target
Specifies the device(s) at the given SCSI target number
-lun scsi-lun
Specifies the device at the given logical unit number
-member cluster-member-name
Perform the operation on the specified cluster member. (See the
RESTRICTIONS section.)
DESCRIPTION
Use this utility for managing hardware, gathering information on system
status, and diagnosing device problems. The hwmgr utility has the following
features:
· The hwmgr utility is specific to the hardware management subsystem in
the kernel, and uses only the KSM hardware set and functions provided
by the enhanced management subsystem in the kernel.
· Provides a wide range of hardware management functions under a single
command.
· Enables you to manage hardware components that are currently
unregistered in the KSM hardware set. These may be hardware components
seen on a previous system boot, but not currently seen in the active
configuration.
· Enables you to manage hardware components in multiple system
databases.
· Enables you to propagate a management request to multiple members of a
cluster.
See the System Administration guide for more information on device names
and device special files and a definitive list of the supported device
names. Note that some hwmgr commands can be run directly from the SysMan
Menu, and many device properties and attributes can be monitored from the
SysMan Station.
RESTRICTIONS
The following notes and restrictions apply:
When working on a cluster, if you do not specify a member name the
operation defaults to the local member. Some command options may require
that you specify a member name, but in general it is an option.
Currently the -locate component -id command is only implemented for SCSI
disks, using the disk activity indicator light (LED).
The following operations on the name subsystem are not supported by all
drivers:
1. The -reload name operation.
2. The -unconfigure name operation.
3. The -unload name operation.
ERRORS
The command returns an int with an errorno from <errno.h>.
EXAMPLES
These examples have been reformatted for ease of reference. The actual
formatted output from commands may be slightly different.
1. If your system is a member of a cluster, use hwmgr to send hardware
management requests to any node in the cluster. To verify that
Hardware Manager recognizes all members in the cluster use the
following command:
# hwmgr -view cluster
Member ID State Member HostName
--------- ----- ---------------
1 UP rene (localhost)
31 UP witt
24 UP freu
10 UP rogr
2. The following example displays devices on the system:
# hwmgr -view devices
HWID: Device Name Model Location
-----------------------------------------------------------
15: /dev/disk/floppy0c 3.5in fdi0-unit-0
18: /dev/disk/dsk0c RZ1 CB-CA bus-0-targ-0-lun-0
19: /dev/disk/cdrom0c RRD46 bus-0-targ-4-lun-0
The information shown in the output is as follows:
HWID
The hardware id number assigned to the device.
Device Name
The device special file name for the device, which is located in
the dev directory,
Model
The vendor's model number, as shown on the device or its casing.
Location
The physical location of the device, bus, target, and logical unit
number (lun).
Note that on this system, no tape device is present and the command:
# hwmgr -view devices -type tape
returns no data, while the following command displays the same output
as shown in the preceding example;
# hwmgr -view devices -type disk
3. This example shows all devices on a cluster:
# hwmgr -view devices
HWID: Device Name Mfg Model Host Location
--------------------------------------------------------
3: /dev/kevm jully
28: /dev/disk/floppy0c 3.5in floppy jully fdi0-unit-0
40: /dev/disk/dsk0c DEC RZ28M (C)DEC jully bus-0-targ-0-lun-0
41: /dev/disk/dsk1c DEC RZ28L-AS (C)DEC jully bus-0-targ-1-lun-0
42: /dev/disk/dsk2c DEC RZ28 (C)DEC jully bus-0-targ-2-lun-0
43: /dev/disk/cdrom0c DEC RRD46 (C)DEC jully bus-0-targ-6-lun-0
44: /dev/disk/dsk3c DEC RZ28M (C)DEC phoey bus-1-targ-1-lun-0
45: /dev/disk/dsk4c DEC RZ28L-AS (C)DEC jully bus-1-targ-2-lun-0
45: /dev/disk/dsk4c DEC RZ28L-AS (C)DEC phoey bus-1-targ-2-lun-0
46: /dev/disk/dsk5c DEC RZ29B (C)DEC jully bus-1-targ-3-lun-0
46: /dev/disk/dsk5c DEC RZ29B (C)DEC phoey bus-1-targ-3-lun-0
47: /dev/disk/dsk6c DEC RZ28D (C)DEC jully bus-1-targ-4-lun-0
47: /dev/disk/dsk6c DEC RZ28D (C)DEC phoey bus-1-targ-4-lun-0
48: /dev/disk/dsk7c DEC RZ28L-AS (C)DEC jully bus-1-targ-5-lun-0
48: /dev/disk/dsk7c DEC RZ28L-AS (C)DEC phoey bus-1-targ-5-lun-0
49: /dev/disk/dsk8c DEC RZ1CF-CF (C)DEC jully bus-1-targ-8-lun-0
49: /dev/disk/dsk8c DEC RZ1CF-CF (C)DEC phoey bus-1-targ-8-lun-0
50: /dev/disk/dsk9c DEC RZ1CB-CS (C)DEC jully bus-1-targ-9-lun-0
.
.
.
4. The following command enables you to display information on a
particular device by specifying its device special file:
# hwmgr -view devices -dsf /dev/disk/cdrom0c
HWID: DSF Name Mfg Model Location
--------------------------------------------------------
31: /dev/disk/cdrom0c DEC RRD47(C)DEC bus-0-targ-4-lun-0
5. The following example command displays the device hierarchy on the
system:
# hwmgr -view hierarchy
HWID: Hardware component hierarchy
----------------------------------
1: platform AlphaServer 800 5/500
2: cpu CPU0
4: bus pci0
5: scsi_adapter isp0
6: scsi_bus scsi0
18: disk bus-0-targ-0-lun-0 dsk0
19: disk bus-0-targ-4-lun-0 cdrom0
20: graphics_controller trio0
8: bus eisa0
9: serial_port tty00
10: serial_port tty01
11: parallel_port lp0
12: keyboard PCXAL
13: pointer PCXAS
14: fdi_controller fdi0
15: disk fdi0-unit-0 floppy0
16: network tu0
17: network tu1
You can obtain more specific output by identifying the cluster member
for which you want to obtain data, or by specifying a particular
device identifier.
6. The following example displays the time that each hardware component
was initially registered on a small standalone system (truncated):
# hwmgr -view timestamps
HWID: Component Attribute Name Hostname Time occurred
------------------------------------------------------------
1: AlphaServer 80 registration_time cy1.k3. <time>
2: CPU0 registration_time cy1.k3. <time>
3: kevm registration_time cy1.k3. <time>
4: pci0 registration_time cy1.k3. <time>
5: pci0slot5 registration_time cy1.k3. <time>
7: pci0slot6 registration_time cy1.k3. <time>
9: pci0slot7 registration_time cy1.k3. <time>
Note that in the above output, <time> is displayed as weekday month
date HH:MM:SS year, for example: Sat May 15 14:42:18 1999.
7. The following command displays the devnodes from the component
subsystem:
# hwmgr -show comp devnodes
HWID: HOST FLAGS SERVICE COMPONENT NAME
-----------------------------------------------
3: pmoba r-d-- none kevm
20: pmoba r-d-- none tty00
22: pmoba r-d-- none tty01
24: pmoba r-d-- none lp0
27: pmoba r-d-- iomap FDI-fdi0-unit-0
35: pmoba rcd-- iomap SCSI-WWID:0410004c:"DEC RZ28 0034766791"
36: pmoba rcd-- iomap SCSI-WWID:04100024:"DEC RZ25F 14295981"
37: pmoba r-d-- iomap SCSI-WWID:0710002c:"DEC RRD43 6l00000"
38: pmoba r-d-- iomap SCSI-WWID:0710002c:"DEC TLZ06 04l00000"
40: pmoba --d-i iomap SCSI-WWID:0710002c:"DEC RX26 0l00000"
42: pmoba rcd-- iomap SCSI-WWID:0410004c:"DEC RZ26L 574435"
43: pmoba rcds- iomap SCSI-WWID:0410003a:"DEC RZ26L 2191192"
This example shows any hardware components that have device nodes
associated with them. If a hardware component has device nodes, it
means that it has a device special file that can be used to access the
device. To see more information on the device special file, such as
the dev_t information you can use the --full option with the --show
comp command, as follows:
# hwmgr -show comp -id 3 -full
HWID: HOSTNAME FLAGS SERVICE COMPONENT NAME
-----------------------------------------------
3: pumba r-d-- none kevm
DSF GROUP
INSTANCE GRPFLAGS GROUPID SUBSYSTEM BASENAME L1 L2
---------------------------------------------------------
0 40 1 kevm kevm pseudo kevm
DEVICE NODE
ID LB LC CB CC B C Class Suffix L3B L3C
devT devT devT devT Flags Flags
---------------------------------------------------------------
0 0 4f00000 0 0 0x0 0x865 0x0 (null) (null) (null)
2 0 4f00002 0 0 0x0 0x865 0x0 .pterm (null) (null)
1 0 4f00001 0 0 0x0 0x875 0x0 .debug (null) (null)
This example shows the device special file basename of pseudodevice
kevm. It also shows the device special file group instance and dev_t
information.
8. This example shows SCSI devices on the system:
# hwmgr -show scsi
SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST
HWID: DID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID PATH
---------------------------------------------------------------
22: 0 ftiwod disk none 2 1 dsk0 [0/3/0]
23: 1 ftiwod cdrom none 0 1 cdrom0 [0/4/0]
24: 2 ftiwod disk none 0 1 dsk1 [2/2/0]
25: 3 ftiwod disk none 0 1 dsk2 [2/2/1]
29: 4 ftiwod disk none 0 1 scp2 [2/2/2]
To view all the paths to a particular SCSI device you can use the -
show scsi -full option, as follows:
# hwmgr -show scsi -full
SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST
HWID: DID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID PATH
----------------------------------------------------- ---------
43: 7 pmoba disk none 0 2 dsk3 [0/2/0]
WWID:0410003a:"DEC RZ26L (C) DECPCB= ; HDA=000052191192"
BUS TARGET LUN PATH STATE
------------------------------
1 2 0 stale
0 2 0 valid
9. The following command displays the hardware categories available on
the system:
# hwmgr -get category
Hardware Categories
-------------------
category = undefined
category = platform
category = cpu
category = pseudo
category = bus
category = scsi_adapter
category = scsi_bus
category = graphics_controller
category = serial_port
category = parallel_port
category = keyboard
category = pointer
category = fdi_controller
category = disk
category = network
10. The following command shows partial output of all attributes for all
devices on the system:
# hwmgr -get attribute
1:
name = AlphaServer 800 5/500
category = platform
2:
name = CPU0
category = cpu
sub_category = EV5.6 (21164A)
power_mgmt_capable = 0
state = 1
speed = 500
<long display output truncated>
You can return specific information from specific devices, as shown in
the following command example:
# hwmgr -get attribute -id 4
4:
name = pci0
category = bus
# hwmgr -get attribute -id 3
More specific information can be specified by naming required
attributes, as follows:
# hwmgr -get attribute -a name -id 4
4:
name = pci0
For some attributes, you can specify the saved, default, or current
values.
11. The following example shows how you set attributes that are flagged as
(settable) in the output from /sbin/hwmgr -get attributes:
# hwmgr -get attr saved -id 18 -a device_starvation_time
18:
device_starvation_time = 25
# hwmgr -set attr saved -id 18 -a device_starvation_time=30
18:
saved device_starvation_time = 30
The first command displays the saved attribute named
device_starvation_time for device id 18, a hard disk. The second
command increases the saved value from 25 to 30.
12. The following example shows how you can use the redirect option to
replace a failed device (did=3) . This command assumes that:
·
You used the -show scsi (or other) option to obtain the device
identifier (did) for the failed device.
·
The replacement device has been physically installed according to
the directions in the Owner's Manual.
·
You used the -scan scsi option to probe for the device and register
it.
·
You used the -show scsi option to obtain the device identifier (did)
for the new device and found it to be 53.
# hwmgr -redirect scsi -src 3 -dest 53
13. Note that you can use the Event Manager (EVM) to monitor your system
for hardware events. For example, the following command will watch for
hardware events at the terminal:
# evmwatch -f '[name sys.unix.hw]' | evmshow
Alternatively, use the graphical EVM Viewer interface to monitor such
events. (See the EVM5 reference page for an introduction to EVM.)
FILES
/sbin/hwmgr
The executable image
/etc/hwmgr/hwm_hwc.dat
The data file for the HWC component subsystem
/etc/hwmgr/hwm_name.dat
The data file for the NAME component subsystem
/etc/hwmgr/hwm_scsi.dat
The data file for the CAM SCSI component subsystem
/etc/hwmgr/hwmgr.dat
The main data file
/dev
Location of the device special files and sub-directories
/dev/disk, /dev/ntape, /dev/rdisk, /dev/tape
The default device class sub-directories, containing device special
files for the named devices
/etc/dccd.dat, /etc/dcdd.dat
The device information databases, which specify characteristics of
device models
SEE ALSO
Commands: dsfmgr(8), sysman(8), sysman_station(8),
System Administration
 |
Index for Section 8 |
|
 |
Alphabetical listing for H |
|
 |
Top of page |
|