I want to implement a snmp-agent to measure the bandwidth traffic per flow in a linux router. Is there any way to use tc in bash scripts in order to measure the bandwidth? In my first thought, the agent would fire repeatedly tc commands that would return the rate /flow. Is that speculation correct? Do you propose an alternative way to measure the bandwith through an agent. I found somewhere that I can use netlink library to access the kernel but it seems confusing enough and I didn''t find enough documentation. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Tue, 2005-29-03 at 04:25 -0800, Alaios wrote:> Do you propose an alternative way to measure the > bandwith through an agent. > I found somewhere that I can use netlink library to > access the kernel > but it seems confusing enough and I didn''t find enough documentation.You may want to take a look at LQL [1]. This library make creating a small application to get QDisc statistics easy. The library is well documented. [1] - http://www.coverfire.com/lql/ -- OpenPGP key: http://www.coverfire.com/files/pubkey.txt Key fingerprint: FB0A 2D8A A1E9 11B6 6CA3 0C53 742A 9EA8 891C BD98