问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

如何测试Linux服务器的性能

发布网友 发布时间:2022-04-21 23:41

我来回答

2个回答

懂视网 时间:2022-05-06 22:17

链接地址: http://blog.csdn.net/jason_asia/article/details/38309079 1.1. 服务器性能测试UnixBench 分别在DELL R720和DELL R610作为测试的服务器,因服务器配置不同,结果仅供参考. 下载: wget http://byte-unixbench.googlecode.com/files/UnixBench5.

链接地址: http://blog.csdn.net/jason_asia/article/details/38309079

1.1. 服务器性能测试UnixBench

分别在DELL R720和DELL R610作为测试的服务器,因服务器配置不同,结果仅供参考.

下载:

wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz

安装:

tar zxf UnixBench5.1.3.tgz

cd UnixBench

make

运行:

./Run

服务器配置信息:

Product Name: Dell Inc. PowerEdge R720

Host Name: test

Kernel Version: 2.6.32-358.el6.x86_64 x86_64

OS Version: CentOS release 6.4 (Final)

Time Zone: Asia/Ho_Chi_Minh +0700

Char Set: en_US

Memory: 4 memories,total size is 32768MB,Speed: 1600 MHz,Type: DDR3

CPU info: Intel(R) Xeon(R) CPU E5-2609 v2 @2.50GHz, 2 * 4 core, cache size 10240 KB

Swap Info: 7999 MB, vm.swappiness = 0

Disk Capacity: /dev/sda: 584.7 GB

Raid Info: PERC H710 Mini, 512MB cache,BBU,FW21.2.0-0007

RAID1, strip 64 KB, 4 * 2disks/span

Current Cache Policy:WriteBack, ReadAdaptive, Direct, Write Cache OK if Bad BBU

BBU Info: Next Learn time: Tue May 27 17:40:472014,Relative State of Charge: 83 %,Charger Status: Unknown,isSOHGood: Yes

Disk Info: 8 * 136.732 GB , 6.0Gb/s ,port speed6.0Gb/s

File System: /home: xfs ,527G

/tmp: tmpfs ,16G

I/O scheduler: sda [deadline]

测试结果:

# time ./Run

make all

make[1]: Entering directory`/root/UnixBench'

Checking distribution of files

./pgms exists

./src exists

./testdir exists

./tmp exists

./results exists

make[1]: Leaving directory`/root/UnixBench'

sh: 3dinfo: command not found

# # # # # # # ##### ###### # # #### # #

# # ## # # # # # # # ## # # # # #

# # # # # # ## ##### ##### # # # # ######

# # # ## # ## # # # # # # # # #

# # # ## # # # # # # # ## # # # #

#### # # # # # ##### ###### # # #### # #

Version 5.1.3 Based on the Byte Magazine Unix Benchmark

Multi-CPU version Version 5 revisions by Ian Smith,

Sunnyvale, CA, USA

January 13, 2011 johantheghost at yahoo period com

1 x Dhrystone 2 using registervariables 1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput 1 2 3

1 x File Copy 1024 bufsize 2000maxblocks 1 2 3

1 x File Copy 256 bufsize 500maxblocks 1 2 3

1 x File Copy 4096 bufsize 8000maxblocks 1 2 3

1 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10

1 x Process Creation 1 2 3

1 x System Call Overhead 1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent) 1 2 3

1 x Shell Scripts (8 concurrent) 1 2 3

8 x Dhrystone 2 using registervariables 1 2 3 4 5 6 7 8 9 10

8 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10

8 x Execl Throughput 1 2 3

8 x File Copy 1024 bufsize 2000maxblocks 1 2 3

8 x File Copy 256 bufsize 500maxblocks 1 2 3

8 x File Copy 4096 bufsize 8000maxblocks 1 2 3

8 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10

8 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10

8 x Process Creation 1 2 3

8 x System Call Overhead 1 2 3 4 5 6 7 8 9 10

8 x Shell Scripts (1 concurrent) 1 2 3

8 x Shell Scripts (8 concurrent) 1 2 3

========================================================================

BYTE UNIX Benchmarks (Version 5.1.3)

System: vn_dpcq_backup_dbserver: GNU/Linux

OS: GNU/Linux -- 2.6.32-358.el6.x86_64 -- #1 SMP Fri Feb 22 00:31:26 UTC2013

Machine: x86_64 (x86_64)

Language: en_US.utf8 (charmap="UTF-8",collate="UTF-8")

CPU 0: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.8 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 1: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.3 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 2: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.8 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU3: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.3 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 4: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.8 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 5: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.3 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 6: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.8 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 7: Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz (4999.3 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

22:00:22 up 77 days, 10:34, 2users, load average: 1.15, 1.01, 0.93;runlevel 3

------------------------------------------------------------------------

Benchmark Run: Wed Jul 30 2014 22:00:22 -22:27:47

8 CPUs in system; running 1 parallel copyof tests

Dhrystone 2 using register variables 27570040.0 lps (10.0 s, 7 samples)

Double-Precision Whetstone 3041.3 MWIPS (6.5 s, 7samples)

Execl Throughput 1855.2 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 816467.6 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 218024.2 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 1536957.9 KBps (30.0 s, 2 samples)

Pipe Throughput 1454276.0 lps (10.0 s, 7 samples)

Pipe-based Context Switching 88740.9 lps (10.0 s, 7 samples)

Process Creation 4974.0 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 3078.0 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 1663.2 lpm (60.0 s, 2 samples)

System Call Overhead 1912485.4 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 27570040.0 2362.5

Double-Precision Whetstone 55.0 3041.3 553.0

Execl Throughput 43.0 1855.2 431.5

File Copy 1024 bufsize 2000 maxblocks 3960.0 816467.6 2061.8

File Copy 256 bufsize 500 maxblocks 1655.0 218024.2 1317.4

File Copy 4096 bufsize 8000 maxblocks 5800.0 1536957.9 2649.9

Pipe Throughput 12440.0 1454276.0 1169.0

Pipe-based Context Switching 4000.0 88740.9 221.9

Process Creation 126.0 4974.0 394.8

Shell Scripts (1 concurrent) 42.4 3078.0 725.9

Shell Scripts (8 concurrent) 6.0 1663.2 2772.1

System Call Overhead 15000.0 1912485.4 1275.0

========

System Benchmarks Index Score 1005.3

------------------------------------------------------------------------

Benchmark Run: Wed Jul 30 2014 22:27:47 -22:55:01

8 CPUs in system; running 8 parallel copiesof tests

Dhrystone 2 using register variables 221136112.5 lps (10.0 s, 7 samples)

Double-Precision Whetstone 24325.0 MWIPS (6.0 s, 7samples)

Execl Throughput 30167.6 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 281771.5 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 77252.4 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 878007.3 KBps (30.0 s, 2 samples)

Pipe Throughput 11413805.1 lps (10.0 s, 7 samples)

Pipe-based Context Switching 2370561.4 lps (10.0 s, 7 samples)

Process Creation 74692.8 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 35687.9 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 5028.6 lpm (60.0 s, 2 samples)

System Call Overhead 4188710.7 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 221136112.5 18949.1

Double-Precision Whetstone 55.0 24325.0 4422.7

Execl Throughput 43.0 30167.6 7015.7

File Copy 1024 bufsize 2000 maxblocks 3960.0 281771.5 711.5

File Copy 256 bufsize 500 maxblocks 1655.0 77252.4 466.8

File Copy 4096 bufsize 8000 maxblocks 5800.0 878007.3 1513.8

Pipe Throughput 12440.0 11413805.1 9175.1

Pipe-based Context Switching 4000.0 2370561.4 5926.4

Process Creation 126.0 74692.8 5928.0

Shell Scripts (1 concurrent) 42.4 35687.9 8417.0

Shell Scripts (8 concurrent) 6.0 5028.6 8381.0

System Call Overhead 15000.0 4188710.7 2792.5

========

System Benchmarks Index Score 4037.6

real 54m39.103s

user 57m37.687s

sys 95m44.095s

#################################

服务器配置信息:

Product Name: Dell Inc. PowerEdge R610

Host Name: test

Kernel Version: 2.6.18-194.el5 x86_64

OS Version: Red Hat Enterprise Linux Serverrelease 5.3 (Tikanga)

Time Zone: Asia/Shanghai +0800

Char Set: en_US

Memory: 8 memories,total size is 16384MB,Speed: 1333 MHz (0.8 ns),Type:

CPU info: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz, 2 * 4 core, cache size 4096 KB

Swap Info: 8189 MB, vm.swappiness = 0

Disk Capacity: /dev/sda: 146.1 GB

Raid Info: PERC H700 Integrated, 512MBcache,BBU,FW 12.10.1-0001

RAID1, strip 64 KB, 1* 2 disks/span

Current Cache Policy:WriteBack, ReadAdaptive, Direct, Write Cache OK if Bad BBU

BBU Info: Next Learn time: Fri Aug1 06:17:162014,Relative State of Charge: 99 %,,

Disk Info: 2 * 136.732 GB , 6.0Gb/s ,port speed6.0Gb/s

File System: /home: xfs ,109G

/tmp: tmpfs ,7.9G

Nic Info: eth0 2.0.8e,link detectedis yes,speed 1000Mb/s.

eth1 2.0.8e,link detectedis yes,speed 1000Mb/s.

I/O scheduler: sda [deadline]

测试结果:

# ./Run

make all

make[1]: Entering directory`/root/UnixBench'

Checking distribution of files

./pgms exists

./src exists

./testdir exists

./tmp exists

./results exists

make[1]: Leaving directory`/root/UnixBench'

sh: 3dinfo: command not found

# # # # # # # ##### ###### # # #### # #

# # ## # # # # # # # ## # # # # #

# # # # # # ## ##### ##### # # # # ######

# # # ## # ## # # # # # # # # #

# # # ## # # # # # # # ## # # # #

#### # # # # # ##### ###### # # #### # #

Version 5.1.3 Based on the Byte Magazine Unix Benchmark

Multi-CPU version Version 5 revisions by Ian Smith,

Sunnyvale, CA, USA

January 13, 2011 johantheghost at yahoo period com

1 x Dhrystone 2 using registervariables 1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput 1 2 3

1 x File Copy 1024 bufsize 2000maxblocks 1 2 3

1 x File Copy 256 bufsize 500maxblocks 1 2 3

1 x File Copy 4096 bufsize 8000maxblocks 1 2 3

1 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10

1 x Process Creation 1 2 3

1 x System Call Overhead 1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent) 1 2 3

1 x Shell Scripts (8 concurrent) 1 2 3

8 x Dhrystone 2 using registervariables 1 2 3 4 5 6 7 8 9 10

8 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10

8 x Execl Throughput 1 2 3

8 x File Copy 1024 bufsize 2000maxblocks 1 2 3

8 x File Copy 256 bufsize 500maxblocks 1 2 3

8 x File Copy 4096 bufsize 8000maxblocks 1 2 3

8 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10

8 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10

8 x Process Creation 1 2 3

8 x System Call Overhead 1 2 3 4 5 6 7 8 9 10

8 x Shell Scripts (1 concurrent) 1 2 3

8 x Shell Scripts (8 concurrent) 1 2 3

========================================================================

BYTE UNIX Benchmarks (Version 5.1.3)

System: my_tlbb_9018_192.168.104.124: GNU/Linux

OS: GNU/Linux -- 2.6.18-194.el5 -- #1 SMP Tue Mar 16 21:52:39 EDT 2010

Machine: x86_64 (x86_64)

Language: en_US.utf8 (charmap="UTF-8",collate="UTF-8")

CPU0: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.1 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 1: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4255.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 2: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.0 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 3: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.1 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 4: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.0 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 5: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.1 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 6: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.0 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

CPU 7: Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (4256.0 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT,SYSCALL/SYSRET, Intel virtualization

21:44:42 up 3:48, 2 users, load average: 0.19, 0.43, 0.24; runlevel 3

------------------------------------------------------------------------

Benchmark Run: Wed Jul 30 2014 21:44:42 -22:12:14

8 CPUs in system; running 1 parallel copyof tests

Dhrystone 2 using register variables 12114116.1 lps (10.0 s, 7 samples)

Double-Precision Whetstone 2427.0 MWIPS (8.0 s, 7samples)

Execl Throughput 2141.1 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 688694.5 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 218516.2 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 1317519.2 KBps (30.0 s, 2 samples)

Pipe Throughput 1782756.3 lps (10.0 s, 7 samples)

Pipe-based Context Switching 170764.9 lps (10.0 s, 7 samples)

Process Creation 8493.3 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 4612.5 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 2277.8 lpm (60.0 s, 2 samples)

System Call Overhead 2958948.5 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 12114116.1 1038.1

Double-Precision Whetstone 55.0 2427.0 441.3

Execl Throughput 43.0 2141.1 497.9

File Copy 1024 bufsize 2000 maxblocks 3960.0 688694.5 1739.1

File Copy 256 bufsize 500 maxblocks 1655.0 218516.2 1320.3

File Copy 4096 bufsize 8000 maxblocks 5800.0 1317519.2 2271.6

Pipe Throughput 12440.0 1782756.3 1433.1

Pipe-based Context Switching 4000.0 170764.9 426.9

Process Creation 126.0 8493.3 674.1

Shell Scripts (1 concurrent) 42.4 4612.5 1087.9

Shell Scripts (8 concurrent) 6.0 2277.8 3796.3

System Call Overhead 15000.0 2958948.5 1972.6

========

System Benchmarks Index Score 1122.4

------------------------------------------------------------------------

Benchmark Run: Wed Jul 30 2014 22:12:14 -22:39:50

8 CPUs in system; running 8 parallel copiesof tests

Dhrystone 2 using register variables 96804820.8 lps (10.0 s, 7 samples)

Double-Precision Whetstone 17210.6 MWIPS (8.3 s, 7samples)

Execl Throughput 24850.3 lps (29.9 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 372899.1 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 107051.9 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 899185.2 KBps (30.0 s, 2 samples)

Pipe Throughput 14107729.1 lps (10.0 s, 7 samples)

Pipe-based Context Switching 3443772.2 lps (10.0 s, 7 samples)

Process Creation 55426.6 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 26969.8 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 5222.1 lpm (60.0 s, 2 samples)

System Call Overhead 4752771.2 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 96804820.8 8295.2

Double-Precision Whetstone 55.0 17210.6 3129.2

Execl Throughput 43.0 24850.3 5779.1

File Copy 1024 bufsize 2000 maxblocks 3960.0 372899.1 941.7

File Copy 256 bufsize 500 maxblocks 1655.0 107051.9 646.8

File Copy 4096 bufsize 8000 maxblocks 5800.0 899185.2 1550.3

Pipe Throughput 12440.0 14107729.1 11340.6

Pipe-based Context Switching 4000.0 3443772.2 8609.4

Process Creation 126.0 55426.6 4398.9

Shell Scripts (1 concurrent) 42.4 26969.8 6360.8

Shell Scripts (8 concurrent) 6.0 5222.1 8703.6

System Call Overhead 15000.0 4752771.2 3168.5

========

System Benchmarks Index Score 3852.0

热心网友 时间:2022-05-06 19:25

################### cpu性能查看 ############################################################
1、查看物理cpu个数:
cat /proc/cpuinfo |grep "physical id"|sort|uniq|wc -l

2、查看每个物理cpu中的core个数:
cat /proc/cpuinfo |grep "cpu cores"|wc -l

3、逻辑cpu的个数:
cat /proc/cpuinfo |grep "processor"|wc -l

物理cpu个数*核数=逻辑cpu个数(不支持超线程技术的情况下)

########################### 内存查看 ################################################################
1、查看内存使用情况:
free -m
total used free shared buffers cached
Mem: 3949 2519 1430 0 189 1619
-/+ buffers/cache: 710 3239
Swap: 3576 0 3576

total:内存总数
used:已经使用的内存数
free:空闲内存数
shared:多个进程共享的内存总额
- buffers/cache:(已用)的内存数,即used-buffers-cached
+ buffers/cache:(可用)的内存数,即free+buffers+cached

Buffer Cache用于针对磁盘块的读写;Page Cache用于针对文件inode的读写,这些Cache能有效地缩短I/O系统调用的时间。

对于操作系统来说free/used是系统可用/占用的内存;而对于应用程序来说-/+ buffers/cache是可用/占用内存,因为buffers/cache很快就会被使用。我们工作时候应该从应用角度来看。

################# 硬盘查看 ##########################################################################
1、查看硬盘及分区信息:
fdisk -l

2、查看文件系统的磁盘空间占用情况:
df -h

3、查看硬盘的I/O性能(每隔一秒显示一次,显示5次):
iostat -x 1 5
iostat是含在套装systat中的,可以用yum -y install systat来安装。
常关注的参数:
如果%util接近100%,说明产生的I/O请求太多,I/O系统已经满负荷,该磁盘可能存在瓶颈。
如果idle小于70%,I/O的压力就比较大了,说明读取进程中有较多的wait。

4、查看linux系统中某目录的大小:
-sh /root

如发现某个分区空间接近用完,可以进入该分区的挂载点,用以下命令找出占用空间最多的文件或目录,然后按照从大到小的顺序,找出系统中占用最多空间的前10个文件或目录:
-cksh *|sort -rn|head -n 10

############################################ 查看平均负载 ####################################
有时候系统响应很慢,但又找不到原因,这时就要查看平均负载了,看它是否有大量的进程在排队等待。
最简单的命令:
uptime
查看过去的1分钟、5分钟和15分钟内进程队列中的平均进程数量。
还有动态命令:
top
我们只关心以下部分:
top - 21:33:09 up 1:00, 1 user, load average: 0.00, 0.01, 0.05
如果每个逻辑cpu当前的活动进程不大于3,则系统性能良好;
如果每个逻辑cpu当前的活动进程不大于4,表示可以接受;
如果每个逻辑cpu当前的活动进程大于5,则系统性能问题严重。
一般计算方法:负载值/逻辑cpu个数

还可以结合vmstat命令来判断系统是否繁忙,其中:
procs
r:等待运行的进程数。
b:处在非中断睡眠状态的进程数。
w:被交换出去的可运行的进程数。
memeory
swpd:虚拟内存使用情况,单位为KB。
free:空闲的内存,单位为KB。
buff:被用来作为缓存的内存数,单位为KB。
swap
si:从磁盘交换到内存的交换页数量,单位为KB。
so:从内存交换到磁盘的交换页数量,单位为KB。
io
bi:发送到块设备的块数,单位为KB。
bo:从块设备接受的块数,单位为KB。
system
in:每秒的中断数,包括时钟中断。
cs:每秒的环境切换次数。
cpu
按cpu的总使用百分比来显示。
us:cpu使用时间。
sy:cpu系统使用时间。
id:闲置时间。
标准情况下r和b的值应该为:
r<5,b=0
假设输出的信息中:
如果r经常大于3或4,且id经常少于50,表示cpu的负荷过重。
pi、po长期不等于0,表示内存不足。
bi经常不等于0,且在b中的队列大于2或3,表示io的性能不好。

################################# 其他参数 #####################################
查看内核版本号:
uname -a
简化命令:
uname -r
查看系统是32位还是64位的:
file /sbin/init
查看发行版:
cat /etc/issue
或lsb_release -a
查看系统已载入的相关模块:
lsmod
查看pci设置:
lspci
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
八月中国最凉快的地方 八月份哪里最凉快,去哪旅游好?美丽的地方 乱字同韵字是什么意思 华硕笔记本电脑触摸板怎么开笔记本电脑触摸板怎么开启和关闭_百度知 ... 陕西职务侵占案立案准则 结婚后我的恋情维系了十年,怎么做到的? 玉米仁子饭产自哪里 中国期货交易所的交易品种有哪些? 历史要怎么读,有啥诀窍 高中历史诀窍 软件测试人员需要知道的linux命令 性能测试常用的linux命令有哪些 linux 这么测试当前服务器最高并发承载能力 如何测试两台linux服务器之间的连接速度?有什么命... 如何在linux下验证两个线程是否并发执行的代码 如... 哪些是linux下性能测试常用命令 监测linux性能都用到哪些命令 在家怎么自制小零食? 怎样在家做好吃的小零食? 自己在家怎么制作美味小零食? 周末宅家自制小零食怎么做? 超简单的小零食做法 在家自制小零食简单好吃 怎么在家自制小零食? 美食达人的最爱!在家有哪些小零食是可以轻松自制的? 有什么适合在家自己做的小零食? 自己在家简单易学的小零食做法都有哪些? 在家就可以DIY的小零食,好吃到爆!你不想试试吗? 自制健康小零食做法大全 联想是中国的吗? linux c++怎么写一个测试程序测试服务器高并发 Linux下如何对tomcat进行并发测试已经压力 手电转转接头容易掉怎么办 这个电钻或者电动螺丝刀的头叫什么? 电批头都有什么材质的,怎么分类?哪种材质的好 电动螺丝刀的批头根部的六方都是6.35mm的嘛,世界... 电钻配件长批头和套筒组是干啥用的 电批头有哪些参数? 例如:S1/4*150*S3 S1/4*150*2... 电批头时转时不转,是不是cbb坏了?按下开关有时转有... 充电电钻头怎么拿掉啊我就是拆不下来我试好几次了... 电批头怎么换 如何选择电批头 电动起子什么批头比较好 电批头太粘螺丝怎么办 搭架者冲电手钻为什么老卡批头 充电手枪钻批头夹不紧容易掉怎么修理? 手电钻钻头怎么取下来 这个电批如何拆开,上部螺丝已经拆开,电批头那里... 电钻头可以夹六角柄批头吗 充电手电钻,头上环状一圈的数字是什么意思