From: Сергей <fisher74@list.ru> To: Saratov Linux User Group Maillist <sarlug@lists.lug.ru> Subject: [Sarlug] mrtg и скрипт Date: Mon, 28 Jun 2010 21:15:44 +0400 Message-ID: <E1OTHvs-0007ID-00.fisher74-list-ru@f118.mail.ru> (raw) Решил поизучать mrtg. С snmp вроде как всё понятно, а вот со скриптами - беда. В качестве примера и в связи с жарой, решил построить график температуры жёстких на домашнем сервере. Вот что получилось: fisher@ant-server:~$ sudo cat /etc/mrtg.cfg | grep sdx Title[sdx]: HDD temperature Target[sdx]: `/etc/mrtg/hddtemp.sh sdx` PageTop[sdx]: <H1>HDD Temperature C</H1> PNGTitle[sdx]: HDD temperature MaxBytes[sdx]: 100 AbsMax[sdx]: 100 Options[sdx]: growright,noinfo,pngdate YLegend[sdx]: C WithPeak[sdx]: ymwd LegendI[sdx]: sda: LegendO[sdx]: sdb: fisher@ant-server:~$ sudo cat /etc/mrtg/hddtemp.sh #!/bin/sh /usr/sbin/hddtemp -n /dev/sda /usr/sbin/hddtemp -n /dev/sdb /usr/bin/uptime | awk '{print $3 $4 $5}' echo $1 fisher@ant-server:~$ sudo /etc/mrtg/hddtemp.sh sdx 49 51 42days,10:07, sdx fisher@ant-server:~$ sudo env LANG=C /usr/bin/mrtg --debug=base /etc/mrtg.cfg --base: Creating Lockfiles /var/lock/mrtg/_etc_mrtg.cfg_l,/var/lock/mrtg/_etc_mrtg.cfg_l_6573 --base: Reading Config File: /etc/mrtg.cfg --base: Reading Interface Config cache --base: Checking Config File --base: Loading Locale for russian --base: Starting main Loop --base: Populate Target object by polling SNMP and external Datasources --base: Act on Router/Target sdx --base: Get Current values: in:49, out:50, up:42days,10:22,, name:sdx, time:1277744462 --base: Create Graphics --base: Check for Thresholds --base: Check for Write HTML Pages --base: Exit main Loop --base: Remove Lock Files --base: Store Interface Config Cache А график нулевой. Где проблема?
next reply other threads:[~2010-06-28 17:15 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-28 17:15 Сергей [this message] 2010-06-28 17:23 ` Paul Komkoff 2010-06-28 17:36 ` Dmitry Agafonov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=E1OTHvs-0007ID-00.fisher74-list-ru@f118.mail.ru \ --to=fisher74@list.ru \ --cc=sarlug@lists.lug.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Saratov Linux User Group This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sarlug/0 sarlug/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sarlug sarlug/ http://lore.altlinux.org/sarlug \ sarlug@lists.lug.ru sarlug@lug.ru public-inbox-index sarlug Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sarlug AGPL code for this site: git clone https://public-inbox.org/public-inbox.git