Hp Ux Ioscan



  1. Scan For New Disk
  2. Hp-ux Ioscan Tape Drive
  3. Hp Ux Ioscan Command
  4. Hp-ux Ioscan Wwn

I - HP-UX Reference, HP Part Number 'B2355-60130', Publication Date 'E0207' United States-English » Contact HP: Search: More options: Manual Technical documentation - English All of HP US. HP-UX Reference I ioscan(1M) HP-UX 11i Version 3: February 2007 » Technical documentation ». Here are few commands to configure tape drives in HP-UX 1. Scan for new devices: # ioscan –fnC tape 2. List tape drives currently recognized by the OS (without performing an actual hardware scan) # ioscan –fnkC tape 3. Remove all the special files used by the tape drives # rmsf /dev/rmt/. 4. Recreate the specil files for the tape drives.

  • 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

traverse()

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.

Scan For New Disk

Dominique Dumont <Dominique_Dumont@hp.com>

Ioscan

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

Hp-ux Ioscan Tape Drive

Hp Ux Ioscan

To install HPUX::Ioscan, copy and paste the appropriate command in to your terminal.

Hp Ux Ioscan Command

For more information on module installation, please visit the detailed CPAN module installation guide.

Hp-ux Ioscan Wwn

HP-UX‎ > ‎

HP-UX: Basic network check

-------------------------------------------------------------------------------------------------
- Check network cards on the system
-------------------------------------------------------------------------------------------------
#:/> ioscan -fC lan
Class I H/W Path Driver S/W State H/W Type Description
lan 2 0/2/1/0 iether CLAIMED INTERFACE HP A7012-60001 PCI/PCI-X 1000Base-T Dual-port Adapter
lan 3 0/2/1/1 iether CLAIMED INTERFACE HP A7012-60001 PCI/PCI-X 1000Base-T Dual-port Adapter
lan 0 0/4/2/0 iether CLAIMED INTERFACE HP AB352-60003 PCI/PCI-X 1000Base-T Dual-port Core
lan 1 0/4/2/1 iether CLAIMED INTERFACE HP AB352-60003 PCI/PCI-X 1000Base-T Dual-port Core
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
- Show state of network devices
-------------------------------------------------------------------------------------------------
#:/> [ lanscan | nwmgr ] # nwmgr only from HP-UX 11iv3 on
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/4/2/0 0x001A4B087C1A 0 UP lan0 snap0 1 ETHER Yes 119
0/2/1/0 0x0012799E12F8 2 UP lan2 snap2 2 ETHER Yes 119
0/2/1/1 0x0012799E12F9 3 UP lan3 snap3 3 ETHER Yes 119
0/4/2/1 0x001A4B087C1B 1 UP lan1 snap1 4 ETHER Yes 119
LinkAgg0 0x000000000000 900 DOWN lan900 snap900 6 ETHER Yes 119
LinkAgg1 0x000000000000 901 DOWN lan901 snap901 7 ETHER Yes 119
LinkAgg2 0x000000000000 902 DOWN lan902 snap902 8 ETHER Yes 119
LinkAgg3 0x000000000000 903 DOWN lan903 snap903 9 ETHER Yes 119
LinkAgg4 0x000000000000 904 DOWN lan904 snap904 10 ETHER Yes 119
Name/ Interface Station Sub- Interface Related
ClassInstance State Address system Type Interface
lan2 UP 0x0017A4770414 igelan 1000Base-SX lan901
lan0 UP 0x0017A4770410 igelan 1000Base-SX lan900
lan1 UP 0x0017A4770412 igelan 1000Base-SX lan900
lan3 UP 0x0017A4770416 igelan 1000Base-SX lan901
lan900 UP 0x0017A4770410 hp_apa hp_apa
lan901 UP 0x0017A4770414 hp_apa hp_apa
lan902 DOWN 0x000000000000 hp_apa hp_apa
lan903 DOWN 0x000000000000 hp_apa hp_apa
lan904 DOWN 0x000000000000 hp_apa hp_apa
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
- Show network interface state
-------------------------------------------------------------------------------------------------
#:/> netstat -win
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan3* 1500 none none 0 0 0 0 0
lan2* 1500 none none 0 0 0 0 0
lan1 1500 192.168.251.0 192.168.251.15 19632811 0 8776477 0 0
lan0 1500 172.18.0.0 172.18.11.15 2836860670 0 4468633035 0 0
lo0 32808 127.0.0.0 127.0.0.1 136153234 0 136156062 0 0
lan1:3 1500 192.168.251.0 192.168.251.32 5552896 0 5552896 0 0
lan1:2 1500 192.168.251.0 192.168.251.31 3293102 0 3293102 0 0
lan0:3 1500 172.18.0.0 172.18.11.32 130691256 0 128291007 0 0
lan0:2 1500 172.18.0.0 172.18.11.31 1684129530 0 90761534 0 0
#:/> ifconfig <lan0:2>
lan0:2: flags=1843<UP,BROADCAST,RUNNING,MULTICAST,CKO>
inet 172.18.11.31 netmask ffff0000 broadcast 172.18.255.255
#:/> nwmgr -v -c <lan3> # nwmgr only from HP-UX 11iv3 on
lan3:
Interface State =UP
MAC Address = 0x0017A4770416
Subsystem = igelan
Interface Type = 1000Base-SX
Related Interface = lan901
Hardware Path = 0/2/2/1
NMID = 4
Feature Capabilities = Physical Interface
IPV4 Recv CKO
IPV4 Send CKO
VLAN Tag Offload
64Bit MIB Support
IPV4 TCP Segmentation Offload
UDP Multifrag CKO
Feature Settings = Physical Interface
VLAN Tag Offload
64Bit MIB Support
MTU = 1500
Speed = 1 Gbps Full Duplex (Autonegotiation : On)
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
- Show interface statistics
-------------------------------------------------------------------------------------------------
#:/> nwmgr --st -c <lan0> # nwmgr only from HP-UX 11iv3 on
*** lan0 64 bit MIB statistics:
Interface Name = lan0
PPA Number = 0
Description = lan0 HP PCI-X 1000Mbps Release B.11.31.0809
Interface Type = 1000Base-SX
MTU Size = 1500
Speed = 1 Gbps
Station Address = 0x0017A4770410
Administration Status = UP
Operation Status = UP
Last Change = Sun Oct 17 20:32:30 2010
Inbound Octets = 2722964625
Inbound Unicast Packets = 2272511
Inbound Multicast Packets = 6
Inbound Broadcast Packets = 3713775
Inbound Discards = 1
Inbound Errors = 0
Inbound Unknown Protocols = 2106
Outbound Octets = 2637451794
Outbound Unicast Packets = 2917221
Outbound Multicast Packets = 0
Outbound Broadcast Packets = 1695
Outbound Discards = 0
Outbound Errors = 0
Counter Discontinuity Time = Sun Oct 17 20:32:29 2010
Physical Promiscuous Mode = FALSE
Physical Connector Present = TRUE
Interface Alias =
Link Up/Down Trap Enable = Enabled
#:/> lanadmin -x stats drv 0
****** Driver Statistics ******
In Packet Error 0
Out Packet Error 0
Loopback packets 0
Link Down events 11
****** Host Command Statistics ******
nicCmdsDelMCastAddr 0
nicCmdsSetMACAddr 0
nicCmdsSetPromiscMode 0
nicCmdsSetMulticastMode 0
nicCmdsClearStats 0
****** NIC Events Statistics ******
nicEventsFirmwareOperational 0
nicEventsStatsUpdated 0
nicEventsLinkStateChanged 23
nicEventsMCastListUpdated 3
****** Interface Statistics ******
ifIndex 1
ifType 6
ifMtu 1500
ifSpeed 1000000000
ifAdminStatus 1
ifOperStatus 1
ifLastChange 188495745
ifInDiscards 0
ifInErrors 0
ifInUnknownProtos 15
ifOutDiscards 0
ifOutErrors 0
ifOutQLen 1
ifInOctets_low 47920331
ifInOctets_high 3
ifInUcastPkts_low 73657713
ifInUcastPkts_high 0
ifInMulticastPkts_low 0
ifInMulticastPkts_high 0
ifInBroadcastPkts_low 50742
ifInBroadcastPkts_high 0
ifOutOctets_low 201995728
ifOutOctets_high 23
ifOutUcastPkts_low 99635712
ifOutUcastPkts_high 0
ifOutMulticastPkts_low 0
ifOutMulticastPkts_high 0
ifOutBroadcastPkts_low 2857
ifOutBroadcastPkts_high 0
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
- Show interface speed
-------------------------------------------------------------------------------------------------
#:/> nwmgr -A speed, mtu -c lan900 # nwmgr only from HP-UX 11iv3 on
lan0 current values:
Speed = 1 Gbps Full Duplex (Autonegotiation : On)
MTU = 1500
#:/> lanadmin -x [ speed ] 0
Speed = 1000 Full-Duplex.
Autonegotiation = On.
-------------------------------------------------------------------------------------------------

HP-UX.NETWORK.checks.wri




Comments are closed.