PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Monitoring Processes With Linux Monitoring Processes With Linux

Go down

Monitoring Processes With Linux Monitoring Processes With Linux Empty Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk 26th July 2016, 19:37

Monitoring Processes With Linux Monitoring Processes With Linux



Code:
top
atop
htop



There are other ways aswell like grep!


  • -A: select all processes
  • a: select all processes on a terminal, including those of other users
  • x: select processes without controlling ttys

Task: see every process on the system

Code:
# ps -A
 # ps -e


Task: See every process except those running as root

Code:
# ps -U root -u root -N

Task: See process run by user vivek

Code:
# ps -u vivek


http://www.cyberciti.biz/faq/show-all-running-processes-in-linux
jamied_uk
jamied_uk
Admin

Posts : 2943
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Monitoring Processes With Linux Monitoring Processes With Linux Empty Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk 26th July 2016, 19:40

Other

Code:
pstree

Code:
 ps -ejH
 ps axjf
jamied_uk
jamied_uk
Admin

Posts : 2943
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Monitoring Processes With Linux Monitoring Processes With Linux Empty Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk 26th July 2016, 19:41

Advanced Security

Task: Get info about threads

Type the following command:

Code:
# ps -eLf
 # ps axms

Task: Get security info

Type the following command:

Code:
# ps -eo euser,ruser,suser,fuser,f,comm,label
 # ps axZ
 # ps -eM

Task: Save Process Snapshot to a file

Type the following command:

Code:
# top -b -n1 > /tmp/process.log

Or you can email result to yourself:

Code:
# top -b -n1 | mail -s 'Process snapshot' you@example.com

Task: Lookup process

Use pgrep command. pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to screen. For example display firefox process id:

Code:
$ pgrep firefox

Sample outputs:
3356
Following command will list the process called sshd which is owned by a user called root:

Code:
$ pgrep -u root sshd
jamied_uk
jamied_uk
Admin

Posts : 2943
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Monitoring Processes With Linux Monitoring Processes With Linux Empty Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk 26th July 2016, 19:47

More cyberciti.biz/faq/show-all-running-processes-in-linux
jamied_uk
jamied_uk
Admin

Posts : 2943
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Monitoring Processes With Linux Monitoring Processes With Linux Empty Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk 26th July 2016, 19:51

1034 is the example pid

Code:
sudo kill 1034
jamied_uk
jamied_uk
Admin

Posts : 2943
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Monitoring Processes With Linux Monitoring Processes With Linux Empty Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum