Linux will be having most of the hardware devices created at the start of the system but you can always create new devices using the command:
# /dev/MAKEDEV -v ttyS0
create ttyS0 c 4 64 root:dialout 0660
This will be creating a device /dev/ttyS0 with permissions 0660 and ownership as root and dialout as group.
The kernel will be using the major and minor node numbers for the system and the same indicates that the device so created is a serial device.
*************************************************************************
MKNOD is another command used in creating devices. MKDEV is normally the preferred way of creating devices which do not exist but in rare cases there is a chance that the device files may not be known to the MKDEV command.
For the perfect usage of mknod command you should be aware about the minor and major nodes, the file devices.txt should contain the canonical names and details of the nodes.
So for creating the same node as created using the MAKEDEV command the commands will be :
mknod /dev/ttyS0 c 4 24
chmod 0660 /dev/ttyS0
chown root:dialout /dev/ttyS0
*******************************************************************************
LSPCI command is used to list the number of PCI buses available for the server. It is normally used to diagnose the troubles with PCI buses.
usage: $ lspci -tv
*******************************************************************************
LSDEV command is used for learning the information and status of the virtual I/O Devices. The normal usage is:
lsdev -type disk -fields name status
the various types are :
adapter
Lists adapters
disk
Lists disks
lv
Lists logical volumes and volume groups
optical
Lists optical devices (cdrom/dvdrom)
tape
Lists tape devices
tty
Lists tty devices
ent4sea
Lists all physical Ethernet adapters and Etherchannel adapters available for creating a shared Ethernet adapter
ven4sea
Lists all virtual Ethernet adapters available for creating shared Ethernet adapter
ent4ip
Lists all adapters over which interface can be configured.
To display the parent of a devices, type:
lsdev –dev hdisk0 -parent
************************************************************************************
LSUSB is the command used to list the current connected USB connections on the drive.Normal installations may fail to have this command inbuilt you will need to get the packages updated on the distribution with usbutils to get this working.
usage: lsusb
************************************************************************************
lsraid is the command used for displaying the status of the md devices on the server. The details are as mentioned in the configuration file /etc/raidtab. Again the command is able to distinguish between the online and offline devices and can give out the detailed statistics.
usage : lsraid -A
*************************************************************************************
HDPARM is used to modify or view the statistics of the hard disk. The command allows us to pass on the parameters on to the system and also to modify the current disk parameters like DMA settings, power management, etc..
The options available with hdparm can be dangerous on occasions since the parameters if specified incorrectly can cause trouble.
Turn on DMA for the first hard drive.
hdparm -d1 /dev/hda
Turn off DMA for the first hard drive.
hdparm -d0 /dev/hda
*******************************************************************************
more coming up....
0 comments:
Post a Comment