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
阅读 1084 · 发布于 2022-06-21
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
PowerShell、CMD、Linux 命令换行阅读 914
-
Docker 部署 Alertmanager阅读 4455
-
OpenResty lua-resty-http unable to get local issuer certificate阅读 4483
-
PHP 生成重复固定随机数邀请码阅读 2826
-
Oracle 取最近 10 条数据阅读 1189
-
微信小程序开发环境调试接口阅读 3803
-
Java jcmd 命令动态修改 JVM 启动参数阅读 2227
-
GoJS 给右键菜单中的按钮添加内边距阅读 1514
-
Python 基础语法阅读 1836
-
Android 根据包名启动 Activity阅读 3231