Linux-awk使用案例
  查看日志的线程使用情况:
cat springboot-stress-jetty.log | cut -d " " -f 4|sort | uniq -c |sort -nr -k 1 | awk '{print $0}' | head -n 400
https://www.pianshen.com/article/8751295780/
| Server Software: | |||
|---|---|---|---|
| Server Hostname: | 10.131.32.26 | ||
| Server Port: | 8050 | ||
| Document Path: | /stress/undertow/sync | ||
| Document Length: | 35 bytes | ||
| Concurrency Level: | 10 | ||
| Time taken for tests: | 2.050 seconds | ||
| Complete requests: | 10000 | ||
| Failed requests: | 0 | ||
| Total transferred: | 1420000 bytes | ||
| HTML transferred: | 350000 bytes | ||
| Requests per second: | 4879.18 | ||
| Transfer rate: | 692844.14 kb/s received | ||
| Connnection Times (ms) | |||
| min | avg | max | |
| Connect: | 0 | 0 | 3 | 
| Processing: | 0 | 2 | 18 | 
| Total: | 0 | 2 | 21 | 
上次更新: 2025-09-05 07:09:03