System information about a linux computer. The rugged Pico-ITX SBC runs Linux on a low power i.MX6 UL. Tracing library calls

Let's look at some useful commands and utilities with which you can get information about hardware in Linux. Such a need arises, for example, when you need to install a driver for some computer device and you need to know its exact name. Or, for example, you want to get information about the occupied memory or computer resources.

Processor Information (CPU)

You can get all the necessary information about the central processor in Linux by running the command in the terminal:

Cat / proc / cpuinfo

To determine if your processor is 32-bit or 64-bit, you need to look at the flags that are indicated in the command output. If among the flags there is lm (long mode), this means your processor is 64-bit. For example, when executing the command cat / proc / cpuinfo we can get the following flags:

Flags: fpu vme de acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon ...

PCI device information (video card information)

Using the command lspci you can display all information about PCI devices:

This command is often used to get information about a video card. Since the command output is lspci large enough, you can use the command grepto set the search term. For example, if we know that we have an Nvidia video card, then we can use the command:

Lspci | grep nVidia

And as a result, you get something like:

01: 00.0 VGA compatible controller: nVidia Corporation G72M (rev a1)

Please note that the grep command is case-sensitive and therefore, if you did not find what you were looking for the first time, then you should try another spelling, for example, nvidia, NVIDIA or simply idia... Similarly, you can search for information in the output of any other commands by adding to the command: " | grep search-string.

Information about the driver version for Nvidia video cards in Linux can be obtained by running:

Cat / proc / driver / nvidia / version

Random access memory (RAM) information

To get information about the volume, as well as the amount of free and used RAM, you can use the command:

Free -t -m

Information about virtual memory can be obtained with the command vmstat:

If you need more detailed information about the processes occupying RAM, about the processor (CPU) load, then you can use the Top or htop utilities. The top utility is usually always present on Linux. To run it, just run:

Hard disk information

Information about hard disk partitions in Linux:

Sudo fdisk -l

Information about mounted partitions, the amount of free and used memory:

There is another useful command du, which displays information about the size of each file in the current and subdirectories. If you want to get information about all files in the current directory, run the command without parameters:

As a parameter, you can set the file name, for example, to find out the file size abc.bin run:

Du abc.bin

Information about USB devices and USB buses

To display information about USB buses and connected USB devices, use the command lsusb:

Non-console programs

Consider a few graphics programs that will help you when working with equipment.

The Gnome desktop environment provides a graphical System monitor utility. It displays information about CPU usage, running processes (applications), information about hard drives, and also displays graphs, including network usage. From the command line, you can run it by running:

Gnome-system-monitor

To work with hard drives, you can use the GParted program.

Additional Information

Finally, it is worth mentioning a very important team lshw, which displays almost all information about your computer. The team lshw you need to run as root:

Sudo lshw

To display brief information, the key is used -short:

Sudo lshw -short

For more information on the commands described in this article, use the Linux help system. To do this, in the console you need to run:

Man command-name

For example, to get all information about a team du, run the command.

If you have a need to find out what is hidden from your eyes inside a computer running Linux (we will consider the methods that work in Linux Mint and Ubuntu), then doing this is no more difficult than in Windows, and sometimes even easier. There are several methods for this, which we propose to consider in this article.

Let's start with perhaps the most familiar method for an ordinary user, inexperienced with all the delights of the Linux OS. Let's imagine that you have switched to Linux relatively recently, and have not completely lost the habit of Windows that you are used to.

In Windows, to find out detailed information about the hardware, users usually use special programs, such as AIDA64 and similar. We assure you that Linux is not left out in this regard. It may not contain such a variety of similar programs, but there will definitely be those that will provide you with a full report on the configuration of your computer.

One of these programs is HardInfo (after installation it appears in the menu as System Profiler and Benchmark). With the help of this utility, you can get the most complete picture of the hardware "stuffing" of your computer hiding from you. You can install it from your distribution's repository.

HardInfo Program in Linux Mint 18 Sarah Mate

The program presents in an accessible graphic form the main points on which you can get information. You just need to click on the desired icon and the program will display the main characteristics of the system.

HardInfo. Information about the memory installed in the computer.

The program also provides for the creation of a report in html format, which you can then view in a browser. To do this, you need to click "Generate Report", select the items for which you want to see the report and wait for the result.

HTML report generated in the HardInfo program.

Despite all its advantages, the HardInfo program provides more meager results than what you get with the terminal and a few commands.

First, let's give the utility lshw To install it, you need to enter in the terminal: sudo apt-get install lshw After installation, in order to find out the characteristics of the system, just enter the command in the terminal sudo lshw

Output of sudo lshw command in terminal.

As you can see, the list is very long. In order to shorten it, you can enter the command sudo lshw -short The list will be shorter and more compact.

Output of sudo lshw -short command in terminal.

There is also another variation of this command, which will allow you to view the complete list, but at the same time you will load it as needed: sudo lshw | more

This is the result after entering the command in the terminal sudo lshw | more (now all you have to do is press the Enter key and read the output).

To generate a report in html format, enter the command lshw -html\u003e hardware.html (in this case, the report will be saved in the user's folder - the one where the Downloads, Music, etc. folders are located).

It should be mentioned that the system has a / proc / folder, which also contains information about the hardware of your computer. For example, we will give several related commands that, when typed in the terminal, will display the information of interest to us:

cat / proc / cpuinfo - will display information about the processor

cat / proc / meminfo - will display information about RAM

cat / proc / partitions - will display information about hard disk partitions

We hope that this information will help you uncover the secrets of the inner world of your Linux PC.

How can I find out the characteristics of a computer in Linux? updated: January 21, 2017 by the author: Maxim Ivanov

You may need to collect all the available information about the Ubuntu system and hardware if you have a new computer or laptop and are wondering what hardware is there. It may also be necessary if you need to replace any component, for example, a hard drive. Well, or even just like that. To replace equipment, you need to know all the information in advance. Also, information about the Ubuntu hardware may be needed if you are going to configure Wifi, Bluetooth, webcam or install drivers for a video card.

In this article, I will list the commands with which information about the Ubuntu operating system can be obtained. All commands have been tested on Ubuntu 16.04, but should work on any modern distribution like Debian, Fedora, OpenSUSE, etc.

Find out the hostname

The easiest way to find out the hostname of your machine is with the hostname command:

cat / etc / hostname

If you have a server, you can see the domain name of the host determined by DNS:

The fully qualified domain name of the host (FQDN) can be viewed with the command:

server01.site

Find the manufacturer, serial number

If you have a laptop, you can get information such as the manufacturer, serial number, and other information about the Ubuntu hardware, encoded in dmi:

sudo dmidecode -s system-serial-number
$ sudo dmidecode -s system-manufacturer
$ sudo dmidecode -s system-product-name

See all available information with the command:

sudo dmidecode | more

You can also use the lshw command, in some distributions you will have to install it:

sudo lshw | more
$ sudo lshw -short

Information about connected equipment

The command will show all connected equipment, used PCI and USB ports, etc.

Processor information

Information about the linux processor is readily available too:

cat / proc / cpuinfo

processor: 0
vendor_id: AuthenticAMD
cpu family: 16
model: 6
model name: AMD Athlon (tm) II X2 250 Processor
stepping: 3
microcode: 0x10000c8
cpu MHz: 2300.000

CPU usage statistics

You can view the processor load with the command:

21:56:27 CPU% usr% nice% sys% iowait% irq% soft% steal% guest% gnice% idle
21:56:27 all 18.27 0.33 5.26 2.01 0.00 0.04 0.00 0.00 0.00 74.10

You may need to install the utility by installing the sysstat package.

Memory information

You can view statistics on memory usage in the system with the command:

less / proc / meminfo

MemTotal: 6109876 kB
MemFree: 188544 kB
MemAvailable: 2117964 kB
Buffers: 254120 kB
Cached: 1595932 kB

If you do not need such detailed information, you can get information about linux with the free command.

Display memory information in megabytes:

In gigabytes:

In readable form:

Swap information

You can see if the swap partition is connected and how big it is with the commands:

Virtual memory information

sudo vmstat
$ sudo vmstat 1
$ sudo vmstat 2

Distribution version

The command will show the version and name of the distribution, as well as some additional information, this is important information about the linux operating system:

Kernel version

The kernel is the most important component of the system. Information about the Ubuntu system, namely the kernel version, is available using the uname command.

uname -r
$ uname -a

Linux dhcppc0 4.1.15-8-default # 1 SMP PREEMPT Wed Jan 20 16:41:00 UTC 2016 (0e3b3ab) x86_64 x86_64 x86_64 GNU / Linux

Kernel startup parameters

cat / proc / cmdline
$ sysctl -a | more

System architecture

uname -m
$ getconf LONG_BIT
$ arch

Hard disk information

We look at the connected hard drives:

fdisk -l | grep "^ Disk / dev"

Disk / dev / sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk / dev / sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors

We look at the partitions on a specific disk:

fdisk -l / dev / sda

Find out the disk label:

sudo fdisk / dev / sda
$ sudo e2label / dev / sda1
$ sudo cfdisk / dev / sda

Information about block devices

Block device attributes:

List of all block devices:

Free disk space

Ubuntu System Information includes disk information. Display the used space of all drives:

df
$ df -H
$ df -HT

Show size of files in home folder:

du
$ du / home

Mounted disks

View all monitored file systems:

cat / proc / mount
$ mount

SCSI devices

Display parameters of SCSI devices connected to the system:

I / O statistics:

sudo iostat
$ sudo iostat 2

PCI Device Information

PCI devices are all devices connected to the computer's motherboard, such as a processor, network card, wireless adapter, and so on. In fact, you can look at the Ubuntu hardware by looking at the pci devices.

lspci
$ lspci -vt
$ lspci | grep -i "device"
$ lspci -vvvn | less

USB information

In addition to PCI devices, there are also external USB, these are printers, Bluetooth adapter, mouse, keyboard. This is also important information about the Ubuntu computer.

lsusb
$ lsusb -vt

Information about wireless network adapters

The model and manufacturer of the network adapter can be viewed through lscpi, but you cannot find out more detailed information about the settings and supported functions, there are commands for this:

iwconfig
$ watch -n 1 cat / proc / net / wireless
$ wavemon
$ iw list

Graphics card information

lspci | grep -i vga
$ lspci -vvnn | grep VGA

sudo lshw -class display

NVIDIA graphics card information

If proprietary drivers are installed, information about the video card can be viewed with the command:

This will provide more detailed information about the Ubuntu machine than the normal lspci output.

ATI Readon Graphics Card Information

For the command to work, the ATI driver must be installed:

Unity version

Audio device information

lspci | grep -i audio

cat / proc / asound / cards

Battery status

On a laptop, we may need to see the battery status:

upower -i / org / freedesktop / UPower / devices / battery_BAT0
$ acpi -V

System uptime

uptime

uptime
$ cat / proc / loadavg
$ sudo top
$ sudo htop
$ sudo atop

Shutdown and reboot history

last reboot
$ last shutdown

Current RunLevel

RunLevel is the runlevel in the SysVinit init system.

runlevel
$ who -r

Viewing the kernel log

Very useful information about the Ubuntu computer, information about errors and problems is in the kernel log:

sudo less / var / log / dmesg
$ sudo grep "regx" / var / log / dmesg
$ sudo grep "d" / var / log / dmesg

Loaded kernel modules

sudo lsmod
$ sudo modinfo _____ module_name ___

Network information

View local ip address and other information about network interfaces:

sudo ip a
$ sudo ip
$ sudo ip link ls up
$ sudo ifconfig -a

View only eth0 interface info:

sudo ip a show eth0
$ sudo ifconfig eth0

View routing table:

sudo ip r
$ sudo route -n
$ sudo netstat -nr

View network bridges:

sudo brctl show
$ sudo bridge link

DNS server information

The addresses of the DNS servers with which the system works are located in the /etc/resolv.conf file:

cat /etc/resolv.conf

DNS system settings are located in /etc/host.conf file

cat /etc/host.conf

Socket information

We look at open network and local sockets:

All listening ports:

sudo netstat -tulpn
$ sudo netstat -tulpn | grep LISTEN

We look at all TCP sockets:

UDP sockets:

We look at the files open in the system:

lsof | more
$ lsof | grep something
$ lsof / dev / sda2

Service information

We look at all running services. In SysVinit:

sudo service --status-all

sudo initctl list

Check if the service is loaded automatically:

sudo initctl status service-name
$ sudo initctl status smbd

sudo service service_name status
$ sudo service nginx status

View log files

cd / var / log
$ ls -l
$ tail -f / var / log / filename
$ grep "what_needed" / var / log / filename

Search for a file by name

With Locate:

locate filename
$ locate passwd
$ locate exchange.doc

With find:

find (/ folder_where_search) -name (filename) -print
$ find / etc / -name / etc / passwd -print
$ find $ HOME -name "* .doc" -print

User information

less / etc / passwd
$ grep userName / etc / passwd
$ getent passwd

Group information

less / etc / group
$ getent group
$ grep group_name / etc / group
$ groups username

Password information

chage -l username
$ chage -l root
$ chage -l vivek

sudo top
$ sudo htop
$ sudo atop
$ sudo ps auxwww
$ sudo netstat options
$ sudo iostat
$ sudo mpstat 1
$ sudo sar options

Tracing programs

strace -o output.txt / bin / foo
$ strace -p 22254 -s 80 -o debug.nginx.txt

Tracing library calls

sudo ltrace / usr / sbin / httpd
$ sudo ltrace / sbin / chroot / usr / sbin / httpd

Process information

sudo pstree
$ sudo pstree | less
$ sudo ps auxwwwm
$ ps alxwww
$ ps auxwww
$ lsof -b M -n -l

Change the priority of the process:

sudo / bin / nice -n -1 process name
$ sudo / bin / nice -n -1 pid
$ sudo renice __ priority ___ pid

Process CPU usage:

sudo taskset -p pid
$ sudo taskset -p 42

Welcome all!
In this article I will tell you how to view information about the system, find out what processes (programs) are running, what kind of load they put on the computer. And also how to quickly find files and folders in the system, if you need to clean up disk space.

In order to view all information about the computer and the system in Windows, you need to install the Aida64 program. We considered how to do this in our article How to get complete information about computer devices using Aida64!

In Ubuntu, all this is already on the system by default. In order to view this information, open a terminal and run the following command.

To obtain additional privileges, you must enter the user's password and press the "Enter" key on the keyboard.

Let's slightly supplement the previous command.

sudo lshw -html\u003e system_info.html

And the system_info.html file appeared in the home directory, which we can view in any Internet browser.

Having opened this file, we see information about the system in a convenient form.

View running processes on the system, CPU, memory and network usage. All this information can be viewed in the "System Monitor". To open, click on the icon in the upper left corner of the "Search on computer ..." screen. In the search box, enter "gnome-system" and select the "System Monitor" program by clicking the left mouse button.

In the window that opens, we see the running processes.

To sort the processes by CPU load, left-click on the "% CPU" field.

On the "Resources" tab, we see information on processor, memory and network usage presented in graphical form.

On the "File systems" tab, we see information on the disks used in the system. And what percentage are they used.

For more detailed information on the location of files in folders on the disk, as well as to answer the question "Who took all the space?"
Let's use another program called Disk Usage Analyzer. In the search box, enter "disk" and select the "Disk Usage Analyzer" program by clicking the left mouse button.

Let's analyze the files in our user's home folder. We select it by clicking on it with the left mouse button.

On the right side of the window that opens, we see all files and folders located in the home folder of our user.
The Downloads folder is 77.2 MB. We see the same information graphically in the right part of the window. If we need to free up disk space, then open the folder in Nautilus and after removing unnecessary files, return to the "Disk Usage Analyzer". And to update the information, click the update button in the upper right corner.

In the next .cache folder, we see that it is 55MB.

ATTENTION!
Folders starting with a period are hidden and, by default, are not visible in Nautilus Explorer. And deleting any information from them can lead to the fact that installed programs stop working. Therefore, if you are not sure, then it is better not to delete anything from them.

Therefore, we will not delete the files and folders stored in it.

For further analysis and quick search, we can quickly view the folder name and its size by hovering the mouse pointer over the block of interest in the pie chart.

We looked at information about the system, running processes (programs). We also discussed how to work with the Disk Usage Analyzer program. And if there are any incomprehensible questions on this topic and there are suggestions, then please write them in the comments. Bye everyone!