Devices
Device configuration Database
Listing the installed and supported devices (lsdev)
Listing the system configuraion and Vital product data of devices (lscfg)
Listing the device attributes (lsattr)
Change the attributres of devices (chdev)
Configuring new devices (cfgmgr)
Make device files (mkdev)
Removing devices from system (rmdev)
To manually add a device to the system (mkdev)
To Find the boot informations, Disk Size, Kernel bits etc.. (getconf)
To display sytem configuration information (prtconf)
Device Configuration Database
Device informations are stored in ODM. There are two device configuratoin databases in AIX
- Predefined Database contains data for all the supported devices based on the system configuration.
- Customized Database contains configuration database for all currently defined and configured (available) devices.
The devices in AIX can be in any of the following states
01. Available - Device is ready and can be used 02. Defined - Device is unavailable 03. Unknown - Undefined 04. Stopped - Configured but unavailable
lsdev
-C to list customized database
-P to list predefined database
-c (class)
-t (type)
-s (subtype)
To list all customised devices ie installed
# lsdev -C
To list all the Hard Drives in a system
# lsdev -Cc disk
To list all the adapters in a sytem
# lsdev -Cc adapter
To find out the type of Fibre adapter
# lsdev -Ct df1000f* -F "type" -l fcs1
To find out the parent of ent0 device
# lsdev -Cl ent0 -F parent
To display configuration and vital product data (VPD) about the system
lscfg
-v Displays the VPD found on customized Database
-p display paltform specifig device info.
-l <device_name>
To list all installed devices in detail
# lscfg -v
To find out the WWN, FRU #, firmware level of fibre adapter fcs0
# lscfg -vpl fcs0
To display attributes and possible values of attributes for devices
lsattr
-E Displays the effective value
-D Displays the Default Value
-R Displays the range of legal values
-a <Attribute>
-l <Device_name>
Examples:
To find out the possible media_speed values for ethernet card ent0
# lsattr -El ent0 -a media_speed -R 10_Half_Duplex 10_Full_Duplex 100_Half_Duplex 100_Full_Duplex Auto_Negotiation
To find out the effective attribute of a device "mem0"
# lsattr -El mem0 goodsize 512 Amount of usable physical memory in Mbytes False size 512 Total amount of physical memory in Mbytes False
To list the defaults in the pre-defined db for device ent0
# lsattr -El sys0
To Change the attributes of devices-
chdev
-l <device name>
-a <attribute=new_value>
-T to change the value temporarily
-P to make the change permanent after reboot if the
device is currently in use and can not be changed
To change the SCSI ID of adapter scsi0 that cannot be changed made unavailable due to available disk drives connected to it
# chdev -l scsi0 -a id=6 -P
To change the maximum number of processes allowed per user
Find out the valid range of values using lsattr command # lsattr -El sys0 -a maxuproc -R 40...131072 (+1) Change the maxuproc value using chdev command # chdev -l sys0 -a maxuproc=10000
rmdev
-d removes the device from Customized DB
-l <device_name>
-R Unconfigure device and its chidren
-S Makes deviec un-availabel by using stop method
To change device state from available to defined
# rmdev -l (device)
To delete the device
# rmdev -l (device) -d
To delete the scsi adapter scsi0 and all its child devices
# rmdev -Rdl scsi0
mkdev
-d define
-c class
-l <logical device name>
-p parent name
-s subclass
-t type
Examples:
To define a tape device
# mkdev -d -c tape -t 8mm -s scsi -p scsi0 -w 5,0
To make the predefined rmt0 tape to available status
# mkdev -l rmt0
Configuring New Devices using cfgmgr:
cfgmgr configures devices and optionally installs device software by running the programs specified in the Configuration Rules object class.
cfgmgr
-v To give detailed output
-l <Device_name> To configure the device and
all it's chidren
-i <device> Location of installation medium
To search for new devices and configure them
#cfgmgr
To configure detected devices attached to the fcs0 adapter
# cfgmgr -l fcs0
To install device drivers which is in /tmp/drivers automatically during configuration
# cfgmgr -i /tmp/drivers
Getting System configuration variable values
getconf, bootinfo commands can be used to collect the system configuration variable values such as kernel bit, hardware bit, boot device, real mem present, disk size etc... bootinfo command is not supported on Aix V5.2 onwards.
Using bootinfo command
To find out the Kernel whether it is 32-bit or 64bit
# bootinfo -K ---- > for Kernel # bootinfo -y ---- > for Hardware # bootinfo -s hdiskx ----> to find out the size of the hard drive
Some useful getconf command examples
# getconf KERNEL_BITMODE 64 # getconf HARDWARE_BITMODE 64 # getconf DISK_SIZE /dev/hdisk0 8678 # getconf REAL_MEMORY 524288 # getconf BOOT_DEVICE hdisk0 # getconf DISK_DEVNAME hdisk0 10-60-00-4,0 # getconf MP_CAPABLE 0
Displaying system configuration information
prtconf command displays system Configuration information. If run without any flags, it displays the system model, machine serial, processor type, number of processors, processor clock speed, cpu type, total memory size, network information, filesystem information, paging space information, and devices information
Flags:-
-c Displays cpu type, for example, 32-bit or 64-bit.
-k Display the kernel in use, for example, 32-bit or 64-bit.
-L Displays LPAR partition number and partition name if this is an LPAR partition,
otherwise returns "-1 NULL".
-m Displays system memory.
-s Displays processor clock speed in MHz.
-v Displays the VPD found in the Customized VPD object class for devices.
Examples:-
# prtconf -c CPU Type: 64-bit # prtconf -m Memory Size: 4096 MB # prtconf -s Processor Clock Speed: 1654 MHz # prtconf System Model: IBM,9119-595 Machine Serial Number: 02898EB Processor Type: PowerPC_POWER5 Number Of Processors: 2 Processor Clock Speed: 1654 MHz CPU Type: 64-bit Kernel Type: 64-bit LPAR Info: 5 sapnims Memory Size: 4096 MB Good Memory Size: 4096 MB Platform Firmware level: Not Available Firmware Version: IBM,SF235_209 Console Login: enable Auto Restart: true Full Core: false Network Information Host Name: sapnims IP Address: 10.253.1.24 Sub Netmask: 255.255.255.0 Gateway: 10.253.1.253 Name Server: 128.137.24.4 Domain Name: gene.com Paging Space Information Total Paging Space: 512MB Percent Used: 1% Volume Groups Information rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 546 1 00..00..00..00..01 hdisk1 active 546 1 00..00..00..00..01 ....................... ....................... ......................