Hello.
In our PHP application, I wanna show a live traffic graph of interfaces and so far here’s what I’ve come up with:
I run this query every second on the router:
/interface/monitor-traffic <pppoe-queue_name>
And I use JavaScript to render and update my graph every second:

Now I have a concern with efficiency of this approach. There are a couple of issues that I’m aware of.
- First of all, if the pppoe client is offline the interface is down and we can’t query the monitor traffic.
- The API might take a long time to respond.
- The high load on the router
So I was wondering, what are some better ways to handle this live graphs? I would appreciate any comment that would put me in the right direction.
Thank you very much in advance.