/etc/init.d/MailScanner stop: caught SIGTERM, aborting
Julian Field
MailScanner at ecs.soton.ac.uk
Wed May 27 18:41:00 IST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 27/05/2009 17:22, Jarry wrote:
> Glenn Steen wrote:
>> 2009/5/24 Jarry <mr.jarry at gmail.com>:
>>> For whatever reason I can not stop/start MailScanner cleanly:
>>>
>>> # /etc/init.d/MailScanner stop
>>> * Stopping MailScanner...
>>> * MailScanner: caught SIGTERM, aborting
>>>
>>> # /etc/init.d/MailScanner start
>>> * WARNING: MailScanner has already been started
>>>
>>> Actually, MailScanner stops, but sendmail which has been
>>> started by MailScanner init script is still there running:
>>>
>>> # ps -e | grep sendmail
>>> 18676 ? 00:00:00 sendmail
>>> 18679 ? 00:00:00 sendmail
>>>
>>> Even when I killall sendmail, I still get the above mentioned
>>> warning, and can not start MailScanner. And that is a problem,
>>> because MailScanner is restarted (in my case, just want to be
>>> restarted, but is not) every hour to prevent eating all resources
>>> (which it keeps eating anyway, read next). I checked /var/run and
>>> /var/lock, there is no trace of MailScanner or sendmail running,
>>> yet I can not re-start Mailscanner. How can I fix this problem?
>>
>> What version of MailScanner, what version of what OS? It's rather like
>> impossible to help you without those tidbits;-)
>
> Sorry I did not mention it. I just thought it was not important.
> MailScanner 4.70.7.1, OS Gentoo (stable branch, everything updated)
>
> The /etc/init.d/MailScanner script looks this way:
> ----------------------------------
> #!/sbin/runscript
> opts="${opts} reload"
> depend() {
> need net mta
> use logger dns }
>
> start() {
> ebegin "Starting MailScanner"
> /usr/sbin/check_MailScanner >/dev/null
> RETVAL=$?
> [ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/MailScanner
> [ ${RETVAL} -eq 0 ] && rm -f /var/lock/subsys/MailScanner.off
> eend ${RETVAL}
> }
>
> stop() {
> ebegin "Stopping MailScanner"
> killall -15 MailScanner
> RETVAL=$?
> [ ${RETVAL} -eq 0 ] && rm -f /var/lock/subsys/MailScanner
> [ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/MailScanner.off
> eend ${RETVAL}
> }
> # I removed "restart () {}" and "reload () {}" sections
> ----------------------------------
>
> I'm not good at shell-programming, but this is what someone
> on our mailing-list said about it (and others seemed to agree):
>
> "...That's the ugliest init.d script ever. It looks like it fell
> out of the ugly tree, hit every branch on the way down and
> now not even its mother could love it..."
Well I didn't write the code above, so they're quite free to say
whatever they like about it. Nothing to do with me.
>
>>> And the 2nd problem, MailScanner is eating too much memory:
>>>
>>> # ps aux | grep MailScanner
>>> root 8047 0.0 0.7 93148 31084 ? Ss 13:53 0:00 MailScanner:
>>> master
>>> waiting for children, sleeping
>>> root 8048 0.0 1.5 140136 64692 ? S 13:53 0:00 MailScanner:
>>> waiting
>>> for messages
>>> root 8140 0.0 1.5 140136 64696 ? S 13:54 0:00 MailScanner:
>>> waiting
>>> for messages
>>> root 8173 0.0 1.5 140136 64696 ? S 13:54 0:00 MailScanner:
>>> waiting
>>> for messages
>>> root 8176 0.0 1.5 140140 64696 ? S 13:54 0:00 MailScanner:
>>> waiting
>>> for messages
>>> root 8177 0.0 1.5 140140 64696 ? S 13:54 0:00 MailScanner:
>>> waiting
>>> for messages
>>>
>>> ~330 MB RESS, ~1GB VIRTS, is *this* normal?
VIRTS is irrelevant. I can make a process print whatever it likes in
that column.
>>> Unbelievable. I see it for
>>> the first time, that my server does not have enough physical memory
>>> and is forced to use swap. I'm affraid, I can not spend so much memory
>>> just for MailScanner...
>>>
>> Are you perhaps using the clamavmodule?
>
> No, I'm using F-Prot, and no SpamAssassin. My server has 2GB memory,
> and out of it, running a few vservers. The one serving mail (strip-down
> gentoo, with sendmail, f-prot and mailscanner) eats ~350MB physical
> memory right after boot, out of that more than 300MB is mailscanner.
> I could not believe it, when I saw it for the first time. 300 megs!!!
And memory costs about 20 or 30 quid per gigabyte, roughly speaking.
What's your question again?
Jules
- --
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Follow me at twitter.com/JulesFM
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.10.0 (Build 500)
Comment: Use PGP or Thunderbird Enigmail to verify this message
Charset: ISO-8859-1
wj8DBQFKHXstEfZZRxQVtlQRAuFnAKCOv0TuVZq02/UGP8M1ddgQaIH16ACeMtXn
6LGKtoN+bz2uzuIdxG7ft20=
=lqhZ
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list