更新时间:2023-01-28 09:08:56
一种简单的方法是
top -b -n 1 -u abc | awk 'NR>7 { sum += $9; } END { print sum; }'
如果您对每个用户的CPU时间感兴趣,也可以使用acct.
If you are interested in the cpu time on a per user basis you can also use acct.
accton on sa -m
如何确定Linux中某个用户下运行的进程产生了多少CPU负载?