Server Status Analysis View Linux server CPU details #View CPU information # View the number of physical CPUs # View the number of cores of each physical CPU #Number of logical CPUs (logical CPU = number of physical CPUs * number of cores) Check the memory status of Linux server # Check memory usage [root@host ~]# free -m total used free shared buffers cached Mem: 372 256 115 0 17 158 -/+ buffers/cache: 81 290 Swap: 509 0 509 >total: total memory >user: Amount of memory used >free: free memory > shared: the number of multi-process shared memories >buffers: number of buffer memories >cached: cache memory Available memory = free+buffers+cached Used memory = used-buffers-cached swap The amount of swap memory. This item can be used to determine whether the memory is sufficient. View Linux server hard disk usage #View hard disk and partition information fdisk -l [root@host ~]# fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 78 522112+ 82 Linux swap / Solaris /dev/sda3 79 1305 9855877+ 83 Linux # Check the disk space usage of the file system df -h [root@host ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 9.2G 6.4G 2.3G 74% / /dev/sda1 99M 12M 82M 13% /boot tmpfs 187M 0 187M 0% /dev/shm /dev/hdc 4.1G 4.1G 0 100% /mnt Server Performance Analysis #Check the I/O performance of the hard disk [root@host /]# iostat -d -x -k 1 5 #iostat is included in the systat package. In CentOs5.5, use the command yum -y install sysstat to install it. I/0 Check the average load of Linux servers [root@host /]# uptime 12:39:12 up 2:50, 3 users, load average: 0.00, 0.03, 0.00 [root@host /]# w 12:39:59 up 2:50, 3 users, load average: 0.00, 0.03, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 - 09:53 32:17 0.36s 0.36s -bash root pts/0 192.168.1.102 10:23 1:54m 0.03s 0.03s -bash root pts/1 192.168.1.105 12:16 0.00s 0.09s 0.02sw Monitor the overall performance of your Linux server Overall Performance [root@host /]# vmstat 1 4 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ rb swpd free buff cache si so bi bo in cs us sy id was 0 0 0 50464 50096 101356 0 0 21 13 925 183 0 0 99 1 0 0 0 0 50464 50096 101380 0 0 0 0 830 18 0 0 100 0 0 0 0 0 50464 50096 101380 0 0 0 0 833 27 0 0 100 0 0 0 0 0 50464 50104 101372 0 0 0 32 822 27 0 0 99 1 0 #proces r: Number of processes waiting to run b: Number of processes in non-interruptible sleep state w: Number of executable processes swapped out #memory swpd: virtual memory usage fres: free memory buff: amount of memory used as cache (unit: KB) #swap si: The number of swap pages swapped from disk to memory so: The number of swap pages swapped from memory to disk (unit: kb/second) #io bi: number of blocks sent to the block device bo: number of blocks received from the block device (unit: blocks/second) #system in: number of interrupts per second, including clock interrupts cs: number of environment (context) switches per second #cpu us: CPU usage time sy: CPU system usage time id: idle time (unit: percentage) Under standard conditions: r is less than 5, b is approximately 0 If user + sys is less than 70, the system performance is good; if it is greater than or equal to 85, the performance is poor. View other parameters of the Linux server Check the system kernel version number [root@host /]# uname -a Linux host.domain.com 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux [root@host /]# uname -r 2.6.18-194.el5 Check if the system is 32-bit or 64-bit Check if there is /lib64, if there is, the system is 64-bit Another way to check whether the system is 32-bit or 64-bit [root@host /]# file /sbin/init /sbin/init: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped View information about the Linux distribution used by the server [root@host /]# lsb_release -a LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: CentOS Description: CentOS release 5.5 (Final) Release: 5.5 Codename: Final View the relevant modules loaded by the system [root@host /]# lsmod |grep ip ipv6 435361 24 xfrm_nalgo 43333 1 ipv6 dm_multipath 56920 0 scsi_dh 42177 1 dm_multipath dm_mod 101649 4 dm_mirror,dm_multipath,dm_raid45,dm_log Check PCI settings in Linux. The lspci command can list PCI information in the machine, such as sound card, graphics card, Modem [root@host /]# lspci | grep Ether 02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) Summarize The above are the Linux server status and performance related commands introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: js implements a simple countdown
>>: mysql 5.7.17 winx64.zip installation and configuration method graphic tutorial
Goal: Create a square whose side length is equal ...
Add an input file HTML control to the web page: &...
Alignment issues like type="radio" and t...
translate(-50%,-50%) attributes: Move it up and l...
Must read before operation: Note: If you want to ...
This article introduces how to solve the problem ...
MongoDB installation process and problem records ...
This article shares the specific code of JavaScri...
Preface The concept of dark mode originated from ...
By applying it, some public areas of the website c...
Friends who are learning HTML, CSS and JS front-e...
Forgetting the password is a headache. What shoul...
Table of contents 1: Front-end handwritten paging...
Table of contents Preface start step Troubleshoot...
background Not long ago, I made a function about ...