¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 138°Ç
   
MRTG Log Format
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2009-12-09 (¼ö) 09:47 Á¶È¸ : 16103
±ÛÁÖ¼Ò :
                          

ex)

1260319443 31852216863 19823135102
1260319443 109 218 109 218
1260319155 1 1 1 1
1260318900 552 46 642 54
1260318600 1663 135 1849 150
1260318300 1106 94 1849 150
1260318000 888 83 996 86
1260317700 1360 107 1441 111



[ù¹ø° ¶óÀÎ]
[timestamp],[incoming bytes counter],[outgoing bytes counter]

[2¹øÀç ¶óÀκÎÅÍ´Â]

[timestamp],
[average incoming transfer rate in bps],[average outgoing transfer rate in bps],[maximum incoming rate in bps],[maximum outgoing rate in bps for current interval]


* Timestamp º¯È¯ ¹æ¹ý

¿¢¼¿ =(x+y)/86400+DATE(1970,1,1)
PERL -> perl -e 'print scalar localtime(x),"\n"'

x: timestamp
y: the offset in seconds from UTC  (¿ì¸®³ª¶ó 9½Ã°£)




Ãß°¡¼³¸í (http://www.kawada.kr/?mid=IT&category=2297&document_srl=1869)

The first Line
first line Àº ¼¼°³ÀÇ ¼öÀÚ¸¦ °¡Áø´Ù.

A. (1st column)

MRTG°¡ °¡Àå ÃÖ±Ù¿¡ ½ÇÇàµÈ timestamp¸¦ ³ªÅ¸³½´Ù. timestamp´Â unix timeÀ¸·Î½á 1970³â 1¿ù1ÀϺÎÅÍ ÃÊ´ÜÀ§·Î °è»êµÈ ½Ã°£À» ¸»ÇÑ´Ù.

 

B. (2nd column)

'incoming bytes counter'°ª. 32bit counterÀÎ °æ¿ì 'ifInOctets'¸¦ ÅëÇؼ­ °¡Á®¿Â °ª.

 

C. (3rd column)

'outgoing bytes counter' °ª. 32bit counterÀÎ °æ¿ì 'ifOutOctets'¸¦ ÅëÇؼ­ °¡Á®¿Â °ª.

 

 

The rest of the File

µÎ¹ø° ÁÙºÎÅÍ´Â 5°³ÀÇ columnÀ» °¡Áö´Âµ¥ ¼¼ºÎÀûÀ¸·Î »ìÆ캸¸é ´ÙÀ½°ú °°´Ù.


A. (1st column)

¾Õ¿¡¼­ ¼³¸íÇÑ Unix timestamp·Î½á ÁÙ »çÀÌ°¡ ÀÏÁ¤ÇÑ °£°ÝÀ¸·Î Áõ°¡ÇÔÀ» ¾Ë ¼ö ÀÖ´Ù. óÀ½¿¡´Â 5ºÐ °£°ÝÀÌ°í °ÅÀÇ ³¡ºÎºÐ¿¡ °¡¸é ÁÙ »çÀÌ°¡ ÇÏ·çÀÓÀ» ¾Ë ¼ö ÀÖ´Ù.

 

EXCEL¿¡¼­ ´ÙÀ½ °ø½ÄÀ» ÀÌ¿ëÇϸé ÇöÀç ¿ì¸®°¡ »ç¿ëÇÏ´Â ½Ã°£À¸·Î º¯°æÇÒ ¼ö ÀÖ´Ù.

=(x+y)/86400+DATE(1970,1,1)¾Æ´Ï¸é perlÀ» ÀÌ¿ëÇؼ­ ±¸ÇÒ ¼ö ÀÖ´Ù.

 

perl -e 'print scalar localtime(x),"\n"'¿©±â¼­ x´Â unix timestamp¸¦ ÀǹÌÇÏ°í, y´Â °æ°úµÈ Ãʸ¦ ÀǹÌÇÑ´Ù. ±×·³ x¿¡ 300À» y¿¡ 5¸¦ ³Ö°í °á°ú¸¦ ¾Ë¾Æº¸µµ·Ï ÇÏÀÚ. =(300+5)/86400+DATE(1970,1,1)ÀÌ µÇ¾î¼­ À̸¦ ¿¢¼½ÀÇ ¼¿¼­½Ä¿¡¼­ 'yyyy"-"m"-"d h:mm:ss;@'·Î º¯°æÇϸé, '1970-1-1 0:05:05'°ú °°ÀÌ µÊÀ» ¾Ë ¼ö ÀÖ´Ù.´Ù¸¥ ¿¹·Î °¡Àå ÃÖ±ÙÀÇ log°ª¿¡¼­ °ªÀ» °¡Á®¿Í¼­ °è»êÇغ¸ÀÚ.x=1000049400, y=0 ÀÏ ¶§ °á°ú´Â '2001-9-9 15:30:00' ÀÌ µÈ´Ù.¡¡

 

B. (2nd column)

Æò±Õ ÀÔ·Â Àü´ÞµÈ ºñÀ²·Î½á Byte/sec ´ÜÀ§ÀÌ´Ù. ÀÌ °ªÀº ÇöÀç ¶óÀÎÀÇ °ª°ú ÀÌÀü ¶óÀÎÀÇ °ª »çÀÌÀÇ Æò±Õ°ª¿¡ ÇØ´çÇÑ´Ù.

 

C. (3rd column)

Æò±Õ Ãâ·Â Àü´ÞµÈ ºñÀ²·Î½á Byte/sec ´ÜÀ§ÀÌ´Ù. °è»êÀº À§¿Í µ¿ÀÏÇÏ´Ù.

 

D. (4th column)

ÃÖ´ë ÀÔ·Â Àü´ÞµÈ ºñÀ²·Î½á Byte/sec ´ÜÀ§ÀÌ´Ù. ÀÌ °ªÀº ÇöÀçÀÇ °£°Ý¿¡¼­ ¹ß»ýµÇ¾î °»½ÅµÈ °ªµé¿¡¼­ °è»êµÈ´Ù. ¸¸ÀÏ ÇöÀçÀÇ °£°ÝÀÌ 1½Ã°£ÀÌ°í, °»½ÅÀÌ ¸Å 5ºÐ¸¶´Ù ¹ß»ýÇß´Ù¸é, ÇØ´çµÇ´Â °ªÀº 1½Ã°£ Áß¿¡¼­ 5ºÐ¸¶´Ù °è»êµÈ °ª Áß¿¡¼­ °¡Àå Å« °ªÀÌ ÇØ´çµÈ´Ù.

 

E. (5th column)

ÃÖ´ë Ãâ·Â Àü´ÞµÈ ºñÀ²·Î½á Byte/sec ´ÜÀ§ÀÌ´Ù. °è»êÀº À§¿Í µ¿ÀÏÇÏ´Ù.


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.