´ÙÀ½ ÀÌÀü Â÷·Ê

4. ¹ø¿ªÀÚÀÇ Ãß°¡ »çÇ×

¹ø¿ªÀÚ°¡ ¾²°í ÀÖ´Â ·¹µåÇÞ ¹èÆ÷ÆÇ 5.2ÀÇ °æ¿ì, ÇÁ·Î¼¼½º Åë°è °ü·Ã ¸í·ÉÀº psacct¶ó´Â ÆÐÅ°Áö¿¡ µé¾îÀÖ´Ù. ¹ø¿ªÀÚÀÇ ½Ã½ºÅÛ¿¡ ¼³Ä¡µÈ ³»¿ªÀº ´ÙÀ½°ú °°´Ù.


[<url url="maelto: mpark@mulli mpark" name="mpark@mulli mpark" >]$ rpm -qil psacct
Name        : psacct                      Distribution: Manhattan 
Version     : 6.3                               Vendor: Red Hat Software
Release     : 5                             Build Date: Mon 17 Aug 1998 04:34:07 AM KST
Install date: Sun 27 Dec 1998 08:16:39 AM KST      Build Host: porky.redhat.com
Group       : Utilities/System              Source RPM: psacct-6.3-5.src.rpm
Size        : 82423                            License: GPL
Packager    : Red Hat Software <<url url="maelto: bugs@redhat.com" name=" bugs@redhat.com" >>
Summary     : Process accounting tools
Description :
The tools necessary for accounting the activities of processes are
included here.
/sbin/accton
/usr/bin/ac
/usr/bin/lastcomm
/usr/info/accounting.info.gz
/usr/man/man1/ac.1
/usr/man/man1/lastcomm.1
/usr/man/man8/accton.8
/usr/man/man8/sa.8
/usr/sbin/accton
/usr/sbin/dump-acct
/usr/sbin/dump-utmp
/usr/sbin/sa
/var/log/pacct
/var/log/savacct
/var/log/usracct

ÀÌ·¸°Ô ÇÁ·Î¼¼½º Åë°è¸¦ pacct ÆÄÀÏ¿¡ ÀúÀåÇϱ⠽ÃÀÛÇϸé, ÀÌ ÆÄÀÏÀº ¸í·É¾î »ç¿ëºóµµ¿¡ ºñ·ÊÇؼ­ ±Ý¹æ Ä¿Áö°Ô µÈ´Ù. µû¶ó¼­ logrotate¿Í cronÀ» ÀÌ¿ëÇؼ­ °ü¸®ÇØ¾ß ÇÑ´Ù. cronÀº ¹é¾÷°ú °°ÀÌ ÁÖ±âÀûÀ¸·Î ½ÇÇàÇÏ´Â ¸í·ÉµéÀ» ÀÚµ¿À¸·Î ó¸®Çϵµ·Ï ÇØÁÖ´Â µµ±¸·Î, ¼³Á¤ ³»¿ëÀº ·¹µåÇÞÀÇ °æ¿ì /etc/crontab¿¡ ÀÖ´Ù. logrotate´Â log ÆÄÀϵéÀ» ÁÖ±âÀûÀ¸·Î °ü¸®ÇÏ´Â µµ±¸´Ù. ÁöÁ¤µÈ Áֱ⿡ ¸ÂÃç¼­ °¢°¢ÀÇ log ÆÄÀϵéÀÇ À̸§À» ¹Ù²Ù°Å³ª, ¾ÐÃàÇϰųª »èÁ¦ÇÑ´Ù. º¸Åë /etc/cron.daily¿¡ logrotate¶ó´Â ½ºÅ©¸³Æ®¸¦ µÎ¾î /usr/sbin/logrotate¸¦ /etc/logrotate.conf¶ó´Â ¼³Á¤¿¡ ¸ÂÃç ¸ÅÀÏ ½ÇÇàÇÏ°Ô µÇ¾î ÀÖ´Ù. µû¶ó¼­ pacct¸¦ °ü¸®ÇÏ·Á¸é /etc/logrotate.conf¿¡ ÀÖ´Â ´Ù¸¥ log¿¡ ´ëÇÑ ¼³Á¤À» Âü°íÇÏ¿© Àû´çÈ÷ /var/log/pacct¿¡ ´ëÇÑ Ç׸ñÀ» logrotate.conf¿¡ Ãß°¡ÇÏ¸é µÈ´Ù.
´ÙÀ½ ÀÌÀü Â÷·Ê