Yee Man Chan wrote:
> I want to make a version of Squid such that it uses the bandwidth very
> conservatively. For example, if squid sits on a machine that has outside link
> of speed 512KB/s and other programs on that box uses 300KB/s already, I want
> squid to use only 212KB/s. I think I can look up the delay_pool code to
> restrict the bandwidth usage of squid but how can I know how much bandwidth
> other programs are using? Can you give me some hints?
You need to query the OS or Router for this information. In many cases
both can be queried using SNMP. For Linux traffic information can be
found in /proc/net/dev, for other OS:es the information is usually
available using ioctl:s on network sockets, or in some cases by digging
around in /dev/mem
All approaches except the SNMP approach is very OS dependent.
-- Henrik Nordstrom Squid hackerReceived on Fri Dec 03 1999 - 12:05:39 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:19 MST