Back-end: a daemon process that runs at an interval, collecting data and writing it to a data store.
Front-end: connects to the data store, processes statistics, and formats for display.
By constructing your application in this way, the data store acts as a firewall between the system calls required to collect the data and the interface used to view the data. Your daemon application needn't listen on any network ports if it is running locally.
Your web application still needs to be secure, but you don't have the additional risk of many calls to system/shell exec commands that are a honey pot for exploitation.
By collecting the data periodically (i.e a cron job) you eliminate most possible vulnerabilities.
However, you say that this is an easy way to discount every possible language: can you point me to a vulnerability on the same level as register_globals in any other language?