[tpop3d-discuss]tpop unable to handle load

Chris Lightfoot chris at ex-parrot.com
Thu, 9 Sep 2004 02:13:35 +0100


On Wed, Sep 08, 2004 at 06:07:24PM -0700, Richard Stockton wrote:
> Hi Chris,
> 
> At 05:28 PM 9/8/2004, you wrote:
> >> > Another quick check you can do (on a test server, probably...):
> >> >    for i in `seq 1 N` ; do nc localhost 110 & done
> >> >
> >> > where N = 2 × max-children + 1
> >> >
> >> > this should give you exactly 2 × max-children `connected'
> >> > log messages, and exactly one `rejected connection...' log
> >> > message.
> >>
> >> I don't really have a test server to try this on.  Other than
> >> momentarily shutting out new tpop users, what effect would this
> >> test have on my live server?
> >
> >If it has any other effect, it's a bug!
> 
> I tried to run the test, but got this;
> 
> bash-2.05b# for i in `seq 1 101` ; do /usr/local/nc localhost 110 & done
> bash: seq: command not found

(!) I'm slightly surprised that a UNIX system will boot
without seq. It's a fairly standard shell utility.

> It appears that "seq" is supposed to be a builtin command in bash2,
> but mine doesn't seem to have it. [sigh]  Any substitute?

-- don't think so -- here it's part of GNU shellutils.

    `perl -e 'print "$_\n" foreach (1 .. 101);'`

is a workable substitute.

Alternatively

    i=0
    while [ i -lt 101 ] ; do
        ... &
        i=$[ $i + 1 ]
    done

-- 
``We will learn more about pain in Chapter 12.''
  (from Bear, Connors and Paradiso, `Neuroscience')