System Commands in Web App

How would I go about calling system commands in a web app?
Does anyone have any source available that I can look at?

Thanks!

Ron Mr. wrote:

How would I go about calling system commands in a web app?
Does anyone have any source available that I can look at?

Thanks!

Try just using the ‘backticks’ around your commands and trapping the
results.

Ex: result = ps -aef

But keep in mind you hold up your request while it’s processing. If you
need something a bit more robust create a queue, have a thread process
the queue and put results into a a DB. The you can a monitoring page
(maybe using AJAX) To get the results/status for your processes.