A
A
Alexander Nazarov2017-02-17 22:47:30
linux
Alexander Nazarov, 2017-02-17 22:47:30

How to display in the terminal the user who has the most loaded process?

Tried like this: ps -eo %u | sort -nr -k 1| head -1
Displays the largest (by number) Pid of the user.
Tell me how to display the user. For example, there is the highest process of the user vasya, whose mem or cpu is loaded by 70%.
______________
With memory received an answer from another resource: ps axh -o user --sort -vsize | head -n 1
Issue on cpu not resolved

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2017-02-18
@wergio

Well, your option is fine, just write pcpu instead of vsize.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question