Source code for bandwidth monitoring