Sunday, 1 February 2015

Bandwidth display completed

It turned out there were a couple of complications. The worst was with ifconfig. When the number of bytes transmitted or received reaches 4gb, it "goes around the clock" to zero. It took me a while to sort that out, but the answer turned out to be simple. If there seems to be a negative number when you subtract the older figure from the newer one, add 4gb.

So then I had to fumble around a bit, getting the bugs out of my code, until I got nice pretty graphs, in png format. So now I could work on putting them up on a refreshing display.

First, I chose the four most interesting graphs; that's for the total bandwidth used here and at my colocation (I get those from the pixes). Then two servers, one there and one here, the ones most likely to be heavily used. And then ImageMagick. Montage to combine the four PNGs into a single one, Convert to resize them to 800 by 480 for these smaller screens, and then ffmpeg to convert them to framebuffer format.

So now I have no excuse for avoiding work in the pix.

No comments:

Post a Comment