Hello there, I was wondering on how to access a pid number of a ps aux |grep query I make.
like what would be better to use.
exec()
system()
passthru()
$ps = exec('ps aux |grep app',$store);
basically I want to grep a ip address cause the application is running spawn on different ip's which is on the same box. normally I would just ps aux |grep ipaddress
see the pid number and kill -9 the two pid's it is running on. make changes than start it backup.
Any tip's or if someone could point me into the right direction thanks.