Sysinfo provides detailed information on key HP-UX configuration elements, usefull to gather system information when beginning problem profiling. No tool will resolve an issue just by data gathering. Analysis and judgment is required at every step. Nonetheless, the command goes a good millage to have a first eagle-eye overview of a system. Ioscan -N -fnu -C disk ioscan -fnkC disk ioscan -m dsf ioscan -m lun: Check HP XP Storage: xpinfo -i ← reduction xpinfo ← detail xpinfo -v ← check xpinfo version: Scan Storage: ioscan ioscan -f ← Detail: Software. Operation Command supplement; Listing Software: swlist: HP-UX Version: swlist grep HPUX11i: HP-UX pach version.
- FUNCTION
- FUNCTION
- EXAMPLE
HPUX::Ioscan - Perl function to handle HPUX ioscan command
This module works on top of the HP-UX command ioscan. It forks a process to run the ioscan command and parses its STDOUT. The result is returned in a hash.
This module is quite basic but it may be interesting if you need to write administration program on HP-UX.
You may call ioscan several time in your program without any problem sicne the result is cached. Only the first call to ioscan will actually run the ioscan command. (But you may override the caching of the result)
ioscan ( [force => 1] )
Will return the result of the ioscan command. The ioscan command is run the first time or if the force parameter is set to 1.
This function returns a hash ref. The keys of the hash are all the hardware paths found on your system.
The value is another hash ref containing these keys :
See ioscan(1M) for the meaning of these keys.
The value of device_files is an array containing the name of the device files attached to the hardware path.
Heres an example of the structure returned for 1 disk:
This module takes the output from the ioscan command and hashes it into an object. You can then access its attributes via its AUTOLOADED methods i or other custom methods.
It utilizes the Storable module for persistance so once called you can then recall it without re-running the command and/or wait for the network by setting persistance from 'new' to 'old'.
Remote node access is supported via remsh or ssh. ssh is highly recommended since the ioscan command that the script runs needs root.
new
The main object constructor that returns the hash refrence. The keys of the hash are all the hardware paths on your system. It accepts the following paramters:
The value is another hash ref containing there keys :
See ioscan(1M) for the meaning of these keys.
Heres an example of the structure returned for 1 disk:
Partial Ioscan Object (disk only). Illustrates the optional extended diskinfo option.
get_disk_controllers()
Hp-ux Ioscan Fc
traverse()
Hp Ux Ioscan Command
get_all_disks_on_controller(controller=>'1/2/3/4.5')
get_device_hwpath(device_name=>'/dev/dsk/c4t3d0')
get_device_diskinfo(device_name=>'/dev/dsk/c4t3d0', attribute=>'size')
The iocan command is run in blocking mode and may indeed block for several seconds on big systems.
Dominique Dumont <Dominique_Dumont@hp.com>
OO by Christopher White <chrwhite@seanet.com>
Copyright (c) 2001 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ioscan(1M)
## end
To install HPUX::Ioscan, copy and paste the appropriate command in to your terminal.
For more information on module installation, please visit the detailed CPAN module installation guide.
The target of a drd clone operation mustbe a single disk or SAN LUN that is write-accessible to the systemand not currently in use. Depending on your HP-UX operating system,refer to one of the following sections:
To help find and select the target disk on an HP-UX 11i v2 system,you can find out what disks are on the system with the ioscan command:
# /usr/sbin/ioscan -fnkC disk |
The ioscan command displays a list of systemdisks with identifying information, location, and size. On a PA-RISCsystem, the output looks similar to Example 2-1.
Example 2-1 The ioscan -fnkC disk Command Output onan HP-UX 11i v2 PA-RISC System
# /usr/sbin/ioscan -fnkC diskClass I H/W Path Driver S/W State H/W Type Description disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE TEAC CD-532E-B /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0 disk 1 10/0/15/1.5.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC /dev/dsk/c1t2d0 /dev/rdsk/c1t2d0 disk 2 10/0/15/1.6.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC /dev/dsk/c2t3d0 /dev/rdsk/c2t3d0 |
On an Integrity system, the output looks similar to Example2-2.
Example 2-2 The ioscan -fnkC disk Command Output onan HP-UX 11i v2 Integrity System
# /usr/sbin/ioscan -fnkC diskClass I H/W Path Driver S/W State H/W Type Descriptiondisk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 36.4GST336754LC /dev/dsk/c2t0d0 /dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s2 /dev/dsk/c2t0d0s1 /dev/rdsk/c2t0d0 /dev/rdsk/c2t0d0s3 /dev/dsk/c2t0d0s2 /dev/rdsk/c2t0d0s1disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 36.4GST336754LC /dev/dsk/c2t1d0 /dev/dsk/c2t1d0s3 /dev/rdsk/c2t1d0s2 /dev/dsk/c2t1d0s1 /dev/rdsk/c2t1d0 /dev/rdsk/c2t1d0s3 /dev/dsk/c2t1d0s2 /dev/rdsk/c2t1d0s1 |
IMPORTANT: The above output includes block device special files endingwith s1, s2, or s3. These endings indicate an idisk partition on the disk. Do NOT usea partition as a clone target! The first disk in the above list is a DVD drive, indicated bythe DV in the description field. Do NOT use a DVDas a clone target! Some device files are identified as /dev/rdsk/. . . following the block device special file designation. This identifiesthem as raw files. Do NOT use a raw file as a clone target! |
Linux Disk Wwn
# /usr/sbin/ioscan -fNnkC disk |
Cod4 key code generator downloads. The ioscan command displays a list of systemdisks with identifying information, location, and size. On an Integritysystem running HP-UX 11i v3, the output looks similar to Example2-3.
Example 2-3 The ioscan -fNnkC disk Command Output onan HP-UX 11i v3 Integrity System
# /usr/sbin/ioscan -fNnkC diskClass I H/W Path Driver S/W State H/W Type Descriptiondisk 4 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 36.4GMAN3367MC /dev/disk/disk4 /dev/rdisk/disk4 /dev/disk/disk4_p1 /dev/rdisk/disk4_p1 /dev/disk/disk4_p2 /dev/rdisk/disk4_p2 /dev/disk/disk4_p3 /dev/rdisk/disk4_p3disk 5 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP 36.4GMAN3367MC /dev/disk/disk5 /dev/rdisk/disk5 /dev/disk/disk5_p1 /dev/rdisk/disk5_p1 /dev/disk/disk5_p2 /dev/rdisk/disk5_p2 /dev/disk/disk5_p3 /dev/rdisk/disk5_p3disk 6 64000/0xfa00/0x2 esdisk CLAIMED DEVICE HP 36.4GMAN3367MC /dev/disk/disk6 /dev/rdisk/disk6 /dev/disk/disk6_p1 /dev/rdisk/disk6_p1 /dev/disk/disk6_p2 /dev/rdisk/disk6_p2 /dev/disk/disk6_p3 /dev/rdisk/disk6_p3disk 7 64000/0xfa00/0x3 esdisk CLAIMED DEVICE TEAC DW-28E /dev/disk/disk7 /dev/rdisk/disk7 |
IMPORTANT: The above output includes block device special files endingwith _p1, _p2, or _p3. These endings indicate an idisk partition on the disk. Do NOT usea partition as a clone target! The last disk in the above list is a DVD drive, indicated bythe DW in the description field. Do NOT use a DVDas a clone target! Some device files are identified as /dev/rdisk following the block device special file designation. This identifiesthem as raw files. Do NOT use a raw file as a clone target! |
Example 2-4 The ioscan -m dsf Command Output on an HP-UX11i v3 Integrity System
# /usr/sbin/ioscan -m dsfPersistent DSF Legacy DSF(s)/dev/rdisk/disk4 /dev/rdsk/c2t0d0/dev/rdisk/disk4_p1 /dev/rdsk/c2t0d0s1/dev/rdisk/disk4_p2 /dev/rdsk/c2t0d0s2/dev/rdisk/disk4_p3 /dev/rdsk/c2t0d0s3/dev/rdisk/disk5 /dev/rdsk/c2t1d0/dev/rdisk/disk5_p1 /dev/rdsk/c2t1d0s1/dev/rdisk/disk5_p2 /dev/rdsk/c2t1d0s2/dev/rdisk/disk5_p3 /dev/rdsk/c2t1d0s3/dev/rdisk/disk6 /dev/rdsk/c3t2d0/dev/rdisk/disk6_p1 /dev/rdsk/c3t2d0s1/dev/rdisk/disk6_p2 /dev/rdsk/c3t2d0s2/dev/rdisk/disk6_p3 /dev/rdsk/c3t2d0s3/dev/rdisk/disk7 /dev/rdsk/c0t0d0 |