The process ID of a server is very important. It uniquely identifies the process and it allows you to terminate the process if it is causing an issue. The conventional way is to list all processes and that in turn will list the process ID. As a short cut you can extract the process ID straight way with a much simpler command.
pidof apache2 18341
Here we can extract the process ID of the web server straight away without filtering or any additional commands.