Cyberithub

50 Best Advanced Linux Commands Examples Part – 1

In this article we will go through advanced Linux commands examples.

Linux users and administrators can’t really live by the GUI alone. By only learning how to work with your tool, can you get the most out of Linux. Hence, we’ve brought together a list of useful Linux commands into this convenient guide.

Linux is Mainly used in servers. About 90% of the internet is powered by Linux servers. This is because Linux is fast, secure, and free! The main problem of using Windows servers are their cost. This is solved by using Linux servers. 50 Best Advanced Linux Commands Examples Part - 1 1

The OS that runs in about 80% of the smartphones in the world, Android, is also made from the Linux kernel. Most of the viruses in the world run on Windows, but not on Linux!

 

Linux Commands :-

1. To check the duplex and speed of interface

[root@test ~]# ethtool eth0
Settings for eth0:
Supported ports: [ ]
Supported link modes: 10000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: Other
PHYAD: 0
Transceiver: Unknown!
Auto-negotiation: off
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes

 

2.To check the size of each file along with the last modified time

[root@test ~]# du -sh * --time
8.0K 2017-07-11 11:11 test.cfg
4.0K 2018-07-30 05:47 test2-post.log

3.To check swap memory in GB

[root@test ~]#free -g
total used free shared buffers cached
Mem: 62 13 49 0 0 1
-/+ buffers/cache: 10 52
Swap: 7 0 7

4.To find the serial number of Linux server

[root@test ~]# dmidecode -s system-serial-number
ec2e3c86-481d-bc7e-fe31-be6562e5c6d0

5. To check the login failure info about user test

[root@test ~]# /sbin/pam_tally2 --reset=0 --user=test
Login Failures Latest failure From
test 0

6.To display all the files with sequence number

[root@test ~]# ls -aril
total 188
4397338 -rw-r--r--. 1 root root 129 Dec 28 2013 .tcshrc
16777280 drwx------. 2 root root 29 Jul 30 06:43 .ssh
20976688 drwxr-----. 3 root root 19 Jul 30 05:54 .pki
4195019 -rw-------. 1 root root 6689 Jul 11 2017 original-ks.cfg
67701 drwxr-xr-x. 2 root root 40 Jul 30 05:37 .oracle_jre_usage
4848494 -rw-r--r--. 1 root root 379 Jul 30 05:42 lsblk
4609677 -rw-r--r--. 1 root root 0 Sep 9 21:07 .lesshst
4265943 -rw-r--r--. 1 root root 1957 Jul 30 06:46 dns-ami-register.log
4397337 -rw-r--r--. 1 root root 100 Dec 28 2013 .cshrc
25246418 drwx------. 3 root root 17 Mar 20 2018 .cache
4848492 -rwxr-xr-x. 1 root root 893 Jul 30 05:42 bootstrap-ami-post.sh
4848491 -rwxr-xr-x. 1 root root 1001 Jul 30 05:42 bootstrap-ami-hdwr.sh
4848493 -rw-r--r--. 1 root root 1614 Jul 30 05:42 bootstrap-ami-hdwr.log
4194775 drwxr-xr-x. 2 root root 80 Jul 30 06:46 bin
4397336 -rw-r--r--. 1 root root 176 Dec 28 2013 .bashrc
4397335 -rw-r--r--. 1 root root 176 Dec 28 2013 .bash_profile
4397334 -rw-r--r--. 1 root root 18 Dec 28 2013 .bash_logout
4195028 -rw-------. 1 root root 295 Aug 9 09:54 .bash_history
64 dr-xr-xr-x. 21 root root 273 Jul 30 05:44 ..
4194369 dr-xr-x---. 9 root root 4096 Sep 9 21:07 .

7.To see all the modules

[root@test ~]# yum search mod_
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
============================================================================================================= N/S matched: mod_ =============================================================================================================
mod_perl-devel.x86_64 : Files needed for building XS modules that use mod_perl
perl516-mod_perl-devel.x86_64 : Files needed for building XS modules that use mod_perl
rh-perl520-mod_perl-devel.x86_64 : Files needed for building XS modules that use mod_perl
rh-perl524-mod_perl-devel.x86_64 : Files needed for building XS modules that use mod_perl
gridsite-libs.x86_64 : Run time libraries for mod_gridsite and gridsite-clients
httpd24-mod_auth_kerb.x86_64 : Kerberos authentication module for HTTP
httpd24-mod_ldap.x86_64 : LDAP authentication modules for the Apache HTTP Server
httpd24-mod_proxy_html.x86_64 : HTML and XML content filters for the Apache HTTP Server
httpd24-mod_session.x86_64 : Session interface for the Apache HTTP Server
httpd24-mod_ssl.x86_64 : SSL/TLS module for the Apache HTTP Server
ipsilon-authform.noarch : mod_intercept_form_submit login plugin
ipsilon-authgssapi.noarch : mod_auth_gssapi based login plugin
ipsilon-infosssd.noarch : SSSD & mod_lookup_identity-based identity plugin
ipv6calc-mod_ipv6calc.x86_64 : Apache module for ipv6calc
koschei-frontend.noarch : Web frontend for koschei using mod_wsgi
lighttpd-mod_authn_gssapi.x86_64 : Authentication module for lighttpd that uses GSSAPI
lighttpd-mod_authn_mysql.x86_64 : Authentication module for lighttpd that uses a MySQL database
lighttpd-mod_geoip.x86_64 : GeoIP module for lighttpd to use for location lookups
lighttpd-mod_mysql_vhost.x86_64 : Virtual host module for lighttpd that uses a MySQL database
mod_auth_cas.x86_64 : Apache 2.2/2.4 compliant module that supports the CASv1 and CASv2 protocols
mod_auth_gssapi.x86_64 : A GSSAPI Authentication module for Apache
mod_auth_kerb.x86_64 : Kerberos authentication module for HTTP
mod_auth_mellon.x86_64 : A SAML 2.0 authentication module for the Apache Httpd Server
mod_auth_ntlm_winbind.x86_64 : NTLM authentication for the Apache web server using winbind daemon
mod_auth_openid.x86_64 : OpenID authentication for apache
mod_auth_openidc.x86_64 : OpenID Connect auth module for Apache HTTP Server
mod_authnz_external.x86_64 : An Apache module used for authentication
mod_authnz_pam.x86_64 : PAM authorization checker and PAM Basic Authentication provider
mod_autoindex_mb.x86_64 : Apache module generating directory indexes for MirrorBrain
mod_dav_svn.x86_64 : Apache httpd module for Subversion server
mod_evasive.x86_64 : Denial of Service evasion module for Apache
mod_fcgid.x86_64 : FastCGI interface module for Apache 2
mod_flvx.x86_64 : FLV progressive download streaming for the Apache HTTP Server
mod_form.x86_64 : Apache module that decodes data submitted from Web forms
mod_form-devel.x86_64 : Apache module that decodes data submitted from Web forms
mod_geoip.x86_64 : GeoIP module for the Apache HTTP Server
mod_gnutls.x86_64 : GnuTLS module for the Apache HTTP server
mod_intercept_form_submit.x86_64 : Apache module to intercept login form submission and run PAM authentication
mod_lcgdm_dav.x86_64 : Apache modules built on top of dmlite providing DAV access.
mod_limitipconn.x86_64 : Simultaneous connection limiting module for Apache
mod_log_post.x86_64 : Module for the Apache web server to log all HTTP POST messages
mod_lookup_identity.x86_64 : Apache module to retrieve additional information about the authenticated user
mod_mirrorbrain.x86_64 : MirrorBrain redirector Apache module
mod_nss.x86_64 : SSL/TLS module for the Apache HTTP server
mod_passenger.x86_64 : Apache Module for Phusion Passenger
mod_perl.x86_64 : An embedded Perl interpreter for the Apache HTTP Server
mod_proxy_uwsgi.x86_64 : uWSGI - Apache2 proxy module
mod_qos.x86_64 : Quality of service module for Apache
mod_revocator.x86_64 : CRL retrieval module for the Apache HTTP server
mod_ruid2.x86_64 : A suexec module for Apache
mod_security.x86_64 : Security module for the Apache HTTP Server
mod_security_crs.noarch : ModSecurity Rules
mod_session.x86_64 : Session interface for the Apache HTTP Server
mod_speedycgi.x86_64 : SpeedyCGI module for the Apache HTTP Server
mod_ssl.x86_64 : SSL/TLS module for the Apache HTTP Server
mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
mod_xsendfile.x86_64 : Apache module to send files efficiently
perl-Apache-RPC.noarch : Companion packages for RPC::XML tuned for mod_perl environments
perl-JSON-RPC-Apache2.noarch : JSON-RPC server for mod_perl2
perl516-mod_perl.x86_64 : An embedded Perl interpreter for the Apache HTTP Server
pwauth.x86_64 : External plugin for mod_authnz_external authenticator
python27-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
python33-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
rh-passenger40-mod_passenger.x86_64 : Apache Module for Phusion Passenger
rh-perl520-mod_perl.x86_64 : An embedded Perl interpreter for the Apache HTTP Server
rh-perl524-mod_perl.x86_64 : An embedded Perl interpreter for the Apache HTTP Server
rh-python34-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
rh-python35-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
rh-python36-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
ruby193-mod_passenger40.x86_64 : Apache Module for Phusion Passenger
viewvc-httpd-fcgi.noarch : ViewVC configuration for Apache/mod_fcgid

8.To get the sum of all files and folders in present directory

[root@test ~]# du -sch *
8.0K anaconda-ks.cfg
4.0K test-ami-post.log
4.0K test1-ami-post.sh
12K test2-ami-pre.log
32K bin
4.0K bootstrap-ami-hdwr.log
4.0K bootstrap-ami-hdwr.sh
4.0K bootstrap-ami-post.sh
4.0K dns-ami-register.log
4.0K lsblk
8.0K original-ks.cfg
192K total

9.To find the server hardware name and model

[root@test ~]# dmidecode | grep -A3 '^System Information'
System Information
Manufacturer: Xen
Product Name: HVM domU
Version: 4.2.amazon

10.To check the architecture is 64 bit or 32 bit

[root@test ~]# uname -m
x86_64

11.To check the crontab for test user

[root@test ~]# crontab -l -u test
* * * * * /home/test/bin/apps.py >> /home/test/logs/app.log 2>&1
*/5 * * * * /opt/test/common.test-2019.06.00/nodemonitor.sh >/dev/null 2>&1
@reboot /opt/test/common.test-2019.06.00/test_allstart.sh -nonstopped > /opt/test/common/logs/reboot.log 2>&1

12.To show all firmware error

[root@test ~]# dmesg | grep -i firmware
[Firmware Bug]: the BIOS has corrupted hw-PMU resources (MSR 38d is 330)
Firmware did not grant requested _OSC control
Firmware did not grant requested _OSC control
[Firmware Bug]: No valid trip found
GHES: APEI firmware first mode is enabled by APEI bit and WHEA _OSC.
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04
platform microcode: firmware: requesting intel-ucode/06-3e-04

13.Shows you basic CPU information.

[root@test ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Model name: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
Stepping: 2
CPU MHz: 2695.031
CPU max MHz: 3000.0000
CPU min MHz: 1200.0000
BogoMIPS: 4800.20
Hypervisor vendor: Xen
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0-9,20-29
NUMA node1 CPU(s): 10-19,30-39
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopo logy nonstop_tsc aperfmperf eagerfpu pni pclmulqdq monitor est ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt ida

14.Shows you all block devices

[root@test ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 10G 0 disk
├─xvda1 202:1 0 1M 0 part
└─xvda2 202:2 0 10G 0 part /
xvdg 202:96 0 30G 0 disk /opt/test1
xvdi 202:128 0 60G 0 disk /opt/test2

 

15.To find the number of cores.

[root@test ~]# cat /proc/cpuinfo | grep processor | wc -l
40

16.To list all time zones

[root@test ~]# timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg
Africa/Juba
Africa/Kampala
Africa/Khartoum
Africa/Kigali
Africa/Kinshasa
Africa/Lagos
Africa/Libreville
Africa/Lome
Africa/Luanda
Africa/Lubumbashi
Africa/Lusaka
Africa/Malabo
Africa/Maputo
Africa/Maseru
Africa/Mbabane

(continue)

17.To find the process id which is using port number 80

[root@test ~]# netstat -ap | grep 80
tcp 0 0 0.0.0.0:29980 0.0.0.0:* LISTEN 43456/./abc.1
tcp 0 0 test:53601 10.107.166.250:34802 TIME_WAIT -
tcp 0 0 test1:53601 10.107.166.250:38046 TIME_WAIT -
tcp 54 0 test2:57780 10.107.242.156:squid CLOSE_WAIT 86800/python
unix 3 [ ] STREAM CONNECTED 659780033 33199/java
unix 3 [ ] STREAM CONNECTED 659780032 33199/java

18.To check the physical memory attached to the Server

[root@test ~]# dmidecode --type memory
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x1000, DMI type 16, 19 bytes
Physical Memory Array
Location: Other
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 160 GB
Error Information Handle: Not Provided
Number Of Devices: 10

Handle 0x1100, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM 0
Bank Locator: Not Specified
Type: RAM
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown

Handle 0x1101, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM 1
Bank Locator: Not Specified
Type: RAM
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown

Handle 0x1102, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM 2
Bank Locator: Not Specified
Type: RAM
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown

Handle 0x1103, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM 3
Bank Locator: Not Specified
Type: RAM
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown

Handle 0x1104, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM 4
Bank Locator: Not Specified
Type: RAM
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown

Handle 0x1105, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x1000
Error Information Handle: 0x0000
Total Width: 64 bits
Data Width: 64 bits
Size: 16384 MB
Form Factor: DIMM
Set: None
Locator: DIMM 5
Bank Locator: Not Specified
Type: RAM
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown

19.To check the bash version

[root@test ~]# bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

20.To check the current stack value

[root@test ~]# dirs
~

21.To see the list of all signals supported by current system

[root@test ~]# kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1
11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ
26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR
31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3
38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8
43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7
58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2
63) SIGRTMAX-1 64) SIGRTMAX

22.To show the version of snmp

[root@test ~]#snmpd --version

NET-SNMP version: 5.5
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

23.To check the size of the current mounted directory

[root@test ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 10G 3.9G 6.2G 39% /
devtmpfs 79G 0 79G 0% /dev
tmpfs 79G 0 79G 0% /dev/shm
tmpfs 79G 1.2G 78G 2% /run
tmpfs 79G 0 79G 0% /sys/fs/cgroup
/dev/xvdg 30G 1.1G 27G 4% /opt/test1
/dev/xvdi 59G 14G 43G 25% /opt/test2
tmpfs 16G 0 16G 0% /run/user/1000
tmpfs 16G 0 16G 0% /run/user/525200051

24.To check the cpu load average

[root@test ~]# cat /proc/loadavg
0.06 0.22 0.44 1/1030 10081

25.To check the cpu stat

[root@test ~]# cat /proc/stat
cpu 76357646 509825 33119202 14236964355 511663 0 99537 119129 0 0
cpu0 2129148 94225 280848 355208832 213095 0 2001 648 0 0
cpu1 1827701 21714 298635 356025310 25708 0 831 3042 0 0
cpu2 2742995 10147 786021 354560137 21125 0 2134 3006 0 0
cpu3 2743367 8500 673681 354822417 17673 0 1069 3000 0 0
cpu4 2347192 9037 604554 355232765 14418 0 659 3012 0 0
cpu5 2243561 9337 489206 355448345 11833 0 489 2999 0 0
cpu6 1946528 10140 306778 355888632 9596 0 404 3002 0 0
cpu7 1841803 10160 248928 356071219 8118 0 346 3001 0 0
cpu8 1738911 10828 224009 356192030 9733 0 286 3003 0 0
cpu9 2112479 13079 277174 355675724 8785 0 255 3003 0 0
cpu10 1849849 11958 241222 355999903 28572 0 324 3006 0 0
cpu11 1527290 12036 284704 356338113 10127 0 309 3014 0 0
cpu12 2543837 11203 816291 354713935 8783 0 2377 3015 0 0
cpu13 2421339 10673 676178 355087545 7958 0 1185 3017 0 0
cpu14 2012162 11332 603128 355530894 8001 0 689 3017 0 0
cpu15 1910042 11608 492914 355742181 5953 0 560 3018 0 0
cpu16 1624330 12247 307817 356182517 6875 0 482 3019 0 0
cpu17 1513101 12445 254140 356384365 6764 0 396 3020 0 0
cpu18 1750571 13571 285696 356018651 9703 0 358 3021 0 0
cpu19 1575571 12429 246930 356259378 10415 0 312 3022 0 0
cpu20 1243194 745 218841 357968535 576 0 135 3033 0 0
cpu21 4331829 5726 5858058 348767983 1520 0 1895 3122 0 0
cpu22 2254483 535 2417634 354382976 1556 0 690 3084 0 0
cpu23 1632736 537 1197908 356399475 453 0 231 3054 0 0
cpu24 1384309 619 581601 357377185 556 0 243 3072 0 0
cpu25 1343812 573 510888 357509284 422 0 206 3057 0 0
cpu26 1328000 602 418195 357649536 269 0 181 3042 0 0
cpu27 1275859 619 336234 357799233 274 0 144 3034 0 0
cpu28 2642449 88037 474663 355465970 2340 0 39157 3033 0 0
cpu29 1226534 894 244123 357889526 53933 0 122 3034 0 0
cpu30 1143396 533 233893 358041925 267 0 166 3036 0 0
cpu31 4206201 5972 5954111 348791635 1147 0 1897 3154 0 0
cpu32 2142069 447 2461968 354453161 1386 0 741 3063 0 0
cpu33 1523407 403 1206908 356494920 343 0 270 3067 0 0
cpu34 1262748 455 586403 357477315 367 0 432 3086 0 0
cpu35 1223430 461 519035 357608032 325 0 351 3066 0 0
cpu36 1198203 416 423056 357751484 229 0 280 3053 0 0
cpu37 2335795 84647 509140 355749532 1981 0 36536 3046 0 0
cpu38 1137683 427 303947 357973272 235 0 199 3045 0 0
cpu39 1119715 494 263726 358030463 229 0 176 3046 0 0
intr 21830883696 299 9 0 0 16 0 3 0 2 0 0 0 144 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 448939534 78435423 110475194 0 1808414 0 429534847 15385307 108089553 0 1295578 0 530348446 20442468 113758049 0 3943926 0 490207755 11581625 112048566 0 2116146 0 502329669 10462735 109812131 0 1595710 0 485713724 11188750 108417319 0 1635118 0 468360691 7764075 107655565 0 1462376 0 456126865 6816481 107281663 0 1555142 0 451481056 6221720 105669457 0 1225608 0 468148608 6479216 112518579 0 1869378 0 469903470 7193003 106565238 0 1659912 0 451974206 6593409 103259043 0 605505 0 548534355 18907164 109178621 0 2802937 0 516503409 10932229 107673222 0 1437969 0 522258468 10468847 104211438 0 897298 0 505096488 11286208 103041580 0 974798 0 481782442 8278299 102228309 0 923066 0 463340566 7642389 101456175 0 919246 0 481518764 7698390 107263230 0 1255457 0 473117557 7393456 105243821 0 750078 0 67980671 2124835 88685493 0 604377 0 333408981 4300849 88211601 0 4782545 0 272672541 2971136 87868697 0 1963754 0 169944476 2404924 88138695 0 1114909 0 111468408 2147680 87971909 0 788530 0 100833879 2163836 88144536 0 717699 0 86677474 2065249 88521559 0 712588 0 79826317 2003033 88660091 0 644971 0 226860516 3515082 106714486 0 2974957 0 72304055 1848696 88193061 0 545372 0 71790018 2393252 89088614 0 289485 0 337960792 4497759 87572745 0 4496182 0 273128671 3274177 87898678 0 1596686 0 171806831 2759623 88000296 0 831767 0 115855295 2537776 87991241 0 545308 0 104138881 2542967 87799848 0 460321 0 90980578 2583003 88087896 0 403949 0 218331704 3592265 103822670 0 2482333 0 76278579 2293098 87750674 0 314455 0 74101168 2343797 87386119 0 280774 0 439 185172819 189386528 66 5703948 1152006 19191627 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 14084060690
btime 1564486999
processes 235409565
procs_running 4
procs_blocked 0
softirq 9441687040 0 508015631 720236 445023686 0 0 4657094 1492367719 0 2695935378

 

For more info about Linux, Please go to this link.

To check more posts on Python, Please go to this link.

Leave a Comment