Thread View: news.software.nntp
1 messages
1 total messages
Started by H. Peter Anvin N9ITP
Sun, 17 Oct 1993 22:23
Re: INN: limit number of connections?
Author: H. Peter Anvin N9ITP
Date: Sun, 17 Oct 1993 22:23
Date: Sun, 17 Oct 1993 22:23
51 lines
2818 bytes
2818 bytes
[I am cross-posting this to several groups; followups are directed to
comp.unix.internals]
In article <29hen8INN33g@rodan.uu.net> of news.software.nntp,
rsalz@rodan.UU.NET (Rich Salz) writes:
>
> For what it's worth I am taking the load average code out of nnrpd
> for INN1.5. It is too much hassle to stay portable. The same
> features will be available through innwatch.
>
This appears to be a very common problem: programs that would like to
know about load averages simply cannot because there is no portable
way of doing it. However, there are many people with access to system
documentation who could inform us how to get the load average from
system X. What I propose is that someone (e.g. I) volunteer as "load
average moderator", and that if anyone of you know how to determine
the load average on system X, send me a piece of code that does it,
including just exactly what system X is, and what else you needed to
do (setuid root, setgid kmem, make sure /proc is mounted...)
Also, I need to know what #ifdefs I can rely on to identify your system.
The whole package (liboadavg?) could then be released either in the
public domain or under the GNU LGPL.
In particular, I would like you to write the "getavenrun" function for
this program:
#include <stdio.h>
int getavenrun( /* double *avenrun */ );
main()
{
double avenrun[3]; /* Load average over 1, 5 and 15 minutes */
if ( getavenrun(avenrun) )
{
fprintf(stderr, "Could not get load average\n");
exit(1);
}
printf("Load avg: %0.2f %0.2f %0.2f\n", avenrun[0], avenrun[1], avenrun[2]);
}
--
INTERNET: hpa@nwu.edu FINGER/TALK: hpa@ahab.eecs.nwu.edu
IBM MAIL: I036073 at IBMMAIL NeXTMAIL: hpa@speedy.acns.nwu.edu
ANM�RKNING: Heja Sverige friskt hum�r! EG v�ntar utanf�r!
Linux Is Not UniX
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads