Currently I am working in a remote environment where I would like to sort the number of users using up the most processes with the ps command.The only problem is; with my current command; the root user is not displayed which should be displayed. The first output is what I'm looking for, the latter is what I currently receive.
157 root
12 apache
11 brun1992
4 bb
2 postfix
2 hart4492
2 68
1 USER
1 sshd
1 rpcuser
MY COMMAND:
ps -eo user=|sort|uniq -c | head -n 10 | sort -r $1
9 apache
6 au6620
5 ande7941
4 cwen4344
4 bb
3 dagg9715
2 evan8561
2 brun1992
2 alki2221
1 dbus