The other day I was trying to kill a master instance of Mesos but couldn't find it. I tried
ps auwg | grep mesos but no Mesos processes turned up. I knew Mesos was running since I could access the http interface on port 5050, so in the end I ran:
lsof -n -i:5050
This returns a list of all processes listening on port 5050 including their PID.