Get PID info of linux standalone web app

Hi,

How can I get the PID info of linux standalone web application ? I need it, for a startup/shutdown script.

there is a sample code in xojo help on the declare command example code, I think.

Thanks for the info.