#!/bin/bash
TODAY=$(/bin/date +%Y%m%d)
top -bn 1 | head -15 >> top.txt.${TODAY}
top -bn 1 |grep java |head -n 3 |awk '{print $1}' |xargs ps -p |more >> top.txt.${TODAY}
服务区监控高负载异常进程到一个日志的简单shell
最新推荐文章于 2022-01-05 14:07:33 发布
#!/bin/bash
TODAY=$(/bin/date +%Y%m%d)
top -bn 1 | head -15 >> top.txt.${TODAY}
top -bn 1 |grep java |head -n 3 |awk '{print $1}' |xargs ps -p |more >> top.txt.${TODAY}