[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cfengine 2.0.5 Aix 4.3.3
From: |
chiayl |
Subject: |
Re: cfengine 2.0.5 Aix 4.3.3 |
Date: |
Wed, 16 Apr 2003 17:13:31 +0800 |
User-agent: |
Mutt/1.4i |
Hi folks,
I modified cfenvd.c instead for cfengine-2.0.5. I think the following
can be easily modified to suit AIX by changing "#ifdef HPuUX" to "#ifdef AIX".
============================================================
void GatherLoadData()
{ double load[4] = {0,0,0,0}, sum=0;
int i,n;
#ifdef HPuUX
Verbose("Function GatherLoadData: getloadavg() unavailable on this system.\n");
#else
if ((n = getloadavg(load,LOADAVG_5MIN)) == -1)
{
LOADAVG = 0.0;
}
else
{
for (i = 0; i < n; i++)
{
sum += load[i];
}
}
LOADAVG = sum/(double)n;
Verbose("Load Average = %d %%\n",LOADAVG);
#endif
}
============================================================
Hope this helps. :)
YewLee
On Tue, Apr 15, 2003 at 02:34:45PM +0100, Garrett, Matt M SITI-ITDIEEE wrote:
> Thanks Folks
>
> As the rest of my site is still using 2.0.5 I did a bit of hacking on
> cfservd.c and got rid of the getloadavg
> I will some time have a look at 2.0.6
>
> Matt
>
>
> Matthew Garrett
> Unix System Support
> Shell Information Technology International Limited
> Loirston House, Wellington Road, Altens, Aberdeen AB12 3BH
>
> Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
> Email: address@hidden
> Internet: http://www.shell.com
>
>
> > -----Original Message-----
> > From: Mark Burgess [mailto:address@hidden
> > Sent: 15 April 2003 12:39
> > To: Garrett, Matt M SITI-ITDIEEE
> > Cc: address@hidden
> > Subject: Re: cfengine 2.0.5 Aix 4.3.3
> >
> >
> > On 15 Apr, Garrett, Matt M SITI-ITDIEEE wrote:
> > > Folks
> > >
> > > I have been trying to compile cfengine 2.0.5 for IBM AIX 4.3.3
> > >
> > > I get the following compile error's
> > >
> > --------------------------------------------------------------
> > ------------------------------
> > > /usr/bin/cc -g -I/usr/local/BerkeleyDB.4.1/include
> > > -L/usr/local/BerkeleyDB.4.1/lib -L/usr/local/ssl/lib -o
> > > cfenvd cfenvd.o globals.o filenames.o nameinfo.o
> > classes.o
> > > item.o item-ext.o item-file.o eval.o wildcard.o
> > df.o read.o
> > > granules.o log.o popen.o patches.o locks.o init.o -L../pub
> > > -lpub -L/usr/local/BerkeleyDB.4.1/lib -ldb
> > > -L/usr/local/ssl/lib -lcrypto -L../pub -lpub -lpthreads
> > > -lpthread -lm ld: 0711-317 ERROR: Undefined symbol: .getloadavg
> > > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> > > information. make: 1254-004 The error code from the last
> > command is 8.
> > >
> > >
> > > Stop.
> > > make: 1254-004 The error code from the last command is 2.
> > >
> > --------------------------------------------------------------
> > ------------------------------
> > >
> > > I managed to compile openssl 0.9.7 and BerkeleyDB.4.1 without much
> > > problems.
> > >
> > > Any idea's
> > >
> > > Thanks
> > >
> > > Matt
> > >
> > > Matthew Garrett
> > > Unix System Support
> > > Shell Information Technology International Limited
> > > Loirston House, Wellington Road, Altens, Aberdeen AB12 3BH
> > >
> > > Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
> > > Email: address@hidden
> > > Internet: http://www.shell.com
> > >
> >
> > Please try 2.0.6
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Work: +47 22453272 Email: address@hidden
> > Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
>
>
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-cfengine