How to check Process running by user and used files

Process is an instance of a program that is being executed, It contains the programming code and instruction to execute, Process can be executed in multiple threads depending upon operating system.

If server is running out of  resource, a sysadmin should know how to check CPU Memory usage by user and service. Is this article i have shown you some steps to find which user and process is consuming more CPU and Memory .

To see all the process run by a user

# ps -u username u

Here -u specify user name , and " u "at the send shows the complete path of the command

e.g- you can use | more to short

#ps -u rahul u




Or to see all the files opened by any user

#lsof | grep rahul



To check which process is cunsuming more CPU and memory

# ps -ef | grep service name - to find the PID

To check the PID status like CPU & Memory usage.

#ps -p 12448 -o%cpu,%mem,cmd


or #top -p 12448 



To check the files used by any process 

#lsof -p 12448 --(PID)


How to check Process running by user and used files How to check Process running by user and used files Reviewed by TecGeeks News on June 10, 2016 Rating: 5

No comments:

Get Your Business Online Now


Powered by Blogger.