Linux : Processes

How to identify running processes:


#ps 
This will list running processes in current shell

#ps aux
This will show all running process

# ps aux |  grep "sshd" | grep -v grep
-v means i want to exclude the line where the work grep is

#pstree | less

less : this will stop after the first screen full
pstree will show the processes tree


#ps aux | sort -nk 4 | tail -3

we are sorting it by column no. 4 numerically
tail means we will fetch last three three results.


Monitoring Commands:


#top

This will list running processes
Live updating lists

Press F : to modify the columns of the result
Space bar to hide/Unhide the column



Starting and Stopping process: 

#kill -l
This will list the available signals for killing the process

#Kill pid
This will kill the process by  Pid

#pkill process_name
This will allow you to kill the process by its name

# gedit &
This will start process called gedit


Managing Process priority :

#ps axl 
This will show the Process details with nice values

#renice 5 PID
This will change the nice value of a process



Troubleshoot a Process: 

#ls /proc
list the processes IDs

#df -h
Gives the disk space in readable format










Comments

Popular posts from this blog

SNMP Configuration on Brocade Switches

Netapp Clustered Ontap CLI Pocket Guide

Netapp 7-Mode Architecture