watch和dmesg

  1. 1 watch
  2. 2 dmesg

1 watch

监测命令的运行结果
-d, --differences[=cumulative] highlight changes between updates (cumulative means highlighting is cumulative)
-n, --interval=, seconds to wait between updates
每隔1秒显示网络连接数
watch -n 1 -d netstat -ant
watch -n 1 ss -s
实时查看client建立的连接数
watch -n 1 -d 'netstat -an | egrep "192.168.25.100"| wc -l'

2 dmesg

dmesg command is used to display the kernel related messages on Unix like systems. dmesg command retrieve its data by reading the kernel ring buffer.

dmsg

output:
[2195497.136762] nf_conntrack: table full, dropping packet
[2195497.136800] nf_conntrack: table full, dropping packet
[2195497.140649] nf_conntrack: table full, dropping packet
[2195497.140741] nf_conntrack: table full, dropping packet
[2195497.140766] nf_conntrack: table full, dropping packet
[2195497.424427] nf_conntrack: table full, dropping packet
[2195497.424458] nf_conntrack: table full, dropping packet
[2195497.424497] nf_conntrack: table full, dropping packet

Display messages related to RAM, Hard disk, USB drives and Serial ports

dmesg | grep -i memory
dmesg | grep -i dma
dmesg | grep -i usb
dmesg | grep -i tty

Read and Clear dmesg logs using (-c) option

dmesg -c

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至yj.mapple@gmail.com

文章标题:watch和dmesg

文章字数:197

本文作者:melonshell

发布时间:2019-10-10, 23:40:47

最后更新:2020-12-04, 21:19:02

原始链接:http://melonshell.github.io/2019/10/10/prob_analysis_tool/

版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。

目录
×

喜欢就点赞,疼爱就打赏

相册