Contacts

Receiving information about the hardware Linux computer without using a screwdriver. We learn information about the "hardware" in the terminal DMesg Linux what makes

It is at the download stage that many errors may occur in services or equipment. Viewing these messages can be very useful. But they run very quickly and we can not always have time to read them. But they can all be viewed using the team dmesg..

DMesg - What is this utility and what is it eaten with?

During the system boot, while the kernel is loaded, the initialization system, driver, kernel modules, initializes the equipment to the screen output a large number of Messages that display kernel status information, boot process, as well as condition of devices.

It is at the download stage that many errors may occur in services or equipment. Viewing these messages can be very useful. But they run very quickly and we can not always have time to read them. But they can all be viewed using the dmesg command.

1. View messages during download

By running the DMesG command with superuser rights, you will receive all messages that displayed the kernel during boot. Here you can see a lot useful information. You can simply browse them on one line and try to understand what they mean. Now that you know how messages look like when downloading, you can easily deal with many problems if they arise.

$ dmesg | More [0.000000] Microcode: CPU0 Microcode Updated Early to Revisio N 0x29, date \u003d 2013-06-12 [0.000000] Initializing CGroup Subsys CPuset [0.000000] Initializing CGroup Subsys CPU [0.000000] Initializing CGroup Subsys CPUAcCT [0.000000] Linux Version. 4.1.20-11-default () (GCC Version 4.8.5 (SuSe Linux)) # 1 SMP PREEMPT FRI MAR 18 14:42:07 UTC 2016 (0A392B2)

2. View memory

With DMesg you can see the number available in the memory system:

$ dmesg | Grep Memory.

0.000000] Memory: 3848228k / 4006256k Available (6567K Kernel Code, 1085K RWDATA, 4852K Rodata, 1560K Init, 1520k BSS, 158028K Reserve, 0K CMA-Reserved)

3. View the status of network adapters

Since DMesG saves all messages about the state of devices, we can see the condition network adapteror, perhaps, errors that occurred during its initialization:

$ dmesg | GREP ETH [101.043873] TG3 0000: 02: 00.0 ETH0: Link IS Up AT 100 MBPS, Full Duplex [101.043885] TG3 0000: 02: 00.0 ETH0: Flow Control IS OFF for TX and OFF for Rx [101.043889] TG3 0000: 02 : 00.0 ETH0: Eee Is Disabled [101.043909] IPv6: Addrconf (NetDev_Change): ETH0: Link Becomes Ready

4. Resize DMESG buffer

If you think that the standard size of the DMESG buffer is not enough, you can change its size to increase the number of messages that can be there simultaneously. To do this, it is enough to edit the file and restart the computer.

$ vi /boot/config-4.1.20-11-default config_log_buf_shift \u003d 18

Change the value of the parameter of this string to the desired one, by default, I use 18, it means that the 18 kilobyte buffer will be created. But you can specify the size of the buffer as you want.

5. Clear buffer dmesg

Sometimes it may take to clean the DMesg buffer so that unnecessary messages are not confused. You can make it the following team:

$ dmesg -c.

Now if you execute the DMesG command again, the buffer will be empty.

6. Date and time in DMesg

As you can see, by default, there are no dates in DMesg, it is simply used by the label, the time shift from the start of the download. But it is also possible to see the full date and time of each message. To do this, see the /Var/log/kern.log file:

$ dmesg | Grep "L2 Cache" Oct 18 23:55:40 Ubuntu Kernel: [0.014681] CPU: L2 Cache: 2048K

So that everything worked must be configured and the Klogd service is running.

7. View DMesg errors

Here is such a simple combination you can see all the errors that occurred during the download or operation of the system:

$ dmesg | Grep Error

Consider a small example. For example, I do not work WiFi. I know that the adapter in the computer is, it is turned on and everything works in Windows. But now in no way. We look at the Log DMesg and see:

[21.772824] B43-PHY0 ERROR: Firmware File "B43 / Ucode15.fw" nOT FOUND. [21.772842] B43-PHY0 ERROR: Firmware File "B43-OPEN / UCODE15.FW" NOT FOUND [21.772852] B43-PHY0 ERROR: Please Open A Terminal and Enter. The Command "Sudo / USR / Sbin / Install_bcm43xx_firmware" To Download The Correct Firmware for this Driver Version. For An Off-Line Installation, Go To and Follow The Instructions in the "Installing Firmware from RPM Packages" Section.

From the message, we understand that the problem is here in the firmware, and the system even tells us with which team it can be solved, or where to read about the configuration of this case and download files. Thus, the problem that seemed unresolved, decided in a few minutes. View Linux logs - a very useful thing, do not forget to use it. That's all if you have any questions, write in the comments!

System administrators, and regular Linux users, often need to watch log files to troubleshoot. In fact, this is the first thing that any sysadmin should do when any error occurs.

Itself operating system Linux and working applications generate different types Messages that are registered in various log files. Linux uses special software, Files and directories for storing log files. Knowledge in which files are the logs of what programs will help you save time and faster solve the problem.

In this article, we will look at the main parts of the logging system in Linux, log files, as well as utilities with which you can see Linux logs.

Most Linux log files are located in the / Var / log / log folder. You can list log files for your system using the LS command:

RW-R - R-- 1 Root Root 52198 May 10 11:03 alternatives.log
DrWXR-X --- 2 Root Root 4096 Nov 14 15:07 Apache2
DrWXR-XR-X 2 Root Root 4096 Apr 25 12:31 AppARMOR
DrWX ------ 2 Root Root 4096 May 5 10:15 Audit
-RW-R - R-- 1 Root Root 33100 May 10 10:33 Boot.log

Below we consider 20 different Linux log files located in the / var / log / log. Some of these logs are found only in certain distributions, for example, dpkg.log is found only in Debian-based systems.

/ Var / Log / Messages - Contains global Linux login logs, including those that are registered when the system starts. Multiple messages are written to this log: it is mail, cron, various services, kernel, authentication and others.

/ Var / Log / Dmesg - Contains messages received from the kernel. Registers many messages at the download stage, they displays information about hardware devices that are initialized during the download process. You can say this is another Linux log system. The number of messages in the log is limited, and when the file is filled with each new message, the old will be overwritten. You can also see messages from this log using the Dmseg command.

/var/log/auth.log. - Contains user authorization information in the system, including user logins and authentication mechanisms that have been used.

/Var/Log/Boot.log. - Contains information that is registered when loading the system.

/var/log/daemon.log. - Includes messages from various background demons

/var/log/kern.log. - also contains messages from the kernel, useful when troubleshooting user modules embedded in the kernel.

/ Var / Log / Lastlog - Displays information about the last session of all users. Is not text fileYou must use the Lastlog command to view it.

/ Var / log / maillog /var/log/mail.log - Server magazines emailrunning in the system.

/var/log/user.log. - Information from all magazines at user-level.

/var/log/xorg.x.log. - Log messages x server.

/var/log/alternatives.log. - Information about the operation of the Update-Alternatives program. These are symbolic links to commands or libraries by default.

/ VAR / LOG / BTMP - Log. linux file Contains information about unsuccessful input attempts. To view the file, it is convenient to use the Last -F / Var / Log / BTMP command.

/ Var / Log / Cups - All printing messages and printers.

/var/log/anaconda.log. - All messages registered during installation are stored in this file.

/var/log/yum.log. - registers all the information about installing packets using Yum.

/ VAR / LOG / CRON - Whenever the CRON daemon runs the program execution, it records the report and messages of the program itself in this file.

/ Var / Log / Secure - Contains information related to authentication and authorization. For example, SSHD registers everything here, including unsuccessful attempts to log in.

/ VAR / LOG / WTMP or / VAR / LOG / UTMP - Linux system logs , contain log in the log input log. Using the WTMP command you can find out who and when entered the system.

/ Var / Log / Faillog - Log. linux systems, Contains unsuccessful attempts to log in. Use the FailLog command to display the contents of this file.

/var/log/mysqld.log. - Linux log files from MySQL database server.

/ VAR / LOG / HTTPD / or / VAR / LOG / ApACHE2 - Linux11 log files Apache files. Access logs are located in the Access_log file, and errors in Error_log

/ Var / Log / Lighttpd / - Linux log server LIGHTTPD logs

/ VAR / Log / Conman / - CONMAN client log files,

/ var / log / mail / - This directory contains additional mail server logs.

/ Var / Log / Prelink / - The Preform Program connects libraries and executable files to speed up the process of downloading them. /Var/Log/preLink/Prelink.log contains information about oso files that have been changed by the program.

/ VAR / LOG / Audit /- Contains information created by Auditd audit daemon.

/ var / log / setrubleshoot / - SE Linux uses the SETROUBLESHOOTD (SE TRUBLE SHOOT DAEMON) for notification of safety issues. This magazine contains messages of this program.

/ VAR / Log / Samba / - contains information and magazines file Server SAMBA that is used to connect to common folders Windows.

/ VAR / LOG / SA / - Contains .cap files collected by the SYSSTAT package.

/ VAR / LOG / SSSD / - Used by the system security demonstration, which manages remote access On catalogs and authentication mechanisms.

View logs in Linux

To view logs on Linux conveniently use several utilities command line Linux. It can be any text editor, or special utility. Most likely, you will need a superuser's rights to view logs in Linux. Here are the commands that are most often used for these purposes:

  • zgrep
  • zmore.

I will not stop in detail on each of these teams, since most of them have been reviewed in detail on our website. But I will give a few examples. View Linux logs is very simple:

We watch log / var / log / messages, with the possibility of scrolling:

lESS / VAR / LOG / Messages

View Linux logs, real-time:

tail -F / Var / Log / Messages

Open log file dmesg:

cat / Var / Log / Dmesg

The first lines of DMesg:

head / Var / Log / Dmesg

Display only errors from / var / log / messages:

grep -i Error / Var / Log / Messages

In addition, it is possible to view logs on Linux using graphic utilities. The System Log Viewer program can be used for convenient viewing and tracking system logs on a laptop or personal Computer With Linux.

You can install the program in any system with the X server installed. Also, any graphic test editor can also be used to view logs.

conclusions

In the / var / log catalog you can find all necessary information about linux work. From today's article you have learned enough to know where to look, and what to look for. Now watching logs in Linux will not cause you problems. If you have any questions, ask in the comments!

In this article I want to write about console programs that will help to issue full information About the "hardware" of your PC (manufacturer, brand, device ID and other data about equipment). Many users who have moved to Linux with an evil corporation, are used to working in graphic programsBut over the years of work in Linux you understand that in the terminal everything works faster, issued information fully and flexible.

Utility lspci. - Unix utility that displays detailed information About all PCI tires and devices on them. The LSPCI utility first reads information from the PCI bus, and then more information is looking for in its own database, which is in the file /usr/share/hwdata/pci.ids. And contains such data as an equipment identifier, manufacturer, devices, classes and subclasses. To run the program, run in the terminal:

lspci.


02: 00.0 Ethernet Controller: Realtek Semiconductor Co., Ltd. RTL8111 / 8168/8411 PCI EXPRESS. Gigabit Ethernet Controller (Rev 06)
03: 00.0 USB Controller: ASMEDIA TECHNOLOGY INC. ASM1042 SUPERSPEED USB HOST CONTROLLER
04: 00.0 SATA CONTROLLER: JMICRON Technology Corp. JMB362 SATA CONTROLLER (REV 10)
05: 00.0 USB Controller: ASMEDIA TECHNOLOGY INC. ASM1042 SUPERSPEED USB HOST CONTROLLER
06: 00.0 SATA CONTROLLER: JMICRON Technology Corp. JMB362 SATA CONTROLLER (REV 10)

07: 06.0 Firewire (IEEE 1394): Via Technologies, Inc. VT6306 / 7/8 IEEE 1394 OHCI Controller (Rev C0)

To obtain advanced information, follow:

lspci -V.

03: 00.0 USB Controller: ASMEDIA TECHNOLOGY INC. ASM1042 SuperSpeed \u200b\u200bUSB Host Controller (Prog-IF 30)

Flags: Bus Master, Fast Devsel, Latency 0, IRQ 46
Memory AT Fe500000 (64-bit, non-prefetchable)
Capabilities:

05: 00.0 USB Controller: ASMEDIA TECHNOLOGY INC. ASM1042 SuperSpeed \u200b\u200bUSB Host Controller (Prog-IF 30)
Subsystem: Asustek Computer Inc. P8B WS Motherboard
Flags: Bus Master, Fast Devsel, Latency 0, IRQ 50
Memory at Fe300000 (64-bit, non-prefetchable)
Capabilities:
Kernel Driver in Use: Xhci_hcd

07: 05.0 Multimedia Video Controller: Conexant Systems, Inc. CX23880 / 1/2 / 3 PCI Video and Audio Decoder (Rev 05)
Flags: Bus Master, Medium Devsel, Latency 32, IRQ 20
Memory AT FB000000 (32-bit, non-prefetchable)
Capabilities:
Kernel Driver in Use: CX8800

07: 06.0 Firewire (IEEE 1394): Via Technologies, Inc. VT6306 / 7/8 IEEE 1394 OHCI Controller (Rev C0) (Prog-IF 10)
Subsystem: Asustek Computer Inc. Motherboard
Flags: Bus Master, Medium Devsel, Latency 32, IRQ 21
Memory AT FC000000 (32-bit, non-prefetchable)
I / O Ports AT A000
Capabilities:
Kernel Driver in Use: Firewire_Ohci
As a result, the text will be much more, but also information about the equipment will be more voluminous. You can even find out, for example, the IRQ number on which the desired device is hanging. If you need to know information about specific equipment, such as video nVIDIA mapThen you need to apply the search command with the Grep command. As a result, our team will be next:

lspci | Grep Nvidia.

It should be paid to the fact that the GREP command is sensitive to register of characters, so if you did not find it from the first time necessary informationYou should change words to search, for example: NVIDIA, NVIDIA or part of the word - IDIA or IDIA.

The output of the team was the following:

01: 00.0 VGA Compatible Controller: NVIDIA Corporation GF108 (Rev A1)
01: 00.1 Audio Device: NVIDIA Corporation GF108 High Definition. Audio Controller (Rev A1)

If you want to receive information about the equipment in a text file, then execute the command:

LSPCI\u003e lspci.txt

As a result, a textile file LSPCI.TXT will appear in your home directory.

If you need to get a list of all devices in the system, including USB and SCSI, memory configuration, find out the processor type, you can use the program dmesg.. It displays the entire equipment list that will be detected by the core of the system.

Run the command in the terminal:

dmesg.

If you execute the command:

dmesg | less

the list of found equipment will be very large. Therefore, to analyze all the information, I advise you to save the output of this command in the text file. To do this, execute the command:

dmesg | less\u003e dmesg.txt

DMESG output can also be filtered to search necessary devices. The following command will show a list of all USB devices in the system:

dmesg | Grep -i USB.

You can also use utility lSHW.. If not installed, then execute the command:

Sudo APT-Get Install LSHW

To run it to execute the command:

Sudo LSHW.

The program displays a structured list of equipment along with information about devices. The information is obtained very tank and useful. Part of the information from the output utility:

* -Cdrom
Description: DVD-RAM Writer
Product: DRW-24B5ST
Manufacturer: ASUS.
Physical ID: 0.0.0
Tire information: [Email Protected]:0.0.0
Logical Name: / Dev / SR1

Version: 1.00
Features: Removable. audio CD-R CD-RW DVD DVD-R DVD-RAM
Configuration: anSiSion \u003d 5 Mount.fstype \u003d ISO9660 Mount.Options \u003d ro, nosuid, nodev, relatime, uid \u003d 1000, gid \u003d 1000, iocharset \u003d utf8, mode \u003d 0400, dmode \u003d 0500 State \u003d Mounted Status \u003d Ready
* -medium
Physical ID: 0
Logical Name: / Dev / SR1
Logical name: / media / dm / disk
Configuration: Mount.fstype \u003d ISO9660 Mount.Options \u003d ro, nosuid, nodev, relatime, uid \u003d 1000, gid \u003d 1000, ocharset \u003d utf8, mode \u003d 0400, dmode \u003d 0500 state \u003d Mounted

You can still pull out the MONGO useful information from the / Proc. It is a certain "blind" state of the system and its variables, which stores a lot of useful information about the system, namely: the charge level of the laptop batteries, info about the processor, fan speed, information about connected devices, and a lot more. To view which files are in the / proc directory you need to execute the command:

LS / PROC /

To find out the information about the processor, execute the command:

CAT / PROC / CPUINFO

In my case, the conclusion was such (only part of the text information is shown):

processor: 0.
vendor_id: authenticamd.
cPU Family: 21
model: 1.
model Name: AMD FX (TM) -6100 Six-Core Processor
stepping: 2.
microcode: 0x6000629.
cPU MHZ: 1400.000
cache Size: 2048 KB
physical ID: 0
siblings: 6.
core ID: 0
cPU Cores: 3
aPICID: 16.
initial Apicid: 0
fPU: Yes
fPU_EXCEPTION: Yes
cPUID LEVEL: 13
wP: Yes

To find out the laptop battery status, you need to execute the following command:

Cat / Proc / ACPI / Battery / Bat0 / Info

To find out all connected USB devices you need to use the utility lsusb.. Run the command:

lsusb.

Bus 003 Device 004: ID 13FE: 4100 Kingston Technology Company Inc.
Bus 003 Device 003: ID 125F: C96A A-DATA Technology Co., Ltd. C906 Flash Drive.
Bus 003 Device 001: ID 1D6B: 0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1D6B: 0001 Linux Foundation 1.1 Root Hub
Bus 006 Device 001: ID 1D6B: 0001 Linux Foundation 1.1 Root Hub
Bus 002 Device 004: ID 058F: 6361 Alcor Micro Corp. Multimedia Card Reader.
Bus 002 Device 001: ID 1D6B: 0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 046D: C05A Logitech, Inc. M90 / M100 Optical Mouse
Bus 005 Device 001: ID 1D6B: 0001 Linux Foundation 1.1 Root Hub
Bus 001 Device 001: ID 1D6B: 0002 Linux Foundation 2.0 Root Hub
Bus 004 Device 001: ID 1D6B: 0001 Linux Foundation 1.1 Root Hub
BUS 011 Device 001: ID 1D6B: 0003 Linux Foundation 3.0 root hub
Bus 010 Device 003: ID 04D9: 1702 HOLTEK SEMICONDUCTOR, INC.
Bus 010 Device 002: ID 046D: 0829 Logitech, Inc.
Bus 010 Device 001: ID 1D6B: 0002 Linux Foundation 2.0 Root Hub
Bus 009 Device 001: ID 1D6B: 0003 Linux Foundation 3.0 Root Hub
Bus 008 Device 001: ID 1D6B: 0002 Linux Foundation 2.0 Root Hub

And finally, a couple of utilities for hard disk information. Utility hDPARM. regulates and browsing the parameters hard disks with ATA interface. It can set parameters such as the scope of the drive of the drive, sleep mode, power management, acoustics control and DMA settings. To find out the information about the connected hard drives, execute the command:

Sudo HDPARM -I / DEV / SDA

We will learn information about your Winchester / Dev / SDA. I give part of the output:

ATA Device, With Non-Removable Media
Model Number: WDC WD6400AARS-00Y5B1
Serial Number: WD-WCAV5D714851
Firmware Revision: 80.00A80
Transport: Serial, SATA 1.0a, SATA II EXTENSIONS, SATA REV 2.5, SATA REV 2.6
Standards:
Supported: 8 7 6 5
Likely Used: 8
Configuration:
Logical Max Current
Cylinders 16383 16383.
Heads 16 16.
Sectors / Track 63 63

CHS CURRENT ADDRESSBLE SECTORS: 16514064
LBA User Addressable Sectors: 268435455
LBA48 User Addressable Sectors: 1250263728
Logical / Physical Sector Size: 512 bytes
If the program is not installed, then execute the command in the terminal:

Sudo Apt-Get Install HDPARM

FDISK -L.

As a result, we will see a list of all connected hard drives, flash drives and memory cards. We will also see how many sections are created on the disk.

Disc / dev / sda: 640.1 GB, 640135028736 byte
255 heads, 63 sectors / tracks, 77825 cylinders, total 1250263728 sectors
Units \u003d Sectors of 1 * 512 \u003d 512 bytes
Size sector (logical / physical): 512 bytes / 512 byte
I / O Size (Minimum / Optimal): 512 bytes / 512 bytes
Disc ID: 0x0009D6F7

Uzters-in Zapar Start End Blocks ID System
/ dev / sda1 * 2048 61441501 30719727 83 Linux
/ Dev / SDA2 61442048 73730031 6143992 82 Linux Swrap / Solaris
/ dev / sda3 73730048 1250263039 588266496 83 Linux

On this all and good luck to everyone!

—————————————————————————

Handsome Ákos from the popular Hungarian group Bonanza Banzai

Equipment diagnostics is a fairly important question that cannot be missed. That is why in the series "Sisadmin's Cheat Sheet" for Debian OS I can not not add an article about the means of obtaining information about devices. This time I will try to briefly tell about the main utilities for the diagnosis of certain server components. I will, of course, with the default funds built by default, since any sysadmin should know and be able to use them. Next will be an overview of the packages with a total intended. In the course, the account will come to acquaintance with additional advanced tools that everyone can put at will.

You can find information about the processor using the command:
[Email Protected]:~# cAT / PROC / CPUINFO

Or some other data:
[Email Protected]:~# lscpu.

RAM

Summary of memory use:
[Email Protected]:~# free -m.

The utility also displays information about the use of swap. Instead of the key -m, it may even be better to use -h - get data with the notation of the volume.

Extended information:
[Email Protected]:~# cat / Proc / Meminfo

Hard drives

Display a list of existing sections:
[Email Protected]:~# fDISK -L.

It is worth noting that the main purpose of the FDISK utility is to manage disk partitions.

Display UUID and the type of file system for each partition can be using the command:
[Email Protected]:~# blkid

Information about sections, mount points and some other data can be obtained using the LSBLK utility
[Email Protected]:~# lSBLK.

The command displays all block devices in the tree structure.

Net

Interface Information:
[Email Protected]:~# iFconfig

Details of the network card
[Email Protected]:~# mII-TOOL -V

To check the accessibility of nodes, use the well-known Ping utility.

General Use Utilities

top.

The TOP utility is used to display information about the processes and resources that they consume. Information is updated with a certain frequency. Data can be sorted, for example, using processor power or random access memory (By default, sorting by CPU).
[Email Protected]:~# top.

dmidecode.

You can get detailed information about hardware using Dmidecode. The utility provides data obtained from BIOS. The description of the package provides the following reference:

This information usually includes a system manufacturer, model name, serial number, BIOS version, Resource Descriptor (Asset Tag) as well as other information of various levels of interest and accuracy, installed by the manufacturer. Often contains the state of employed processor sockets, expansion slots (for example, AGP, PCI, ISA), memory slots and a list of I / O ports (for example, serial and parallel ports, USB).

Remember that the data issued by DMI is not so reliable so that they should be blindly trusted. Dmidecode does not scan hardware, it simply displays the data that BIOS provides it.

[Email Protected]:~# dmidecode.

The output of the command without arguments is too voluminous, it is better to use the -Type key and receive only the necessary sections, for example:
[Email Protected]:~# dmidecode -Type 5,6

The command will display the type of memory controller and the RAM modules used.

dmesg.

The command is used to output the kernel message buffer. From the point of view of hardware, the conclusion may be useful for analyzing equipment problems, and indeed to complete the presentation of the existing "iron". The output of the command is too voluminous and other tools may be needed for its analysis, for example, you can use the output to the file, you can redirect the output of the LESS command, and you can find the hardware components you need using Grep.
[Email Protected]:~# dmesg | Grep Processor.

The command will display only the lines containing the word Processor.

lspci.

The utility is convenient to use to display the list of all devices connected to the PCI bus. Information can be used for diagnostic purposes, as well as to determine the installed devices.
[Email Protected]:~# lspci.

Use the -T key to display information in the tree view in which all bus and devices connected to them will be displayed. Keys -v, -vv, -vvv display additional information on each device; The larger the "V", the more detailed data output.

In general, the utility is extremely useful when working with the hardware component and allows you to obtain maximum data.

vmstat.

Shows summary status information virtual memory, as well as about the swap.
[Email Protected]:~# vmstat 2.

The command above will display updated data every 2 seconds (instead of 2 you can specify any other number).

sysctl

Although the utility is intended mainly to control the parameters of the kernel on the fly, the analysis of the established values \u200b\u200bcan help in the diagnosis of problems.
[Email Protected]:~# sYSCTL -A.

The command will display all variables and their values.

Additional utilities

All utilities described below are not included in the standard Debian configuration, will have to be installed separately.

hop.

Stronger replacement of a regular Top utility. IN standard configuration The system is not supplied. Provides a convenient interactive interface with a built-in help and updating of real-time data.
[Email Protected]:~# hTOP -D 10.

The -D key sets a value in tenths of a second to update the data. The -c key switches the program to monochrome mode.

lSHW.

The utility is designed to withdraw detailed information About hardware. Most conveniently exported by V.HTML type and view in the browser. This method, of course, is excluded when working in the console mode, except if you view the data on another system.
[Email Protected]:~# lSHW -C Network

The command will display data only on the network card.

smartmontools.

The package consists of two utilities (SmartTL and SmartD), which are followed by S.M.A.R.T-valid drives. To start a demon, it is necessary to produce a number of settings:

Rassate the lines and in brackets to specify all the devices on which you need to track the state.

enable_smart \u003d "/ dev / sda / dev / sdb / dev / sdc / dev / sdd / dev / sde"
Start_SmartD \u003d Yes.
SmartD_OPTS \u003d "- Interval \u003d 1800"

However, when starting service on virtual Machine From Debian 7.7 I gave me an error (I must say that tracking S.M.A.R.T on virtual hard drives is a rather crazy idea, I did it only with the purpose of testing):

View the state of the disk by the command:
[Email Protected]:~# smartTl -A / dev / sda

Despite this, the utility is quite common and unequivocally recommended for use. In addition, the network has a lot of instructions for setting up E-Mail notifications in case of hard disk problems.

hDPARM.

The main purpose of the program is thin tuning Parameters IDE / SATA hard disks, performance tuning. In addition, you can also view the device characteristics by the command (specify your disc):
[Email Protected]:~# hDPARM -I / DEV / SDA

Disc configuration issues within this article are not planned to be considered.

eTHTOOL

The ETHTOOL utility will help you to diagnose the network card. Of course, it is possible to pull out information using ifconfig, and dmesg, etc., but incomparably more useful data you get from Ethtool. It should be noted that with virtual network interfaces the program works quite crookedly. For example, the display of statistics on the interface I was at all empty:
[Email Protected]:~# ethtool -s Eth0.
no Stats Available

General information about the interface was approximately as scarce:
[Email Protected]:~# eTHTOOL ETH0.
Settings for eth0:
Link Detected: Yes

With physical interfaces, the situation is significantly better. In addition to diagnostics, the utility is also intended to configure interfaces.

sysstat.

The package contains a number of utilities capable of issuing information about the performance of certain system components. Youostat may be particularly useful when it is necessary to analyze the loading of hard drives in the I / O operations.

I have listed far from all the basic tools, acquaintance with which it is necessary, but as far as possible is going to complement the article with the necessary material.

Problem
With all their advantages tire PCI. - yesterday's day. More often requires half a list of all devices in the system, not only PCI devices: it is uSB devices,
and SCSI devices, memory configuration and even processor.
Decision
Use the DMesG program. The program displays the entire equipment found by the core.
To view the entire DMesG output, enter the command
$ dmesg | less
DMESG output can also be filtered to search for specific
devices. So, the following command displays a list of all PCI devices:
$ dmesg i grep -i USB
Output list of ISA devices:
$ DMesg] Grep -i ISA
ISAPNP: Scanning for PNP Cards ...
ISAPNP: SB Audio Device Quirk - Increasing Port Range
ISAPNP: Card "SupraExpress 56i Voice"
Determining the volume of physical memory in the system:
$ dmesg | Grep -i Memory.
Memory: 256492/262080K Available (1467K Kernel Code. 5204 reserved. 516K Data. 96K
I n i t. OK HIGHMEM)
Output of the IDE device list using the SCSI emulation subsystem in the poison 2.4 and older versions:
$ dmesg | Grep -i SCSI
Kernel Command Line: root \u003d / dev / hda6 RO HDB \u003d SCSI HDC \u003d SCSI
IDE_Setup: HDB \u003d SCSI
IDE_Setup: HDC \u003d SCSI

HDB: attached IDE-SCSI DRIVER
HDC: attached IDE-SCSI DRIVER
SCSIO: SCSI Host Adapter Emulation for IDE Atapi Devices
But what the "real", non-emulated devices of SCST look like:
$ dmesg | Grep -i SCSI
SCSI SUBSYSTEM DRIVER REVISION: 1.00
SCSIO: Adaptec AIC7xxx EISA / VLB / PCI SCSI HBA Driver, Rev. 6.2.8
AIC7892: Ultral60 Wide Channel A, SCSI ID \u003d 7. 32/253 SCBS.
... Vendor: IBM-PSG Model: DPSS-336950M M Rev: S9HA
ATTACHED SCSI DISK SDA AT SCSIO, CHANNEL 0. ID 0. LUN 0
(SCSI0: A: 0): 160.000MB / S Transfers (80.000mhz DT. Offset 63. 16bit)
SCSI Device SDA: 71096640 512-BYTE HDWR Sectors (36401 MB)
Partition Check:
SDA: SDAL SDA2SDA3 SDA4< sda5 sda6 >
Next features information about uSB cameraconnected to the system, including
Her location in the file system. Usually USB Device Information
takes a dozen lines and more:
% dmesg | Grep -i USB.
. . .
USB.C: REGISTERED NEW D R I V E R IBMCAM
ICMCAM.C: IBM PC Camera USB Camera Found (Model 2. Rev. 0x030A)
USBVideo.c: IBMCAM ON / DEV / VIDEOO: canvas \u003d 352x240 videosize \u003d 352x240
Output of information about serial ports:
$ dmesg | Grep -i Tty.
TTYSOO AT 0x03F8 (IRQ \u003d 4) IS A 16550A
Output of information about the processor (or processors):
$ dmesg | Grep -i CPU.
Initializing CPU # 0
CPU: Li I Cache: 64k (64 bytes / Line). D Cache 64k (64 Bytes / Line)
CPU: L2 Cache: 64K (64 Bytes / Line)
Intel Machine Check Reporting Enabled On CPU # 0.
CPU: After Generic, Caps: 0183F9FFF CLC7F9FF 00000000 00000000
CPU: COMMON CAPS: 0183F9FFFF CLC7F9FF 00000000 00000000
CPU: AMD DURON (TM) Processor Stepping 01
Please note: only those lines are returned when searching, in which the desired substring is obscured. Often additional information contains
In adjacent lines and is a direct viewing of the file:
Initializing CPU # 0
Detected 801.446 MHz Processor.



Did you like the article? Share it