Jump to content

Speeding up PHP and SNMP


mbeals

Recommended Posts

I am building a dynamic site for monitoring computer networks.  I store the static info (gatewayIP, equipment info, service address, etc) in a mysql database.  I also use SNMP to retrieve stats on the individual components of the networks.  I have one php script to build a general info (html)table for a single network.  The index page runs a looped include statement, so the main page will load as many instances of this table as there are rows in the main database.

 

Anyway... I use SNMP to poll the devices on each network to identify problems.  This generates a list of problem devices that is displayed on the index page with each network.  I have simplified the polling process as much as I can, having it only do a full walk on a single field, sort out the problem devices, then get the MAC just for those specific ones.  This polling process takes around 10 to 15 seconds per network to complete.  This means that once I have 10 or so networks built, it will take forever to load the index page and will most likley cause timeout issues.

 

Is there a fancy way to allow the snmp polling script to run in the background while the rest of the page loads, then once it is done, load the results into a CSS layer or some other object on the page?  Is this outside of the abilites of php?  Do I need to be looking at java?  I thought about writing a perl script that would get the info and load it into the db on specific intervals (with cron), but the page really needs to be refreshed every time you view it.

 

Any thoughts?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.