monit-dev
[Top][All Lists]
Advanced

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

Re: monit&dietlibc


From: Jan-Henrik Haukeland
Subject: Re: monit&dietlibc
Date: Wed, 13 Aug 2003 21:14:37 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux)

Christian Hopp <address@hidden> writes:

> The first idea of this test was to see how far you could go with
> monit.  And the result that monit might only need 200kB on whatever
> disk/flash (...) is fascinating.

It's interesting, just for fun I built a static monit with glibc,
without ssl and the resulting static linked and stripped binary is
774344 bytes. So by using dietlibc/uclibc you manage to reduce the
size of the binary with a factor of ~ 4. 

> Furthermore we got more portable for the getloadavg.  That might be
> able to compile on more systems in the future.  Just a useful side
> effect for this kind sidetracking.

Very useful indeed if the advertisement is correct.

> The target of these libs are micro linux boxes in routers or other
> embedded systems.  I see a big potential also for monit in these
> applications.

I think you are right. In fact, I think Rory already has put monit on
one such set-top box?

In my experience (it's not very extensive I must admit) many of these
boxes has many megabytes of memory available. Today even a PalmPilot
or an Ipaq has megabytes available. What I'm driving at, is that I do
not think that a 800Kb static monit will push people away from putting
monit on such a box, but of course 200Kb is better.

>From your mails on this subject it looks like changing monit to link
with dietlibc/uclibc does not mess up the monit code(?) so I'm not at
all opposed to doing this. On the other hand I don't think it's very
important either, so my vote on this is: 0+

> Finally application which are directly related to init should be
> independent of dynamic libraries (mount problems of nfs share...).
> Libc replacements are much easier to handle then glibc.

A good point, dynamic linked applications may also be vulnerable to
certain security issues. A classic example is hacking the LD_PRELOAD
environment variable so applications loads a malicious library. But
building a static monit binary may be difficult, with thread and ssl
support. OpenSSL utilize dynamic link facilities and you may make
monit compile static if you link with -ldl. But I'm not sure if a
static linked monit with ssl and pthreads will work very good..

-- 
Jan-Henrik Haukeland




reply via email to

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