Friday, July 22, 2011

device management

there are three commands through which you can get device information.

1.lscfg  - this command displays configuration,diagnostic and vital product data(VPD) information about the system.

2. lsdev - displays devices in the system and their characterstics.
3. lsattr - displays attribute characterstics and possible values of attributes for devices in the system.


lscfg

lscfg displays
1. part no.
2. serial no.
3. engneering changes level from either the customized VPD object class or platform specific areas.


#lscfg

displays the name ,location and description of all devices found in customized VPD object class that is child device of sys0 object.


#lscfg -v -l ent0

here -l is for logical name
-v for vital product data

#lscfg -vpl rmt0
here -p is for platform specific information.

using lscfg command we can see the location code, WWPN number and current firmware level.

#lscfg -vpl fcs0|grep network

it gives WWN number.


lsdev command

lsdev command is used to display information about the devices from the device configuration database.


there are two types of databases
1. predefined
2. customized

predefined database

all the devices that are supported by aix will be listed here.
device driver will be available for all the devices listed in predefined database. only you have to run cfgmgr to configure it.

customized database
all the devices currently available for use will be listed here.

-P option is there to search devices from predefined database
-C option is there for searching devices from customized databases

#lsdev -P -H

it list all the predefined devices

#lsdev -C -H
it displays all devices of customized database.

#lsdev -Cc adapter

it list all the available adapters

#lsdev -Cc if ---it displays all available network interfaces
#lsdev -Cc processor --list all available processors
#lsdev -Cc tape -- list all available tape drive
#lsdev -Cc disk--list all available disks

#lsdev -C -H -S a -F 'name class subclass type'
to list the name class subclass type of every device in available state in the customized database.


lsattr command


"lsattr "command displays information  about the attributes of the given device or type of device.

you have to specify one of the following flags with lsattr command

-D --displays default value
-E ---displays effective value


#lsattr -El rmt0
lists the current attributes of rmt0
#lsattr -Dl rmt0

displays default attribute of rmt0

#lsattr -El scsi0 -a bus-intr-lv1
list the current value of the attribute bus-intr-lv1 of device scsi0

#lsattr -El sys0

to display system attributes.

#lsattr -El sys0|grep realmem
to know the size of real memory

removing a device

to unload an existing device from the system ,there is two possible ways -:

1. either change the state from available to defined
2. permanently delete all items from ODM.


rmdev command is used for removing the devices


step 1  --------- it will unconfigure the cd0 while retaining its information in customized object class.

#lsdev -Cc cdrom
cd0 available

#rmdev -l cd0
defined.


2nd case  -----this will delete the device definition from the customized device object class

#lsdev -Cc cdrom
cd0

#rmdev -dl cd0
deleted



to unconfigure the scsi adapter and all its children while retaining its information in customized object class.
#rmdev -R -l scsi1
rmt0 defined
hdisk1 defined
scsi1 defined

to unconfigure the childrens of the scsi1 but not the adapter itself
#rmdev -p scsi1
rmt0 defined
hdisk1 defined

to redetect use "cfgmgr" command.


to modify existing device configuration

we use chdev command to modify the existing device parameter.


to change the retention parameter of rmt0
#chdev -l rmt0 -a ret=no

here -l for logical name
-a for attribute name

to change the maximum no. of processes allowed per user to 100
#chdev -l sys0 -a maxuproc=100

#chdev -l hdisk0 -a pv=clear
to remove the PVID from hdisk0

No comments:

Post a Comment