人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動(dòng)態(tài)

詳解Linux服務(wù)器狀態(tài)、性能相關(guān)命令

發(fā)布日期:2022-03-27 15:54 | 文章來(lái)源:站長(zhǎng)之家

服務(wù)器狀態(tài)分析

查看Linux服務(wù)器CPU詳細(xì)情況

#查看CPU的信息

[root@host ~]# cat /proc/cpuinfo

#查看物理CPU的個(gè)數(shù)

[root@host /]# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

#查看每個(gè)物理CPU的核數(shù)

[root@host /]# cat /proc/cpuinfo | grep "cpu cores" | uniq

#邏輯CPU的個(gè)數(shù)(邏輯CPU = 物理CPU個(gè)數(shù)*核數(shù))

[root@host /]# cat /proc/cpuinfo | grep "processor" | wc -l

查看Linux服務(wù)器內(nèi)存情況

#查看內(nèi)存使用情況

[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:內(nèi)存總數(shù)

>user:已使用內(nèi)存數(shù)

>free:空閑內(nèi)存數(shù)

>shared:多進(jìn)程共享內(nèi)存數(shù)

>buffers:緩沖內(nèi)存數(shù)

>cached:緩存內(nèi)存數(shù)

可用內(nèi)存 = free+buffers+cached

已用內(nèi)存 = used-buffers-cached

swap 交換內(nèi)存數(shù),此項(xiàng)可判斷內(nèi)存是否夠用的標(biāo)準(zhǔn)

查看Linux服務(wù)器硬盤使用情況

#查看硬盤及分區(qū)信息

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 
#檢查文件系統(tǒng)的磁盤空間占用情況

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 

服務(wù)器性能分析

#查看硬盤的I/O性能

[root@host /]# iostat -d -x -k 1 5 

#iostaat是含在套裝systat中,在CentOs5.5用命令yum -y install sysstat來(lái)安裝

I/0

查看Linux服務(wù)器的平均負(fù)載

[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.02s w 

監(jiān)控Linux服務(wù)器的整體性能

整體性能

[root@host /]# vmstat 1 4 
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ 
r b swpd free buff cache si so bi bo in cs us sy id wa st 
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:等待運(yùn)行的進(jìn)程數(shù) b:非中斷睡眠狀態(tài)的進(jìn)程數(shù) w:被交換出去的可運(yùn)行進(jìn)程數(shù)

#memory swpd:虛擬內(nèi)存使用情況 fres:空閑的內(nèi)存 buff:用作緩存的內(nèi)存數(shù)(單位:KB)

#swap si:從磁盤交換到內(nèi)存的交換頁(yè)數(shù)量 so:從內(nèi)存交換到磁盤的交換頁(yè)數(shù)量(單位:kb/秒)

#io bi:發(fā)送到塊設(shè)備的塊數(shù) bo:從塊設(shè)備接收到的塊數(shù)(單位:塊/秒)

#system in:每秒的中斷數(shù),包括時(shí)鐘中斷 cs:每秒的環(huán)境(上下文)切換數(shù)

#cpu us:CPU使用時(shí)間 sy:CPU系統(tǒng)使用時(shí)間 id:閑置時(shí)間(單位:百分比)

標(biāo)準(zhǔn)情況下:r小于5,b約為0

如果user + sys 小于70 表示系統(tǒng)性能較好;如果大于等于85以上,表示性能比較糟糕

查看Linux服務(wù)器的其他參數(shù)

查看系統(tǒng)內(nèi)核的版本號(hào)

[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 

查看系統(tǒng)32位還是64位

[root@host /]# ls -1F / |grep /$

查找是否有/lib64,有則系統(tǒng)為64位

另一種查看系統(tǒng)32位還是64位

[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 

查看服務(wù)器使用的Linux發(fā)行版的相關(guān)信息

[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 

查看系統(tǒng)已載入的相關(guān)模塊

[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 

在linux下查看PCI設(shè)置,lspci命令能列出機(jī)器中的PCI信息,比如聲卡、顯卡、Modem

[root@host /]# lspci | grep Ether 
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) 

總結(jié)

以上所述是小編給大家介紹的Linux服務(wù)器狀態(tài)、性能相關(guān)命令,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)本站網(wǎng)站的支持!

版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。

相關(guān)文章

實(shí)時(shí)開通

自選配置、實(shí)時(shí)開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對(duì)1客戶咨詢顧問

在線
客服

在線客服:7*24小時(shí)在線

客服
熱線

400-630-3752
7*24小時(shí)客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部