Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam serdecznie.
Zainstalowałem sobie z repozytorium mrtg ( aptitude install mrtg). No i niestety nie chce mi coś działać. Po wpisaniu:
Debian:/home/arek# mrtg /etc/mrtg.cfg ----------------------------------------------------------------------- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/bin/mrtg /etc/mrtg.cfg -----------------------------------------------------------------------
Próbowałem, tez szukać informacji na forum i necie i nic nie znalazłem - może dlatego, że jestem taki zielony i nie wiem dokładnie czego szukać. Proszę Was o pomoc. Chciałem aby MRTG mi rysował statystyki obciążenia każdego z 3 interfejsów zainstalowanych w moim Debianie.
Pozdrawiam
Offline
Próbowałeś to, czego proponuje Ci mrtg, czyli odpalać mrtg w taki sposób: env LANG=C /usr/bin/mrtg /etc/mrtg.cfg ?
Offline
Niestety
Debian:/home/arek# env LANG=C /usr/bin/mrtg /etc/mrtg/mem.cfg ERROR: unable to open config file: /etc/mrtg/mem.cfg Debian:/home/arek#
Natomiast
Debian:/home/arek# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg ERROR: CFG Error in "workdir", line 8: Working directory /var/www/mrtg does not exist Debian:/home/arek#
Offline
Working directory /var/www/mrtg does not exist[/quote]
utwórz go
"Wszyscy wiedzą, że czegoś zrobić nie można. Ale przypadkowo znajduje się jakiś nieuk, który tego nie wie. I on właśnie robi odkrycie." (A.Einstein)
Offline
@archie4 do poduszeczki :)
http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch23_:_Advanced_MRTG_for_Linux
Offline
Dziś spróbuje utworzyć ten katalog.
Natomiast
@jezoo
mój angielski jest na poziomie hello. Czy masz cynk na takie materiały po polskiemu ? :D
Pozdrawiam
Offline
[url]http://download.freesco.pl/docs/mrtg-referat.pdf[/url]
Prosze bardzo.
Offline
@divinity
Bardzo przydatne materiały juz się biorę za chłonięcie wiedzy.
Dziękuję bardzo.
Pozdrawiam
Offline
Po utworzeniu katalogu wygląda to tak:
Debian:/home/arek# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg Debian:/home/arek#
I nic się nie dzieję.
Natomiast:
Debian:/home/arek# mrtg /etc/mrtg.cfg ----------------------------------------------------------------------- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/bin/mrtg /etc/mrtg.cfg ----------------------------------------------------------------------- Debian:/home/arek#
Biorę się za czytanie materiałów, które mi podrzuciliście i walczę z problemem, jakby ktoś z Was miał jakiś pomysł, to proszę pisać, będę tu co jakiś czas zaglądał.
Pozdrawiam
Ostatnio edytowany przez archie4 (2008-05-31 11:08:18)
Offline
a czy on przypadkiem nie odpala sie w tle? - zobacz [tt]ps -Alf[/tt]
Offline
Nie jestem pewien, ale chyba nie:
Debian:/home/arek# ps -Alf F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 4 S root 1 0 0 80 0 - 508 - 13:19 ? 00:00:01 init 1 S root 2 0 0 75 -5 - 0 - 13:19 ? 00:00:00 [kth] 1 S root 3 2 0 -40 - - 0 - 13:19 ? 00:00:00 [mig] 1 S root 4 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kso] 5 S root 5 2 0 -40 - - 0 - 13:19 ? 00:00:00 [wat] 1 S root 6 2 0 -40 - - 0 - 13:19 ? 00:00:00 [mig] 1 S root 7 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kso] 5 S root 8 2 0 -40 - - 0 - 13:19 ? 00:00:00 [wat] 1 S root 9 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [eve] 1 S root 10 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [eve] 1 S root 11 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [khe] 1 S root 43 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kbl] 1 S root 44 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kbl] 1 S root 47 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kac] 1 S root 48 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kac] 1 S root 145 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kse] 1 S root 186 2 0 80 0 - 0 - 13:19 ? 00:00:00 [pdf] 1 S root 187 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [ksw] 1 S root 188 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [aio] 1 S root 189 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [aio] 1 S root 664 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [ksu] 1 S root 668 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [khu] 1 S root 738 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [ata] 1 S root 744 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [ata] 1 S root 748 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [ata] 1 S root 839 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [scs] 1 S root 840 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [scs] 1 S root 841 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [scs] 1 S root 842 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [scs] 1 S root 1023 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kjo] 5 S root 1117 1 0 76 -4 - 741 - 13:19 ? 00:00:00 udevd 1 S root 1690 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kmm] 1 S root 1792 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kps] 1 S root 1866 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [iwl] 1 S root 1867 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [iwl] 1 S root 2216 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [fir] 5 S daemon 2548 1 0 80 0 - 457 - 13:19 ? 00:00:00 /sbin 5 S statd 2561 1 0 80 0 - 473 - 13:19 ? 00:00:00 /sbin 1 S root 2799 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kon] 1 S root 2800 2 0 75 -5 - 0 - 13:19 ? 00:00:00 [kon] 1 S root 2873 1 0 80 0 - 439 - 13:19 ? 00:00:00 /sbin 5 S root 2882 1 0 80 0 - 427 - 13:19 ? 00:00:00 /sbin 1 S root 3018 1 0 80 0 - 559 - 13:19 ? 00:00:00 /usr/ 5 S 104 3027 1 0 80 0 - 662 - 13:19 ? 00:00:00 /usr/ 5 S www-data 3047 1 0 80 0 - 496 - 13:19 ? 00:00:00 /usr/ 5 S root 3088 1 0 80 0 - 1510 - 13:19 ? 00:00:00 /usr/ 5 S 101 3358 1 0 80 0 - 1505 - 13:19 ? 00:00:00 /usr/ 5 S root 3394 1 0 80 0 - 472 - 13:19 ? 00:00:00 /usr/ 5 S root 3468 1 0 80 0 - 1656 - 13:20 ? 00:00:00 /usr/ 5 S root 3470 1 0 80 0 - 2541 - 13:20 ? 00:00:00 /usr/ 5 S avahi 3488 1 0 80 0 - 689 - 13:20 ? 00:00:00 avahi 1 S avahi 3489 3488 0 80 0 - 689 - 13:20 ? 00:00:00 avahi 1 S root 3491 3470 0 80 0 - 2541 - 13:20 ? 00:00:00 /usr/ 5 S 107 3509 1 0 80 0 - 1442 - 13:20 ? 00:00:00 /usr/ 0 S root 3510 3509 0 80 0 - 836 - 13:20 ? 00:00:00 hald- 0 S root 3533 3510 0 80 0 - 855 - 13:20 ? 00:00:00 /usr/ 4 S 107 3534 3510 0 80 0 - 550 - 13:20 ? 00:00:00 hald- 0 S root 3535 3510 0 80 0 - 852 - 13:20 ? 00:00:00 hald- 0 S root 3542 3510 0 80 0 - 852 - 13:20 ? 00:00:01 hald- 5 S root 3555 1 0 80 0 - 811 - 13:20 ? 00:00:00 /usr/ 1 S root 3561 2 0 75 -5 - 0 - 13:20 ? 00:00:00 [bta] 1 S root 3562 2 0 75 -5 - 0 - 13:20 ? 00:00:00 [btd] 5 S root 3578 2 0 70 -10 - 0 - 13:20 ? 00:00:00 [krf] 1 S root 3591 1 0 80 0 - 3295 - 13:20 ? 00:00:00 /usr/ 5 S root 3596 3591 0 80 0 - 3411 - 13:20 ? 00:00:00 /usr/ 1 S root 3600 1 0 80 0 - 834 - 13:20 ? 00:00:00 /usr/ 0 S root 3601 3600 0 80 0 - 628 - 13:20 ? 00:00:00 dbus- 4 S root 3606 3596 1 80 0 - 5130 - 13:20 tty7 00:00:49 /usr/ 1 S daemon 3621 1 0 80 0 - 494 - 13:20 ? 00:00:00 /usr/ 1 S root 3643 1 0 80 0 - 845 - 13:20 ? 00:00:00 /usr/ 0 S root 3690 1 0 80 0 - 427 - 13:20 tty1 00:00:00 /sbin 0 S root 3691 1 0 80 0 - 427 - 13:20 tty2 00:00:00 /sbin 0 S root 3692 1 0 80 0 - 427 - 13:20 tty3 00:00:00 /sbin 0 S root 3693 1 0 80 0 - 427 - 13:20 tty4 00:00:00 /sbin 0 S root 3694 1 0 80 0 - 427 - 13:20 tty5 00:00:00 /sbin 0 S root 3695 1 0 80 0 - 427 - 13:20 tty6 00:00:00 /sbin 4 S arek 3716 3596 0 80 0 - 6763 stext 13:22 ? 00:00:00 x-ses 1 S arek 3762 3716 0 80 0 - 1126 - 13:22 ? 00:00:00 /usr/ 0 S arek 3764 1 0 80 0 - 1795 - 13:22 ? 00:00:00 /usr/ 1 S arek 3770 3716 0 80 0 - 5704 - 13:22 ? 00:00:00 /usr/ 1 S arek 3773 1 0 80 0 - 1557 - 13:22 ? 00:00:00 /usr/ 1 S arek 3775 1 0 80 0 - 662 - 13:22 ? 00:00:00 dbus- 0 S arek 3776 3716 0 80 0 - 10247 stext 13:22 ? 00:00:00 gnome 0 S arek 3785 3716 0 80 0 - 5400 - 13:22 ? 00:00:04 /usr/ 0 S arek 3786 3716 0 80 0 - 9271 - 13:22 ? 00:00:05 gnome 0 S arek 3788 3716 0 80 0 - 19735 - 13:22 ? 00:00:06 nauti 0 S arek 3795 1 0 80 0 - 8309 stext 13:22 ? 00:00:00 /usr/ 0 S arek 3797 3716 0 80 0 - 3755 - 13:22 ? 00:00:00 bluet 0 S arek 3799 3716 0 80 0 - 6581 - 13:22 ? 00:00:02 updat 0 S arek 3809 1 0 80 0 - 13894 stext 13:22 ? 00:00:00 /usr/ 0 S arek 3811 3716 0 80 0 - 8118 - 13:22 ? 00:00:01 gnome 1 S arek 3812 1 0 80 0 - 4974 - 13:22 ? 00:00:00 /usr/ 1 S arek 3831 1 0 80 0 - 6359 - 13:22 ? 00:00:00 gnome 1 S arek 3833 1 0 80 0 - 3977 - 13:22 ? 00:00:02 gnome 0 S arek 3859 1 0 80 0 - 725 - 13:22 ? 00:00:00 /usr/ 0 S arek 3861 1 0 80 0 - 9031 stext 13:22 ? 00:00:00 /usr/ 0 S arek 3894 1 0 80 0 - 3704 - 13:24 ? 00:00:00 /usr/ 1 S root 4403 2 0 80 0 - 0 - 13:27 ? 00:00:00 [pdf] 0 S arek 5338 1 0 80 0 - 42770 stext 13:30 ? 00:00:29 /usr/ 0 S arek 5364 1 0 80 0 - 5850 - 13:30 ? 00:00:00 /usr/ 5 S snmp 7287 1 0 80 0 - 2505 - 13:44 ? 00:00:00 /usr/ 4 S root 7747 1 0 80 0 - 3090 - 14:05 ? 00:00:00 perl 0 S arek 7775 1 0 80 0 - 17517 stext 14:06 ? 00:00:00 /usr/ 0 S arek 7779 1 0 80 0 - 8125 stext 14:06 ? 00:00:00 /usr/ 0 S arek 7786 1 0 80 0 - 17569 stext 14:06 ? 00:00:00 /usr/ 0 S arek 8285 1 0 80 0 - 3730 - 14:37 ? 00:00:00 gksu 4 S root 8290 8285 0 80 0 - 970 - 14:37 pts/0 00:00:00 /bin/ 0 S root 8292 8290 0 80 0 - 667 - 14:37 pts/0 00:00:00 /usr/ 0 S root 8299 8292 4 80 0 - 9955 stext 14:37 pts/0 00:00:00 gnome 0 S root 8301 1 2 80 0 - 1771 - 14:37 pts/0 00:00:00 /usr/ 0 S root 8303 1 1 80 0 - 6227 stext 14:37 ? 00:00:00 /usr/ 4 S root 8307 8299 0 80 0 - 725 - 14:37 pts/0 00:00:00 gnome 0 S root 8308 8299 0 80 0 - 1042 - 14:37 pts/1 00:00:00 bash 4 R root 8311 8308 0 80 0 - 913 - 14:37 pts/1 00:00:00 ps -A
Offline
trudno powiedziec ... bo nawazniejsza kolumne Ci obcielo - zastap to wynikiem ps -Af to powiemy ..
Offline
No wiec nie ma chyba tego MRTG:
Debian:/home/arek# ps -Af UID PID PPID C STIME TTY TIME CMD root 1 0 0 12:44 ? 00:00:01 init [2] root 2 0 0 12:44 ? 00:00:00 [kthreadd] root 3 2 0 12:44 ? 00:00:00 [migration/0] root 4 2 0 12:44 ? 00:00:00 [ksoftirqd/0] root 5 2 0 12:44 ? 00:00:00 [watchdog/0] root 6 2 0 12:44 ? 00:00:00 [migration/1] root 7 2 0 12:44 ? 00:00:00 [ksoftirqd/1] root 8 2 0 12:44 ? 00:00:00 [watchdog/1] root 9 2 0 12:44 ? 00:00:00 [events/0] root 10 2 0 12:44 ? 00:00:00 [events/1] root 11 2 0 12:44 ? 00:00:00 [khelper] root 43 2 0 12:44 ? 00:00:00 [kblockd/0] root 44 2 0 12:44 ? 00:00:00 [kblockd/1] root 47 2 0 12:44 ? 00:00:00 [kacpid] root 48 2 0 12:44 ? 00:00:00 [kacpi_notify] root 145 2 0 12:44 ? 00:00:00 [kseriod] root 185 2 0 12:44 ? 00:00:00 [pdflush] root 186 2 0 12:44 ? 00:00:00 [pdflush] root 187 2 0 12:44 ? 00:00:00 [kswapd0] root 188 2 0 12:44 ? 00:00:00 [aio/0] root 189 2 0 12:44 ? 00:00:00 [aio/1] root 672 2 0 12:44 ? 00:00:00 [ksuspend_usbd] root 681 2 0 12:44 ? 00:00:00 [khubd] root 690 2 0 12:44 ? 00:00:00 [ata/0] root 693 2 0 12:44 ? 00:00:00 [ata/1] root 697 2 0 12:44 ? 00:00:00 [ata_aux] root 761 2 0 12:44 ? 00:00:00 [scsi_eh_0] root 762 2 0 12:44 ? 00:00:00 [scsi_eh_1] root 763 2 0 12:44 ? 00:00:00 [scsi_eh_2] root 764 2 0 12:44 ? 00:00:00 [scsi_eh_3] root 997 2 0 12:45 ? 00:00:00 [kjournald] root 1091 1 0 12:45 ? 00:00:00 udevd --daemon root 1634 2 0 12:45 ? 00:00:00 [kmmcd] root 1675 2 0 12:45 ? 00:00:00 [iwl3945/0] root 1678 2 0 12:45 ? 00:00:00 [iwl3945/1] root 1728 2 0 12:45 ? 00:00:00 [kpsmoused] root 2181 2 0 12:45 ? 00:00:00 [firewire_sbp2] daemon 2521 1 0 12:45 ? 00:00:00 /sbin/portmap statd 2532 1 0 12:45 ? 00:00:00 /sbin/rpc.statd root 2770 2 0 12:45 ? 00:00:00 [kondemand/0] root 2771 2 0 12:45 ? 00:00:00 [kondemand/1] root 2844 1 0 12:45 ? 00:00:00 /sbin/syslogd root 2853 1 0 12:45 ? 00:00:00 /sbin/klogd -x root 2989 1 0 12:45 ? 00:00:00 /usr/sbin/acpid -c /etc/acpi/eve 104 2998 1 0 12:45 ? 00:00:00 /usr/bin/dbus-daemon --system www-data 3018 1 0 12:45 ? 00:00:00 /usr/sbin/boa root 3059 1 0 12:45 ? 00:00:00 /usr/sbin/cupsd 101 3329 1 0 12:45 ? 00:00:00 /usr/sbin/exim4 -bd -q30m root 3365 1 0 12:45 ? 00:00:00 /usr/sbin/inetd root 3439 1 0 12:45 ? 00:00:00 /usr/sbin/nmbd -D root 3441 1 0 12:45 ? 00:00:00 /usr/sbin/smbd -D snmp 3450 1 0 12:45 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/nu root 3461 3441 0 12:45 ? 00:00:00 /usr/sbin/smbd -D avahi 3465 1 0 12:45 ? 00:00:00 avahi-daemon: running [Debian.lo avahi 3466 3465 0 12:45 ? 00:00:00 avahi-daemon: chroot helper 107 3484 1 0 12:45 ? 00:00:00 /usr/sbin/hald root 3485 3484 0 12:45 ? 00:00:00 hald-runner root 3510 3485 0 12:45 ? 00:00:00 /usr/lib/hal/hald-addon-cpufreq 107 3511 3485 0 12:45 ? 00:00:00 hald-addon-acpi: listening on ac root 3512 3485 0 12:45 ? 00:00:00 hald-addon-input: Listening on / root 3519 3485 0 12:45 ? 00:00:00 hald-addon-storage: polling /dev root 3532 1 0 12:45 ? 00:00:00 /usr/sbin/hcid -x -s root 3538 2 0 12:45 ? 00:00:00 [btaddconn] root 3539 2 0 12:45 ? 00:00:00 [btdelconn] root 3555 2 0 12:45 ? 00:00:00 [krfcommd] root 3568 1 0 12:45 ? 00:00:00 /usr/sbin/gdm root 3573 3568 0 12:45 ? 00:00:00 /usr/sbin/gdm root 3577 1 0 12:45 ? 00:00:00 /usr/bin/system-tools-backends root 3578 3577 0 12:45 ? 00:00:00 dbus-daemon --session --print-ad root 3584 3573 2 12:45 tty7 00:00:04 /usr/bin/X :0 -audit 0 -auth /va root 3591 1 0 12:45 ? 00:00:00 /usr/sbin/anacron -s daemon 3599 1 0 12:45 ? 00:00:00 /usr/sbin/atd root 3622 1 0 12:45 ? 00:00:00 /usr/sbin/cron root 3677 1 0 12:45 tty1 00:00:00 /sbin/getty 38400 tty1 root 3678 1 0 12:45 tty2 00:00:00 /sbin/getty 38400 tty2 root 3679 1 0 12:45 tty3 00:00:00 /sbin/getty 38400 tty3 root 3680 1 0 12:45 tty4 00:00:00 /sbin/getty 38400 tty4 root 3681 1 0 12:45 tty5 00:00:00 /sbin/getty 38400 tty5 root 3682 1 0 12:45 tty6 00:00:00 /sbin/getty 38400 tty6 arek 3704 3573 0 12:45 ? 00:00:00 x-session-manager arek 3750 3704 0 12:45 ? 00:00:00 /usr/bin/ssh-agent /usr/bin/seah arek 3752 1 0 12:45 ? 00:00:00 /usr/lib/libgconf2-4/gconfd-2 13 arek 3758 3704 0 12:45 ? 00:00:00 /usr/bin/seahorse-agent --execut arek 3761 1 0 12:45 ? 00:00:00 /usr/bin/gnome-keyring-daemon arek 3763 1 0 12:45 ? 00:00:00 dbus-daemon --fork --print-addre arek 3764 3704 0 12:45 ? 00:00:00 gnome-settings-daemon arek 3773 3704 0 12:45 ? 00:00:00 /usr/bin/metacity --sm-client-id arek 3774 3704 0 12:45 ? 00:00:01 gnome-panel --sm-client-id defau arek 3776 3704 0 12:45 ? 00:00:01 nautilus --no-default-window --s arek 3783 1 0 12:45 ? 00:00:00 /usr/lib/bonobo-activation/bonob arek 3785 3704 0 12:46 ? 00:00:00 bluetooth-applet --singleton arek 3788 3704 0 12:46 ? 00:00:00 update-notifier arek 3792 1 0 12:46 ? 00:00:00 /usr/lib/gnome-vfs-2.0/gnome-vfs arek 3797 3704 0 12:46 ? 00:00:00 gnome-cups-icon --sm-client-id d arek 3799 1 0 12:46 ? 00:00:00 /usr/lib/gnome-volume-manager/gn arek 3812 1 0 12:46 ? 00:00:00 gnome-power-manager arek 3821 1 0 12:46 ? 00:00:00 gnome-screensaver arek 3850 1 0 12:46 ? 00:00:00 /usr/lib/nautilus-cd-burner/mapp arek 3860 1 0 12:46 ? 00:00:00 /usr/lib/gnome-applets/mixer_app arek 3876 1 0 12:46 ? 00:00:00 /usr/bin/gnome-keyring-daemon -- root 3890 1 0 12:46 ? 00:00:00 /usr/lib/bonobo-activation/bonob arek 3933 1 0 12:47 ? 00:00:00 gksu /usr/bin/x-terminal-emulato root 3938 3933 0 12:47 pts/0 00:00:00 /bin/su root -c /usr/lib/libgksu root 3940 3938 0 12:47 pts/0 00:00:00 /usr/lib/libgksu/gksu-run-helper root 3947 3940 0 12:47 pts/0 00:00:00 gnome-terminal root 3949 1 0 12:47 pts/0 00:00:00 /usr/lib/libgconf2-4/gconfd-2 17 root 3952 3947 0 12:47 pts/0 00:00:00 gnome-pty-helper root 3953 3947 0 12:47 pts/1 00:00:00 bash arek 3956 1 11 12:47 ? 00:00:08 /usr/lib/iceweasel/firefox-bin - root 3995 3953 0 12:48 pts/1 00:00:00 ps -Af
Offline
mrtg żeby działało trzeba uruchamiac z crona co jakis odstep czasu.
U mnie wygląda to tak
divinity% cat /etc/crontab | grep mrtg */5 * * * * root env LANG=C /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
Owszem mozna próbować uruchamiać go jako demona, ale po co :P. Tak przyjamniej dostane ładnego maila jesli powstanie jakis error.
Offline
No dobrze, ale chciałbym to poustawiać zainstalowałem MRTG z repo i nigdzie go nie ma nie wiem jak to ustawi, może ktoś mnie nakieruje ??
po wpisaniu :
Debian:/home/arek# apt-cache show mrtg Package: mrtg Priority: extra Section: net Installed-Size: 1080 Maintainer: Adam Majer <adamm@zombino.com> Architecture: i386 Version: 2.16.1-2 Depends: debconf (>= 1.2.0) | debconf-2.0, libsnmp-session-perl (>= 0.97), perl-modules (>= 5.6.0), perl (>= 5.6.0-16), libc6 (>= 2.7-1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libpng12-0 (>= 1.2.13-4), zlib1g (>= 1:1.1.4) Suggests: mrtg-contrib, httpd | www-browser Filename: pool/main/m/mrtg/mrtg_2.16.1-2_i386.deb Size: 437874 MD5sum: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SHA1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SHA256: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Description: multi router traffic grapher The Multi Router Traffic Grapher is a tool primarily used to monitor the traffic load on network links (typically by using SNMP). MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic. MRTG typically produces daily, weekly, monthly, and yearly graphs. . In addition to monitoring via SNMP, MRTG can also generate graphs based on the output of any application, allowing one to generate graphs of anything that needs monitoring (for example, CPU and memory usage, email volumes, web hits, etc). For faster data collection, MRTG can also interface to RRDtool. For more information, see http://oss.oetiker.ch/mrtg . The mrtg-contrib package contains the contributed scripts and configuration files that used to form part of the mrtg package. Tag: admin::monitoring, interface::commandline, network::routing, protocol::snmp, role::program, scope::utility, use::monitor, works-with::image, works-with::image:raster, works-with-format::png
W systemie widzę plik konfiguracyjny MRTG (/etc/mrtg.conf) i wygląda on tak:
###################################################################### # Multi Router Traffic Grapher -- Sample Configuration File ###################################################################### # This file is for use with mrtg-2.5.4c # Global configuration WorkDir: /var/www/mrtg WriteExpires: Yes Title[^]: Traffic Analysis for # 128K leased line # ---------------- #Title[leased]: a 128K leased line #PageTop[leased]: <H1>Our 128K link to the outside world</H1> #Target[leased]: 1:public@router.localnet #MaxBytes[leased]: 16000
Proszę o pomoc.
Pozdrawiam
Offline
Najpierw musisz poprawnie skonfigurowac w swoim systemie snmp
Ostatnio edytowany przez divinity (2008-06-02 15:08:39)
Offline
Po co konfigurowac snmp jak statysytki zierasz z loklanej maszyny nie lepiej napsiac kilka skryptow bashowych do wyjmowania informacji zamias obciazac system dodatkkowoa usluga?
Offline
Proszę Państwa - jakkolwiek czy za pomocą mrtg czy skryptów chciałby mieć wizualizację obciążenia na 3 interfejsach w moim Debianku. Czy jest ktoś mi w stanie pomóc ??.
Pozdrawiam
Offline
Odgrzebalam gdzies jakiegos archiwalnego mrtg (nie lubie mrtg ale od tego sie zaczynalo :] )a wiec
zawartosc [b]/etc/mrtg.cfg[/b]
WriteExpires: Yes HtmlDir: /var/www/staty ImageDir: /var/www/staty LogDir: /var/www/staty Forks: 4 NoMib2: Yes SingleRequest: Yes Language: polish Title[eth0]: Traffic Analiser BodyTag[eth0]: <body bgcolor="#a9bdc2"> PageTop[eth0]: <h1>Bajty zapierdalajace po eth0</h1> Target[eth0]: `/root/skrypty/nettraffic eth0` MaxBytes[eth0]: 1250000 Options[eth0]: growright, transparent, nobanner, noarrow, integer #Options[eth0]: gauge, growright,transparent, nobanner, noarrow, integer WithPeak[eth0]: wmy YLegend[eth0]: Bajty / Sekundy Title[eth1]: Traffic Analiser BodyTag[eth1]: <body bgcolor="#a9bdc2"> PageTop[eth1]: <h1>Bajty zapierdalajace po eth1</h1> Target[eth1]: `/root/skrypty/nettraffic eth1` MaxBytes[eth1]: 1250000 Options[eth1]: growright, transparent, nobanner, noarrow, integer #Options[eth1]: gauge, growright,transparent, nobanner, noarrow, integer WithPeak[eth1]: wmy YLegend[eth1]: Bajty / Sekundy Title[eth2]: Traffic Analiser BodyTag[eth2]: <body bgcolor="#a9bdc2"> PageTop[eth2]: <h1>Bajty zapierdalajace po eth2</h1> Target[eth2]: `/root/skrypty/nettraffic eth2` MaxBytes[eth2]: 1250000 Options[eth2]: growright, transparent, nobanner, noarrow, integer #Options[eth2]: gauge, growright,transparent, nobanner, noarrow, integer WithPeak[eth2]: wmy YLegend[eth2]: Bajty / Sekundy
gdzie:
HtmlDir: /var/www/staty ImageDir: /var/www/staty LogDir: /var/www/staty
katalogi w ktorych przechowywane sa pliki html obrazki i logi
w
Target[eth0]: `[b]/root/skrypty/nettraffic eth0[/b]`
jest wywolywany skrypt [b] /root/skrypty/nettraffic [/b] z parametrem interfejsu ktorego maja sie tyczyc statystyki
zawartosc skryptu [b]/root/skrypty/nettraffic[/b]
#!/bin/sh LINE=`cat /proc/net/dev | grep -w $1` echo $LINE | awk '{print $1" "$2}' | awk -F: '{print $2}' | awk '{print $1}' echo $LINE | awk -F: '{print $2}' | awk '{print $9}' echo `uptime` echo `hostname -f`
aby z palca sprawdzic czy dziala okwydjemy polecenie
mrtg /etc/mrtg.cfg
na samym poczatku beda sie pojawiac worningi dotyczace plikow loga
ale po 3 wywolaniach powinno ich juz niebyc
aby statystyki generowaly sie automatycznie nalerzy sprawdzic czy w systemie jest uruchomiona usluga cron i sprawdzic czy w [b]/etc/cron.d/[/b] ejst plik [b]mrtg[/b]
Offline
@BiExi dziękuję, postaram się tak zrobić jak to opisałaś.
Pozdrawiam.
Offline
Po wykonaniu krok po kroku posta Biexi wyskakuje mi cos takiego ( musze niestety tak wywoływać bo mam ustawione w systemie UTF i mi sie MRTG pluje):
Debian:/home/arek# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg Can't exec "/root/skrypty/nettraffic": Permission denied at /usr/bin/mrtg line 2035. 2008-06-04 00:51:10: WARNING: Running '/root/skrypty/nettraffic eth0': Permission denied 2008-06-04 00:51:10: WARNING: Could not get any data from external command '/root/skrypty/nettraffic eth0' Maybe the external command did not even start. (Permission denied) 2008-06-04 00:51:10: WARNING: Problem with External get '/root/skrypty/nettraffic eth0': Expected a Number for 'in' but nothing' 2008-06-04 00:51:10: WARNING: Problem with External get '/root/skrypty/nettraffic eth0': Expected a Number for 'out' but nothing' Can't exec "/root/skrypty/nettraffic": Permission denied at /usr/bin/mrtg line 2035. Can't exec "/root/skrypty/nettraffic": Permission denied at /usr/bin/mrtg line 2035. 2008-06-04 00:51:10: WARNING: Running '/root/skrypty/nettraffic eth1': Permission denied 2008-06-04 00:51:10: WARNING: Could not get any data from external command '/root/skrypty/nettraffic eth1' Maybe the external command did not even start. (Permission denied) 2008-06-04 00:51:10: WARNING: Problem with External get '/root/skrypty/nettraffic eth1': Expected a Number for 'in' but nothing' 2008-06-04 00:51:10: WARNING: Problem with External get '/root/skrypty/nettraffic eth1': Expected a Number for 'out' but nothing' 2008-06-04 00:51:10: WARNING: Running '/root/skrypty/nettraffic eth2': Permission denied 2008-06-04 00:51:10: WARNING: Could not get any data from external command '/root/skrypty/nettraffic eth2' Maybe the external command did not even start. (Permission denied) 2008-06-04 00:51:10: WARNING: Problem with External get '/root/skrypty/nettraffic eth2': Expected a Number for 'in' but nothing' 2008-06-04 00:51:10: WARNING: Problem with External get '/root/skrypty/nettraffic eth2': Expected a Number for 'out' but nothing' 2008-06-04 00:51:10: ERROR: Target[eth0][_IN_] ' $target->[0]{$mode} ' did not eval into defined data 2008-06-04 00:51:10: ERROR: Target[eth0][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data 2008-06-04 00:51:10: ERROR: Target[eth1][_IN_] ' $target->[1]{$mode} ' did not eval into defined data 2008-06-04 00:51:10: ERROR: Target[eth1][_OUT_] ' $target->[1]{$mode} ' did not eval into defined data 2008-06-04 00:51:10: ERROR: Target[eth2][_IN_] ' $target->[2]{$mode} ' did not eval into defined data 2008-06-04 00:51:10: ERROR: Target[eth2][_OUT_] ' $target->[2]{$mode} ' did not eval into defined data Debian:/home/arek#
Offline
Wyglada na to że trzeba nadac uprawnienia wykonywania dla pliku /root/skrypty/nettraffic
root% chmod +x /root/skrypty/nettraffic
Offline
Witam.
Zmieniłem uprawnienia !!.
Niemniej jednak po zmianie uprawnienień do pliku wygląda to tak:
Debian:/home/arek# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg Debian:/home/arek#
I nic więcej się nie dzieję, nic nie widać - nie ma statystyk :(.
Offline
Time (s) | Query |
---|---|
0.00015 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00092 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.139.83.248' WHERE u.id=1 |
0.00081 | UPDATE punbb_online SET logged=1732447747 WHERE ident='3.139.83.248' |
0.00051 | SELECT * FROM punbb_online WHERE logged<1732447447 |
0.00089 | DELETE FROM punbb_online WHERE ident='18.223.125.236' |
0.00043 | SELECT topic_id FROM punbb_posts WHERE id=91831 |
0.00008 | SELECT id FROM punbb_posts WHERE topic_id=11546 ORDER BY posted |
0.00055 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=11546 AND t.moved_to IS NULL |
0.00005 | SELECT search_for, replace_with FROM punbb_censoring |
0.00249 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=11546 ORDER BY p.id LIMIT 0,25 |
0.00084 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=11546 |
Total query time: 0.00776 s |