running too much instances of perl in parallel
Ivana Varekova <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I just get a bug-report - which complains about the multiple instances
of perl running at one time:
"I noticed on F10 x86_64 machine that logwatch runs 10 perl instances
and moves my AMD CPU temp to 90 C.
# pstree -a -c -h -l -n -p shows :
|-anacron,2462 -s
| `-run-parts,4922 /usr/bin/run-parts /etc/cron.daily
| |-0logwatch,4952 -w /etc/cron.daily/0logwatch
| | `-sh,5038 -ccat\040/var/cache/logwatch/logwatch.bnY3sxr8/messages-archive\040/var/log/messages\040\040|\040/usr/bin/perl\040/usr/share/logwatch/scripts/shar
| | |-cat,5039 /var/cache/logwatch/logwatch.bnY3sxr8/messages-archive /var/log/messages
| | |-perl,5040 /usr/share/logwatch/scripts/shared/expandrepeats
| | |-perl,5041 /usr/share/logwatch/scripts/shared/removeservice talkd
| | |-perl,5042 /usr/share/logwatch/scripts/shared/removeservice telnetd
| | |-perl,5043 /usr/share/logwatch/scripts/shared/removeservice inetd
| | |-perl,5044 /usr/share/logwatch/scripts/shared/removeservice nfsd
| | |-perl,5045 /usr/share/logwatch/scripts/shared/removeservice /sbin/mingetty
| | |-perl,5046 /usr/share/logwatch/scripts/shared/removeservice netscreen
| | |-perl,5047 /usr/share/logwatch/scripts/shared/removeservice netscreen
| | |-perl,5048 /usr/share/logwatch/scripts/shared/onlyhost
| | `-perl,5049 /usr/share/logwatch/scripts/shared/applystddate
| `-awk,4953 -v progname /etc/cron.daily/0logwatchprogname\040{\012\011\011\011\011\040\040\040print\040progname\040":\n"\012\011\011\011\011\040\040\040progname="";\012\011\011\011\040\040\040\040\040\040\040}\012\011\011\011\040\040\040\040\040\040\040{\040print;\040
"
I agree with the bug reporter. The number of perl instances especially
for /var/log/messages logfile is huge. So could the number of perl calls
be reduce?
I have two ideas what could be done:
1/ add the possibility to call shared scripts with several parameters
(logwatch does not need to go through the log file multiple times)and
the number of perl script decrease.
2/ shared perl scipt transfer to perl procedures - so there will be no
need to call another perl instance.
What is your opinion? Is any of these solutions acceptable for? Or do
you have any other idea how to solve this problem?
Thanks.
Ivana Varekova