Done most myself, just having a bit of trouble with the free drive space ones wondered if I could pinch yours?
http://www.cheesyboofs.co.uk/mrtg-nas/
MRTG Config Files
-
- Power user
- Posts: 239
- Joined: Wed Jan 26, 2005 1:32 pm
- Location: Luton UK
- Contact:
MRTG Config Files
Go fully native, it's the destiny of all Mk1 Xboxes
The needs of the many out way the needs of the few or the one ...
The needs of the many out way the needs of the few or the one ...
mrtg.conf:
/bin/mrtg-disk:
Code: Select all
Title[hda2]: /dev/hda2 Disk Usage
Target[hda2]: `sh /bin/mrtg-disk hda2`
PageTop[hda2]: <h1>/dev/hda2 Disk Usage</h1>
MaxBytes[hda2]: 10079453184
Unscaled[hda2]: dwmy
YLegend[hda2]: Bytes
LegendI[hda2]: Used
LegendO[hda2]: Free
Options[hda2]: gauge growright noinfo nobanner
ShortLegend[hda2]: Bytes
Legend1[hda2]: Used
Legend2[hda2]: Free
Code: Select all
#!/bin/bash
case "$1" in
hda2)
echo `df | grep /dev/hda2 | awk '{ print $3 }'` "* 1024" | bc
echo `df | grep /dev/hda2 | awk '{ print $4 }'` "* 1024" | bc
;;
esac
Last edited by ShALLaX on Tue Sep 26, 2006 12:28 pm, edited 1 time in total.
The original Xbox adaptation of Gentoo
-
- Power user
- Posts: 239
- Joined: Wed Jan 26, 2005 1:32 pm
- Location: Luton UK
- Contact:
Go fully native, it's the destiny of all Mk1 Xboxes
The needs of the many out way the needs of the few or the one ...
The needs of the many out way the needs of the few or the one ...
-
- Power user
- Posts: 239
- Joined: Wed Jan 26, 2005 1:32 pm
- Location: Luton UK
- Contact:
Wonder if you can help? I'm getting this error when I run the script.
services / # cat /bin/mrtg-disk
Regards
services / # cat etc/mrtg/hda2-free.cfgservices / # ./usr/bin/mrtg etc/mrtg/hda2-free.cfg
/bin/mrtg-disk: line 9: syntax error: unexpected end of file
WARNING: Could not get any data from external command 'sh /bin/mrtg-disk hda2'
Maybe the external command did not even start. (Illegal seek)
WARNING: Problem with External get 'sh /bin/mrtg-disk hda2':
Expected a Number for 'in' but nothing'
WARNING: Problem with External get 'sh /bin/mrtg-disk hda2':
Expected a Number for 'out' but nothing'
ERROR: Target[hda2][_IN_] ' $target->[0]{$mode} ' did not eval into defined data
ERROR: Target[hda2][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data
Code: Select all
WorkDir: /var/www/localhost/htdocs/mrtg
Title[hda2]: /dev/hda2 Disk Usage
Target[hda2]: `sh /bin/mrtg-disk hda2`
PageTop[hda2]: <h1>/dev/hda2 Disk Usage</h1>
MaxBytes[hda2]: 10079453184
Unscaled[hda2]: dwmy
YLegend[hda2]: Bytes
LegendI[hda2]: Used
LegendO[hda2]: Free
Options[hda2]: gauge growright noinfo nobanner
ShortLegend[hda2]: Bytes
Legend1[hda2]: Used
Legend2[hda2]: Free
Code: Select all
#!/bin/bash
case "$1" in
hda2)
echo `df | grep /dev/hda2 | awk '{ print $3 }'` "* 1024" | bc
echo `df | grep /dev/hda2 | awk '{ print $4 }'` "* 1024" | bc
;;
services / #
Go fully native, it's the destiny of all Mk1 Xboxes
The needs of the many out way the needs of the few or the one ...
The needs of the many out way the needs of the few or the one ...
Nice catch...
Sorry! Original post updated.
Code: Select all
echo "esac" >> /bin/mrtg-disk
The original Xbox adaptation of Gentoo