Friday, 26 April 2013

Device Administration-AIX

This post will discuss about device administration and their management.

Last post we looked at information about the devices and their states. You can refer that post here.

This post is a step closer to device management.
The main command to list all devices present in the system is:

# lsdev

This command will list all the devices present in ODM in the system.
# lscfg

Command is used to list the configuration of all the devices present on the system.
# lscfg -vp

Command is used to list the complete hardware information.
# lscfg –vpl hdisk0

Will give complete hardware information about hdisk0.

If lscfg is used with flags for eg:
# lscfg –v

Command will give complete information in form of list of all the devices installed on the system. This information output will be detailed information available for each device installed on the machine.

Other commands like,

# lscgf –vl <device name>

Will give complete information about the device installed on the machine.

You can make use of help command to know more about the flags associated with lscfg command.

As we have already seen devices connected to the system can have 4 states, we will discuss these states in detail now.
Undefined means devices may be connected to the system but not defined.

Defined means devices connected and defined but still unavailable to the system.

Available means devices are defined and present in the system.
Stopped means devices are unavailable but defined and not known to the system by a device number.

Command to convert the state of a device from DEFINED to AVAILABLE is:

# mkdev –l  <device name>

This command will convert the raw device which is in defined state to available state after execution.
Another command to change the state of the device from DEFINED to AVAILABLE is:

# cfgmgr

This command changes the state from defined to available for the device.

This performs the same functionality as mkdev command does. This command is basically used to configure plug & play devices. Freshers in AIX must remember this command from interview point of view.

Once the device state is changed from DEFINED to AVAILABLE, admin can always revert back to DEFINED state by running the following command:

# rmdev –l <device name>

This command will remove the device and its information from the AVAILABLE state of devices and put the device back in DEFINED state.

For eg:

# rmdev –l hdisk4

This command will show hdisk4 in defined state not available state.

To remove the device completely from the system, command used is:
# rmdev –dl <device name>

Another command can be used if the devices installed are having child devices (dependencies attached to it), command to remove the device completely in such a situation is:

# rmdev –SR <device name>

S flag will stop the device
R flag will unconfigure all the child devices connected to the parent device.

To list all the PRE-DEFINED devices, command used is:

# lsdev –Pc hdisk
# lsdev –Pc tape
# lsdev –Pc cdrom


P stands for predefined and c stands for class of the device whether tape, cdrom, hdisk etc.

Remember: pre-defined devices are those which are in undefined/supported state.

For eg: to check pre-defined supported adapter:

# lsdev –Pc adapter

Command to list all the customized devices, command used is:
# lsdev –Cc hdisk
# lsdev –Cc tape
# lsdev –Cc cdrom

C stands for customized and c for class.
Remember: customized devices means devices are defined and available to the system.

For eg: to check customized adapter (to check Ethernet adapter (NIC Cards) availability)

# lsdev –Cc adapter
# lsdev –CH

Command is used to list entire information about customized devices.

# lsdev –PH

Command will list entire information about all pre-defined devices.

To check total number of CPUs, command used is:

# lsdev –Pc processor
# lsdev –Cc processor

To check how many interfaces are available, command used is:
# lsdev –Cc if

lsdev adapter & if commands
Each adapter will have 2 interfaces.

For eg:

Ent0 will have 2 interfaces, en0 and et0
En0 is used for assigning ip and et0 is used for IEEE Ethernet interface (for research).

IP is never assigned directly to the adapter, it is assigned to the interface. 256 ip’s can be assigned to a single interface.
We will discuss about all these concepts in network administration as well.

To check speed and attributes of processor, command used is:
# lsattr –EH –l proc0

lsattr commands
This will generally give speed as 332 mhz.

To check system attributes:
# lsattr –EH –l sys0
Command used to check real memory is:
# lsattr –EH –l sys0 –a realmem

Real memory can also be checked by using this command:
# bootinfo –r

Various bootinfo commands we have already discussed in this post.
Some other commands:

# lsattr -EH -l sys0 -a autostart

# lsattr -EH -l tty0 -a speed

# lsattr – EH -l mem0

# lsattr -EH -l inet0

0 blogger-disqus:

Post a Comment