Reputation: 99
Good morning all,
PHP Webdriver (Facebook) - Is there any way I can get the PID (Linux, Centos 7) of the currently lunched browser (Firefox) during the session?
Upvotes: 0
Views: 223
Reputation: 7445
ps
command takes a lot of input arguments. With --format
and --sort
you can find the processes with their durations and sort them by the duration.
ps -ef --format=pid,cmd,time --sort=time | grep firefox
You can filter this out further and develop a script to kill the firefox
processes with the duration higher than a given value.
Upvotes: 0