Korea FreeBSD Users Group News, Internal, Projects, Home
Software, Support, Documentation

[KFUG] purgestat



[ ³¯Â¥¼ø »öÀÎ ] [ ´ñ±Û¼ø »öÀÎ ] [ ÃÖ»óÀ§ »öÀÎ] [ °Ë»ö]

[ÀÌÀü ±Û] [´ÙÀ½ ±Û] [ÀÌÀü ´ñ±Û] [´ÙÀ½ ´ñ±Û]


안녕하세요.

FreeBSD4.9 에 qmail 을 세팅해서 사용중인데, 서버에 이상한 점이 있어 문의드립니다.
정기적으로 mailwrapper 가 CPU 사용률의 100% 가까이 점유하면서 다른 서비스(httpd, mysqld)는 먹통이 되기 시작합니다.
해당 프로세스를 죽이면 정상으로 돌아옵니다.

# top

last pid: 74886;  load averages:  1.04,  1.03,  1.00                                                        up 4+18:01:52  17:21:17
92 processes:  2 running, 89 sleeping, 1 zombie
CPU states:     % user,     % nice,     % system,     % interrupt,     % idle
Mem: 175M Active, 295M Inact, 98M Wired, 18M Cache, 112M Buf, 419M Free
Swap: 2032M Total, 2032M Free

  PID USERNAME PRI NICE  SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND
68142 root      53   0   904K   276K CPU0   0 858:12 98.93% 98.93% mailwrapper
74886 root      37   0  2000K  1120K CPU2   2   0:01 56.00%  2.73% top
  309 root       2   0  4432K  3000K select 2  25:20  0.00%  0.00% snmpd
17037 mysql      2  14 63356K 26556K select 0   1:23  0.00%  0.00% mysqld
  391 nobody     2   0 10788K  7332K accept 2   0:57  0.00%  0.00% httpd
  353 nobody     2   0 10916K  7484K accept 0   0:44  0.00%  0.00% httpd
  354 nobody     2   0 10796K  7360K accept 0   0:42  0.00%  0.00% httpd
  359 nobody     2   0 10784K  7340K sbwait 0   0:41  0.00%  0.00% httpd
  355 nobody     2   0 10756K  7316K accept 0   0:41  0.00%  0.00% httpd
  392 nobody     2   0 11052K  7588K accept 2   0:41  0.00%  0.00% httpd
  358 nobody     2   0 10788K  7344K accept 2   0:40  0.00%  0.00% httpd

# ps -auxw | grep mailwrapper
root     68142 99.0  0.0   292  172  ??  R     3:01AM 858:21.41 purgestat (mailwrapper)

이런 현상이 발생할때 find 프로세스도 한몫을 하는것 같습니다.

ps 명령어로 찾아보니 /usr/sbin/purgestat 가 작동하면서 그렇게 된것인데, /usr/sbin/purgestat는 /usr/sbin/mailwrapper 로 symbolic link 걸려 있습니다.

purgestat 관련된 세팅은 다음과 같습니다.
# cat /etc/mail/mailer.conf

# $FreeBSD: src/etc/mail/mailer.conf,v 1.2.2.1 2002/04/09 02:00:56 gshapiro Exp $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
sendmail       /var/qmail/bin/sendmail
send-mail      /var/qmail/bin/sendmail
mailq          /var/qmail/bin/qmail-qread
newaliases     /usr/bin/newaliases
hoststat       /var/qmail/bin/qmail-qstat
purgestat      /usr/sbin/purgestat

# cat /etc/periodic/daily/150.clean-hoststat

#!/bin/sh
#
# $FreeBSD: src/etc/periodic/daily/150.clean-hoststat,v 1.3.2.4 2004/01/06 17:50:52 gshapiro Exp $
#
# Remove stale persistent host status files
#

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]; then
    . /etc/defaults/periodic.conf
    source_periodic_confs
fi

case "$daily_clean_hoststat_enable" in
    [Yy][Ee][Ss])
        if [ -z "$(hoststat 2>&1)" ]; then
            rc=2
        else
            echo ""
            echo "Removing stale entries from sendmail host status cache:"
            rc=0
            purgestat || rc=1
        fi;;

    *)  rc=0;;
esac

exit $rc

purgestat 가 어떤 역할을 하길래 시스템이 먹통이 되는지 도움말씀 부탁드립니다.
_______________________________________________
한국 FreeBSD 사용자 그룹(KFUG) questions 메일링 리스트
questions at kr.FreeBSD.org
http://www.kr.FreeBSD.org/mailman/listinfo/questions


[ ³¯Â¥¼ø »öÀÎ ] [ ´ñ±Û¼ø »öÀÎ ] [ ÃÖ»óÀ§ »öÀÎ] [ °Ë»ö]

Copyright © 1998-2005 Korea FreeBSD Users Group.
All rights reserved. webmaster at kr.FreeBSD.org
$Date: 2004/10/21 19:18:12 $
Powered by FreeBSD