How to show process usage for single user with TOP command
TOP command is used to display a dynamic view of all process running under the server. We already discussed about the TOP command and some of its examples. Click here for getting more details about Top command usages and examples in Unix/Linux
How to show process usage for single user with TOP command ?
To list all process running uder a user on your Unix/Linux server, you can use the switch ‘u’ along with the TOP command.
ie, ” top -u $username “
The top command without any switches will displays all process running under the server dynamically. see the image attached here showing all process of users root, smmsp and apache on server.
[root@server ] top
The top command along with specific user name(top -u $username) will shows only the process which currently running under the server. In the example here, the top command showing the process details of the user apache under server.
[root@server ] top -u apache