Jump to content

Obsolete:ICP agent

From Wikitech
This page contains historical information. It may be outdated or unreliable.

ICP agent can be used as ICP responder in squid-apache web server cluster. It does delay requests to frontend caches at high loads and might be remotely turned on or off.

Options

  • -d - daemonize
  • -m - enable remote management
  • -p # - port number to listen at
  • -t # - static delay time in milliseconds, defaults to 5.0
    use negative number to send icp misses only
    supports 0.1ms adjustments by varying the response times over ten
    requests +/- 1ms to get the desired average.

Remote management

echoping -i agent://enable webserver:3130
echoping -i agent://disable webserver:3130

ToDo: make timings adjustable using the same mechanism?

Source location

  • CVS:extensions/icpagent
    • cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wikipedia checkout extensions/icpagent
    • SF.net ViewCVS
  • wm:~midom/extensions/icpagent

Starting/stopping

Run /usr/local/bin/icpagent. This calls the binary in /home/wikipedia/bin/icpagent with the per-apache (time)parameters. This is also in rc.local, icpagent will start automatically at boottime. To stop icpagent just kill it via kill `pgrep icpagent`.

Current timings

14:56, 23 Jan 2005 (UTC), those are also the values in /usr/local/bin/icpagent on the individual hosts. Please don't change them unless you know what you're doing.

dsh -N apaches "ps aux | grep icp | grep -v grep"
executing 'ps aux | grep icp | grep -v grep'
alrazi:         gwicke     465  0.1  0.0  1412  448 ?        RN   Jan22   2:06 /home/wikipedia/bin/icpagent -d -t 4.9
friedrich:      gwicke   21025  0.1  0.0  1412  472 ?        RN   Jan20   7:19 /home/wikipedia/bin/icpagent -d -t 5
goeje:          gwicke   28437  0.2  0.0  1412  496 ?        RN   Jan22   2:05 /home/wikipedia/bin/icpagent -d -t 4.9
harris:         gwicke   30369  0.1  0.0  1412  436 ?        RN   Jan20   7:20 /home/wikipedia/bin/icpagent -d -t 5
vincent:        gwicke    7450  0.3  0.0  1416  460 ?        SN   Jan22   3:16 /home/wikipedia/bin/icpagent -d -t 5.7
avicenna:       gwicke   22531  0.1  0.0  1412  376 ?        RN   Jan20   7:21 /home/wikipedia/bin/icpagent -d -t 5
diderot:        gwicke   11056  0.1  0.0  1412  432 ?        SN   Jan20   7:24 /home/wikipedia/bin/icpagent -d -t 5
ihypatia:       gwicke   15999  0.1  0.0  1412  432 ?        SN   Jan22   2:08 /home/wikipedia/bin/icpagent -d -t 4.9
ihumboldt:      gwicke   26111  0.1  0.0  1412  452 ?        RN   Jan22   2:09 /home/wikipedia/bin/icpagent -d -t 4.9
ikluge:         gwicke   20648  0.1  0.0  1412  468 ?        RN   Jan22   1:32 /home/wikipedia/bin/icpagent -d -t 4.9
ikhaldun:       gwicke   21748  0.7  0.0  1412  440 ?        SN   Jan22   8:05 /home/wikipedia/bin/icpagent -d -t 4.9
biruni:         gwicke   29912  0.4  0.0  1468  460 ?        RNs  Jan20  19:13 /home/wikipedia/bin/icpagent -d -t 5
rose:           gwicke    4667  0.4  0.0  1468  492 ?        RNs  Jan20  19:32 /home/wikipedia/bin/icpagent -d -t 5
smellie:        gwicke   31300  0.4  0.0  1468  448 ?        RNs  Jan20  19:17 /home/wikipedia/bin/icpagent -d -t 5
anthony:        gwicke    6706  0.5  0.0  1468  464 ?        RNs  Jan20  20:09 /home/wikipedia/bin/icpagent -d -t 5
yongle:         gwicke   12619  0.2  0.0  1412  456 ?        RN   Jan22   2:19 /home/wikipedia/bin/icpagent -d -t 5.1
isidore:        gwicke   22518  0.2  0.0  1420  504 ?        SN   Jan22   3:02 /home/wikipedia/bin/icpagent -d -t 4.9
tingxi:         gwicke    2443  0.2  0.0  1412  444 ?        RN   Jan22   2:21 /home/wikipedia/bin/icpagent -d -t 6
dalembert:      gwicke    5402  0.2  0.0  1412  464 ?        RN   Jan22   1:50 /home/wikipedia/bin/icpagent -d -t 6