Ubuntu维护备忘录


Linux万岁(≧▽≦)/

⚓️Ubuntu维护备忘录

⚓️常用Linux命令

⚓️grep

Linux grep 命令 | 菜鸟教程. Runoob. https://www.runoob.com/linux/linux-comm-grep.html

man grep

⚓️watch

⚓️

⚓️系统状态

⚓️top 系统进程与状态

top命令详解 - MauriceWei - 博客园. Cnblogs. https://www.cnblogs.com/mauricewei/p/10496633.html

⚓️lsblk 查看设备

⚓️iostat

每隔2秒显示3次并改单位为MB

iostat -m 2 3

-d 显示磁盘使用情况,-x 显示详细信息

组合命令 实现排除Loop分区 1秒重复获取单位为MB的磁盘IO状态并标注变化的区域

watch -d -n 1 “iostat -mt | grep -v loop”

⚓️系统测试

⚓️hdparm 磁盘测速

参考:
Linux hdparm命令 | 菜鸟教程. Runoob. https://www.runoob.com/linux/linux-comm-hdparm.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
hdparm /dev/sda
/dev/sda:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 19929[柱面数]/255[磁头数]/63[扇区数], sectors = 320173056[总扇区数], start = 0[起始扇区数]

hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 166 MB in 3.03 seconds = 54.85 MB/sec
[root@linuxso.com ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 160 MB in 3.01 seconds = 53.11 MB/sec
[root@linuxso.com ~]# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 166 MB in 3.00 seconds = 55.31 MB/sec

⚓️相关第三方软件

⚓️sysstat

sudo apt-get install sysstat

⚓️progress

sudo apt install progress



分享到