Re: refusing connections based on load ...

Поиск
Список
Период
Сортировка
Искать
От
The Hermit Hacker
Тема
Re: refusing connections based on load ...
Дата
Msg-id
Pine.BSF.4.33.0104241454170.4451-100000@mobile.hub.org
Ответ на
Список
Дерево обсуждения
refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
Re: refusing connections based on load ... ncm@zembu.com (Nathan Myers)
Re: refusing connections based on load ... Jan Wieck <JanWieck@Yahoo.com>
Re: refusing connections based on load ... Tom Lane <tgl@sss.pgh.pa.us>
Re: refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
Re: refusing connections based on load ... Larry Rosenman <ler@lerctr.org>
Re: refusing connections based on load ... Larry Rosenman <ler@lerctr.org>
Re: refusing connections based on load ... Tom Lane <tgl@sss.pgh.pa.us>
Re: refusing connections based on load ... ncm@zembu.com (Nathan Myers)
Re: refusing connections based on load ... Larry Rosenman <ler@lerctr.org>
Re: refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
Re: refusing connections based on load ... Ian Lance Taylor <ian@airs.com>
Re: refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
Re: refusing connections based on load ... Peter Eisentraut <peter_e@gmx.net>
Re: refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
Re: refusing connections based on load ... Lincoln Yeoh <lyeoh@pop.jaring.my>
Re: Re: refusing connections based on load ... ncm@zembu.com (Nathan Myers)
Re: Re: refusing connections based on load ... Lincoln Yeoh <lyeoh@pop.jaring.my>
Re: Re: Re: refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
Re: refusing connections based on load ... ncm@zembu.com (Nathan Myers)
Re: Re: refusing connections based on load ... The Hermit Hacker <scrappy@hub.org>
tables/indexes/logs on different volumes ncm@zembu.com (Nathan Myers)
Re: Re: Re: refusing connections based on load ... Lincoln Yeoh <lyeoh@pop.jaring.my>

Apparently so under Solaris ...

hestia:/> uname -a
SunOS hestia 5.7 Generic_106542-12 i86pc i386 i86pc

C Library Functions                                getloadavg(3C)

NAME    getloadavg - get system load averages

SYNOPSIS    #include 
    int getloadavg(double loadavg[], int nelem);

DESCRIPTION

How hard would it be to knock up code that, by default, ignores loadavg,
but if, say, set in postgresql.conf:

loadavg	= 4

it will just refuse connections?


On Tue, 24 Apr 2001, Peter Eisentraut wrote:

> Tom Lane writes:
>
> > The Hermit Hacker  writes:
> > > sendmail does it now, and, apparently relatively portable across OSs ...
> >
> > sendmail expects to be root.  It's unlikely (and very undesirable) that
> > postgres will be installed with adequate privileges to read /dev/kmem,
> > which is what it'd take to run the sendmail loadaverage code on most
> > platforms...
>
> This program:
>
> #include 
>
> int main()
> {
>     double la[3];
>
>     if (getloadavg(la, 3) == -1)
>         perror("getloadavg");
>
>     printf("%f %f %f\n", la[0], la[1], la[2]);
>
>     return 0;
> }
>
> works unprivileged on Linux 2.2 and FreeBSD 4.3.  Rumour[*] also has it
> that there is a way to do this on Solaris and HP-UX 9.  So I think that
> covers enough users to be worthwhile.
>
> [*] - Autoconf AC_FUNC_GETLOADAVG
>
> --
> Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter
>
>

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org


В списке pgsql-hackers по дате отправления
От: Thomas Lockhart
Дата:
От: Jan Wieck
Дата:
FAQ