¸®´ª½ºÀÇ °Á¡Àº ¹¹´Ï¹¹´ÏÇصµ °ø°³µÈ ¼Ò½º°¡ ¾Æ´Ò±î ÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº ŸÀÇ ÃßÁ¾À» ºÒÇãÇÏÁÒ. ±×¸¸Å ¸®´ª½º¸¦ ´Ù·ç´Â ºÎºÐ¿¡¼ ÄÄÆÄÀÏÀº Àå³°¨Ã³·³ ¿©°Ü¾ß ÇÕ´Ï´Ù. ÀÏ´Ü ¾î¶² º¹ÀâÇÑ ¼Ò½º¸¦ Çϳª ¿¹¸¦ µé¾î¼ ÇÁ·Î±×·¥À» ÄÄÆÄÀÏ Çغ¾½Ã´Ù.
º¸Åë SRPM³»Áö tar.gz·Î µÇ¾îÀÖ´Â °ÍÀ» ±¸ÇÏ°Ô µÇ½Ç °ÍÀÔ´Ï´Ù. ÀÚ¾Æ Àúµµ ¾î¶² ÆÄÀÏÀ» ºÙÀâ°í ¿©·¯ºÐµé°ú °°ÀÌ °¡Áö°í ³î¾Æ¾ß°ÚÁÒ? procps-2.0.2-korea_patch.tgz ÀÌ ÆÄÀÏÀº ftp://monster.uos.ac.kr/pub/misc/procps-2.0.2-korea_patch.tgz ¿¡ Áغñ½ÃÄÑ ³õ¾Ò½À´Ï´Ù. ¿ì¸®´Â ÀÌ ÆÄÀÏ¿¡¼ topºÎºÐÀÇ ¾È³»¹®ÀÌ Çѱ۷Π³ª¿À°Ô ÇÏ´Â °ÍÀÌ ¸ñÀûÀÔ´Ï´Ù.
** ÁÖÀÇ ! : ÀÌ ¼Ò½º´Â ¾ËÂ¥ 6.0 ¶Ç´Â RedHat 6.0 ¶Ç´Â ÆÄ¿ö,¾×¼¿ ¸®´ª½º¿¡¼ ÇÏ´Â °ÍÀ» ±âº»À¸·Î ÇÕ´Ï´Ù. ¸¸¾à RedHat 5.2¶Ç´Â ¾ËÂ¥ 5.2¶ó¸é, ÀÏ´Ü procps¸¦ (À§ÀÇ ÆÄÀÏ) ¸ðµÎ ¼³Ä¡ÇϽŠ´ÙÀ½¿¡ ldconfig¸¦ ½ÇÇà½ÃÅ°½Ã°í ³ µÚ¿¡ ½ÃÀÛÇÏ¼Å¾ß µË´Ï´Ù. ¿Ö³Ä±¸¿ä? ±×³ÉÇϸé libProc.ld¸¦ ã´À¶ó°í ³¸®¸¦ Ä¡±â ¶§¹®ÀÔ´Ï´Ù.
ÀÏ´Ü ÀÌ ÆÄÀÏÀ» Àû´çÇÑ °÷¿¡ µÎ°í ¾ÐÃàÀ» DZ½Ã´Ù.
tar zxvf procps-2.0.2-korea_patch.tgz
ÀÚ, ´Ù Ç®¸®¼Ì½À´Ï±î? ÀÌÁ¦ procps-2.0.2 µð·¹Å丮·Î µé¾î°©½Ã´Ù. µé¾î°¡¸é top.c °¡º¸À̽ÃÁÒ? ¿ä°ÍÀÌ ¿ì¸®µéÀÇ ¸ñÇ¥ÀÔ´Ï´Ù. ±×·¯³ª... ÀÌ·¸°Ô ã¾Æ µé¾î°¡¸é ¾ÈµÅ¿ä!! Á¦ÀÏ ¸ÕÀú º¸¾Æ¾ßÇÒ ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù.
README INSTALL
¾î¶² ¼Ò½ºµçÁö, ¿ä µÑÁß¿¡ ÇÑ°¡Áö´Â ²À µé¾îÀÖ½À´Ï´Ù. ¿ä±â¿¡ ¼³Ä¡¹ýÀÌ ´Ù ³ª¿Í ÀÖ½À´Ï´Ù. ¹°·Ð ¿µ¾îÀÌ°ÚÁÒ...(^^;) ¿©ÇÏÆ° ÀÌ ÆÄÀÏÀ» ¸ÕÀú º¸½Ã°í ÀÌÁ¦ top.c¸¦ º¾½Ã´Ù. ÀÏ´Ü Àú´Â 'CPU states'¸¦ 'CPU »óÅÂ'·Î ¹Ù²Ù°Ú½À´Ï´Ù. 1274¹ø° ÁÙÀÔ´Ï´Ù.
/* END EXPERIMENTAL CODE */ printf("CPU »óÅÂ:" " %2ld.%ld%% user, %2ld.%ld%% system," " %2ld.%ld%% nice, %2ld.%ld%% idle",
ÀÚ, "CPU »óÅÂ" ¶ó°í ¹Ù²Ù¼ÌÁÒ? ÀÌÁ¦ ÀúÀåÀ» ÇϽðí ÄÄÆÄÀÏÀ» ÇսôÙ. ÄÄÆÄÀÏ ÇÒ¶§´Â make¸¦ ÀûÀýÇÏ°Ô »ç¿ëÇսôÙ.
make top
ÀÌ·¸°Ô Çϸé top ÇÁ·Î±×·¥ºÎºÐ¸¸ ÄÄÆÄÀÏÇÏ°Ô µË´Ï´Ù. ÀÚ, ÀÌÁ¦ topÀ̶ó°í ½ÇÇà°¡´ÉÇÑ ÆÄÀÏÀÌ »ý¼ºµÇ¾úÁÒ? ¿©±â¼ topÀ» ½ÇÇà½ÃÄÑ º¾½Ã´Ù.
3:22am up 17 days, 20:35, 2 users, load average: 0.00, 0.00, 0.00 59 processes: 58 sleeping, 1 running, 0 zombie, 0 stopped CPU »óÅÂ: 0.0% user, 0.0% system, 0.0% nice, 2.4% idle
¾î¶§¿ä? Çѱ۷Π³ª¿ÀÁÒ? ÀÌ·¸°Ô Á¶±Ý¾¿ ¹Ù²Ù¾î ³ª°¡¸é Àڽŵµ ¸ð¸£´Â »çÀÌ¿¡ ÇÑ±Û ÆÐÅ°Áö¸¦ ¸¸µå´Â ÆÐÅ°Àú°¡ µÉ ¼ö ÀÖ½À´Ï´Ù. ÀÌÁ¦ ´Ù¸¥ ºÎºÐµµ ¸ðµÎ ¹Ù²ãº¼±î¿ä?
4:33am up 17 days, 21:46, 2 users, load average: 0.07, 0.04, 0.00 51 ÀÛ¾÷°³¼ö: 50 ÀáÆÃÀÌ°³¼ö, 1 ¶Ü¹ÚÁú°³¼ö, 0 Á»ºñ(±Í½Å), 0 ¸ØÃá°¹¼ö CPU »óÅÂ: 0.0% user, 0.7% system, 0.0% nice, 99.2% idle Mem: 95592K av, 90880K used, 4712K free, 91880K shrd, 18700K buff Swap: 96384K av, 1412K used, 94972K free 46492K cached Memory Á¤º¸ º¸¿©ÁÙ±î ¸»±î? off
ÀúÀÇ ÂªÀº ¿µ¾î½Ç·ÂÀ¸·Î ¹Ù²Û ¾È³»¹®µéÀÔ´Ï´Ù. ¸¸¾à ¿µ¾î¹ø¿ª¿¡ Á¶¿¹°¡ ±íÀ¸½Å ºÐµéÀº ÀÌ¿Í°°Àº Àç¹ÌÀÖ´Â ÀÏ¿¡ µ¿ÂüÇØ Áֽñ⠹ٶø´Ï´Ù. Á¦°¡ ¹Ù²Û topÀº RPMÀ¸·Î ¸¸µé¾î¼ ftp://monster.uos.ac.kr/pub/misc/ ¾È¿¡ ³Ö¾îµÎ°Ú½À´Ï´Ù.
procps-2.0.2-linux4reduck96.src.rpm ¼Ò½º ÆÐÅ°Áö ----------------------------------------------- procps-2.0.2-linux4reduck96_Alzza52.i386.rpm procps-X11-2.0.2-linux4reduck96_Alzza52.i386.rpm -----------------------------------------------¾ËÂ¥ 5.2¿ë
ÀÌ·¸°Ô ÆÄÀÏÀ» µÎ°Ú½À´Ï´Ù. ¸¸¾à ¾ËÂ¥ 6.0À» »ç¿ëÇÏ½Ç °æ¿ì, rpm --rebuild procps-2.0.2-linux4reduck96.src.rpm ¶ó°í ÇϽøé /usr/src/redhat/RPMS/i386 ¿¡ ¹ØÀÇ µÎ ÆÄÀÏÀÌ »ý¼ºµË´Ï´Ù. ±×°ÍÀ¸·Î rpm -Uhv proc*.rpm ÇÏ½Ã¸é µË´Ï´Ù. ¸¹À̸¹ÀÌ ¼öÁ¤Çؼ ÀÚ·á½Ç¿¡ ¿Ã·ÁÁÖ¼¼¿ä ^^;