1) Simply use ps command as follows:
ps aux | grep {process-name}
For example find out if mysqld process (mysqld pid) is running or not:$ ps aux | grep mysqld
Output:
mysql 28290 1.1 2.7 340496 56812 ? Sl Jul31 348:27 /usr/libexec/mysqldpidof command finds the process id’s (pids) of the named programs. It prints those id’s on screen.
2)Find the process ID of a running program using pidof
# pidof httpd
1874 1873 1872 1863 1862 1861 1860 1859 1829
3)PG grep is also used to know the PID
u can use pgrep like thispgrep process name
pgrep httpd
pgrep named
pgrep firefox
1 comment:
Thanks, after googling, this certainly helped.
Post a Comment