Monitoring Processes With Linux Monitoring Processes With Linux

View previous topic View next topic Go down

Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk on 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
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk on 26th July 2016, 19:40

Other

Code:
pstree

Code:
 ps -ejH
 ps axjf
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk on 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
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk on 26th July 2016, 19:47

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

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by jamied_uk on 26th July 2016, 19:51

1034 is the example pid

Code:
sudo kill 1034
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Monitoring Processes With Linux Monitoring Processes With Linux

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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