If you have ever used or of the plethora of , you must be at least a bit impressed with the detailed information that you can view/summarize through them. iftop any other available network monitoring tools on Linux Most of these tools use to inspect packets in real time and aggregate/store their details; now comes the question: what if I would like to read this information with a webservice API? libpcap An iftop microservice It turns out this is a neat use-case for a tiny iftop microservice. With this API we could retrieve network usage statistics based on IP address, protocol type and sent/received bytes count. I went ahead and added a minimal RESTful API to iftop; this is the (beautified) output of a call to : /iftop/history Nice, isn’t it? There is also a method for that allows reading the current version. /iftop/version You can run it with: iftop -S 8080 By default it will drop root privileges to user and group (configurable). nobody nogroup Enabling the webservice will disable the curses or text-based output and the iftop logging output (on standard error) will become more similar to a webservice: You can get the latest version of my iftop patches from here: gdm85/iftop Mirror of current iftop git repository with the webservice API patches Upstreaming In hindsight I am delighted to have chosen iftop because the code comments are hilarious. My : best pick Also, I haven't implemented removal of items from the tree. So sue me. The patches have been sent upstream, however I have not received any reply from the maintainer yet. I do not have high hopes in them being accepted but regardless you can already use them and the webservice API feature by cloning the and building iftop. GitHub repository