vnstat
¸®´ª½º Äֻܼ󿡼 ³¯Â¥º°·Î Æ®·¡ÇÈÀ» ¸ð´ÏÅ͸µ ÇÒ¼ö ÀÖ´Â ÅøÀÔ´Ï´Ù.
¼³Ä¡´Â yumÀ¸·Î Áö¿øµÇ¸ç ubutu´Â apt-getÀ¸·Î ¼Õ½±°Ô ¼³Ä¡ÇÒ¼ö ÀÖ½À´Ï´Ù.
¶ÇÇÑ ½Ã°£, ÀÏ, ÁÖ, ¿ùº°·Î Ãâ·ÂÀÌ °¡´ÉÇÏ¸ç µ¿½Ã¿¡ ¿©·¯°³ÀÇ ÀÌ´õ³Ý ÀÎÅÍÆäÀ̽º¸¦ ¸ð´ÏÅ͸µÀÌ °¡´ÉÇÕ´Ï´Ù.
OS : Fedoara18 x86
# yum install vnstat
# vnstat --help
vnStat 1.11 by Teemu Toivola <tst at iki dot fi>
-q, --query query database
-h, --hours show hours :: ½Ã°£º° Ãâ·Â
-d, --days show days :: ÀÏÀϵ¥ÀÌŸ Ãâ·Â
-m, --months show months :: ¿ùº°µ¥ÀÌŸ Ãâ·Â
-w, --weeks show weeks :: ÁÖ°£µ¥ÀÌŸ Ãâ·Â
-t, --top10 show top10 :: Æ®·¡ÇÈ »ç¿ë·® TOP Á¤·Ä
-s, --short use short output
-u, --update update database
-i, --iface select interface (default: eth0)
-?, --help short help
-v, --version show version
-tr, --traffic calculate traffic :: ƯÁ¤½Ã°£µ¿¾È ´©ÀûÆ®·¡ÇÈ Ãâ·Â(ÃÊ´ÜÀ§ ÀÔ·Â)
-ru, --rateunit swap configured rate unit
-l, --live show transfer rate in real time :: ½Ç½Ã°£ Æ®·¡ÇÈ Ãâ·Â
See also "--longhelp" for complete options list and "man vnstat".
# vnstat
No database found, nothing to do. Use --help for help.
A new database can be created with the following command:
vnstat -u -i eth0
Replace 'eth0' with the interface that should be monitored.
The following interfaces are currently available:
eth0 eth1 eth2 eth3 lo
¸ð´ÏÅ͸µ °¡´ÉÇÑ ÀÌ´õ³Ý µð¹ÙÀ̽º È®ÀÎ
# vnstat --iflist
Available interfaces: eth0 eth1 eth2 lo
eth0 ¸ð´ÏÅ͸µ (óÀ½¿¡´Â µ¥ÀÌÅͺ£À̽º ÆÄÀÏÀÌ ¾ø¾î¼ Error ¸Þ¼¼Áö°¡ Ãâ·Â)
# vnstat -u -i eth0
Error: Unable to read database "/var/lib/vnstat/eth0".
Info: -> A new database has been created.
:: ¾ÆÁ÷ ÃæºÐÇÑ µ¥ÀÌÅÍ°¡ ´©ÀûµÇÁö ¾Ê¾Æ¼ ³ª¿À´Â ¸Þ¼¼Áö·Î ÀÏÁ¤µ¥ÀÌŸ°¡ ½×ÀÌ°Ô µÇ¸é Ãâ·ÂµË´Ï´Ù.
# vnstat
eth0: Not enough data available yet.
# vnstat
Database updated: Thu Oct 30 13:35:40 2014
eth0 since 10/30/14
rx: 599.48 MiB tx: 11.28 MiB total: 610.76 MiB
monthly
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
Oct '14 599.48 MiB | 11.28 MiB | 610.76 MiB | 1.96 kbit/s
------------------------+-------------+-------------+---------------
estimated 628 MiB | 11 MiB | 639 MiB |
daily
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
today 599.48 MiB | 11.28 MiB | 610.76 MiB | 102.23 kbit/s
------------------------+-------------+-------------+---------------
estimated 1.03 GiB | 19 MiB | 1.05 GiB |