Linux 使用 dd 查看日志增长速度、方法每秒执行次数
Linux 大约 593 字查看日志增长速度
of
:输出到/dev/null
黑洞中。
status=progress
:显示速度。
tail -f test.log | dd of=/dev/null status=progress
输出
root@local:~# tail -f test.log | dd of=/dev/null status=progress
0 bytes copied, 21 s, 0.0 kB/s
查看方法每秒执行次数
tail -f test.log | grep --line-buffered "/api/user/info" | stdbuf -oL tr -dc '\n' | dd of=/dev/null bs=1 status=progress
测试命令,每隔一秒钟写入日志文件
while true; do echo "/api/user/info" >> test.log; sleep 1s; done
输出
root@local:~# tail -f test.log | grep --line-buffered "/api/user/info" | stdbuf -oL tr -dc '\n' | dd of=/dev
/null bs=1 status=progress
49 bytes copied, 252 s, 0.0 kB/s
阅读 1283 · 发布于 2022-06-21
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓
昵称:
随便看看
换一批
-
Linux 之修改设备名称阅读 2832
-
Linux 之 CentOS yum 更换镜像阅读 3153
-
Git 命令之本地仓库上传至远程仓库阅读 2386
-
Redis 使用 hotkeys 查看热点数据阅读 5692
-
MySQL 行级锁演示阅读 1209
-
Spring Boot 3 新增 ControllerAdvice 错误处理类 ProblemDetail阅读 833
-
Linux 文件删除后未释放空间解决办法阅读 2452
-
k3s 部署简化版 Kubernetes阅读 1533
-
IDEA 使用 Kubernetes 瑞士军刀 Telepresence 进行网络代理阅读 1252
-
Vue sourceMap 代码混淆阅读 1605