embedded Perl anyone ?
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Tue Nov 4 13:46:38 CET 2003
On Mon, Nov 03, 2003 at 08:21:09PM -0800, nagios-users-request at lists.sourceforge.net wrote:
Dear Sir,
I am writing to thank you for your letter and say,
> Message: 5
> Date: Mon, 3 Nov 2003 11:29:39 -0700
> From: "MT Morales" <nagios at pensol.net>
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] nagios-1.1 embedded perl anyone?
>
>
> I have tried compiling nagios-1.1 with "--with-embedded-perl" and for
> some reason the nagios binary segfaults when run. If I compile it
> without that option it works fine.
QA problems with the embedded Perl maintainer lead to the release of Nag
1.0 and 1.1 with embedded Perl support that would seg fault with most
Perls (*BSD systems mainly excepted).
The CVS bug-fix branch has the corrected sources; you can find some
discussion about this in the mail archives in the last week.
> Is this feature even worth it? I'm planing to have about 600-900
> servers/devices to monitor and I thought this would be a good feature
> to have, specially if I decide to include perl commands/plugins to
> check most of the clients.
There is a link to a discussion of the costs and benefits of embedded
Perl Nagios among the Nag pages (advanced subjects ?).
My feeling is that if you have a lot of custom Perl plugins, or you are
box limited - if this is possible in these heady SMP days - then sure,
ePN is a good thing since it saves on fork(), perl_alloc,
perl_construct, perl_parse() calls when running your plugins in return
for
- memory leaks
- greater fussiness about plugin coding (some Perl modules do _not_ work
with ePN)
That said, all the problems with ePN have simple work arounds.
I have been using ePN, albeit with periodic restarts when the memory
leaks get too bad, for years; I doubt I would consider anything else.
This site uses a lot of Perl (to Parse web pages, to automate web
searches etc) and the fork/CPU load would be considerably higher than
what it is (for ~350 checks and 200 hosts on a Dell 350/Cel 800 Mhz,
FreeBSD 4.8-RELEASE)
tsitc> top -b
last pid: 20789; load averages: 0.00, 0.04, 0.06 up 18+00:14:09
23:32:00
69 processes: 2 running, 67 sleeping
Mem: 53M Active, 61M Inact, 62M Wired, 12M Cache, 35M Buf, 61M Free
Swap: 256M Total, 108K Used, 256M Free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU
COMMAND
20773 nagios 30 0 14308K 13332K RUN 0:00 27.00% 1.32%
nagios
20768 nagios 2 0 2344K 1588K select 0:00 7.00% 0.34%
ssh
20764 nagios -6 0 13764K 13008K piperd 0:00 2.56% 0.24%
nagios
70392 nagios 10 0 13748K 12756K nanslp 1:05 0.10% 0.10%
nagios
239 root 2 0 4484K 2764K select 52:30 0.00% 0.00%
perl
234 root 2 0 7200K 3852K select 46:19 0.00% 0.00%
snmptrap
71 root 2 0 1028K 488K select 2:24 0.00% 0.00%
syslogd
76 root 2 0 1296K 432K select 1:26 0.00% 0.00%
ntpd
103 root 2 0 3040K 1092K select 1:15 0.00% 0.00%
sendmail
74 bind 2 0 5620K 4120K select 1:06 0.00% 0.00%
named
226 root 2 0 6696K 2920K select 0:52 0.00% 0.00%
httpd
2205 root 10 0 1104K 412K nanslp 0:46 0.00% 0.00%
sms_serv
95 root 10 0 992K 300K nanslp 0:23 0.00% 0.00%
cron
97 root 2 0 2584K 688K select 0:18 0.00% 0.00%
sshd
100 root 2 0 1188K 576K select 0:13 0.00% 0.00%
amd
37058 anwsmh 2 0 5284K 1740K select 0:03 0.00% 0.00%
sshd
37060 anwsmh 2 0 5284K 1740K select 0:01 0.00% 0.00%
sshd
106 smmsp 18 0 2920K 696K pause 0:01 0.00% 0.00%
sendmail
> Maybe I don't even need embedded perl, but
> I'd appreciate any ideas/suggestion/experience/etc. regarding this
> issue if seen at all.
>
AFAIK, embedding Perl has not been particuarly popular despite its
promises: There remains only mod_perl, Gnumeric and perhaps some
Commercial products that are well known for using it.
That said, mod_perl is pretty famous for accelerating Perl CGI largely
because it eliminates the web server fork and the Perl load and parse
CGI phases (as happens with ePN).
You only need or may need ePN if you have a lot of Perl plugins and or a
little CPU.
> thanks
> Tomas
>
>
>
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list