screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] Re: Load averages reported by screen on HP-UX 11.11


From: Erik Falor
Subject: [screen-devel] Re: Load averages reported by screen on HP-UX 11.11
Date: Wed, 8 Jul 2009 14:37:49 -0600
User-agent: Mutt/1.5.16 (2007-06-09)

On Mon, Jul 06, 2009 at 03:22:56AM +0000, Paul Ackersviller wrote:
> On Thu, Jul 02, 2009 at 03:19:15PM -0700, Micah Cowan wrote:
> > Paul Ackersviller wrote:
> >
> > OTOH, screen appears to have seven different implementations for its
> > GetLoadav function; it's entirely possible the wrong one was chosen for
> > that build, or that the one that was chosen had some problems.
> 
> From what I see in loadav.c, the one used on the system in question is
> at the end, under the comment
>  * The old fashion way: open kernel and read avenrun
> Nothing there looks too unusual...
> 

I've figured out how to display the correct load averages by looking
at GNU's implementation of uptime.  I've created yet another GetLoadav
function implementing that method for HP-UX.  Because it makes use of
HP-UX's pstat_getdynamic() function, it has the nice benefit of not
directly reading the values from kernel memory, and thus does not need
to run setuid root.

I've also fixed a few more build problems while I was at it.  On the
HP-UX system I use at work, ./configure failed because it couldn't get
sockets or fifos to work.  The problem is that some functions used by
HP-UX's socket API is defined in sys/time.h instead of sys/select.h.
In fact, HP-UX doesn't even have sys/select.h.  Through a combination
of #ifdefs and #includes I was able to make it build.

Furthermore, HP-UX doesn't have a setenv() function, so I had to tweak
the configure script to use GNU screen's built-in implementation.

I've built and run this patch on a HP-UX 11.11 machine, a SunOS 5.10
as well as a couple of linux boxes.

I also have SunOS 5.10 and 5.9 servers, and AIX 6.1 and 5.3 servers
that I'm working on porting this latest release to.  I haven't yet
gotten them to a state where the full build completes, so look forward
to new patches in the coming days.

Micah, please let me know what I can do differently in the future to
make this code conform to your preferred coding standards.  I haven't
been able to find a document describing what is expected, and I'd like
my contributions to cause as few headaches as possible.

-- 
Erik Falor
Registered Linux User #445632 http://counter.li.org

Attachment: hpux-fixes.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]