Sziasztok!
A szablinux-on talalhato mrtg hogyan alapjan beuzemeltem egy tesztgeoen, ott rendben lefut.
Felraktam egy masik gepre, es ezen ha elinditom az alabbi uzeneteket adja:
/usr/bin/mrtg /etc/mrtg.cfg
ERROR: Target[localhost.cpu][_IN_] ' $target->[1]{$mode} ' evaluated to 'NaN' instead of a number
ERROR: Target[localhost.cpu][_OUT_] ' $target->[1]{$mode} ' evaluated to 'NaN' instead of a number
ERROR: Target[localhost.mem][_IN_] ' $target->[2]{$mode} ' evaluated to 'NaN' instead of a number
ERROR: Target[localhost.mem][_OUT_] ' $target->[2]{$mode} ' evaluated to 'NaN' instead of a number
A neten nem igazan sikerult kihamoznom a problemat.
/etc/mrtg
Target[localhost.mem]: `/mem.sh`
MaxBytes[localhost.mem]: 100
Options[localhost.mem]: gauge, nopercent
Unscaled[localhost.mem]: dwym
YLegend[localhost.mem]: % of MEMORY used
ShortLegend[localhost.mem]: %
LegendO[localhost.mem]: SWAP:
LegendI[localhost.mem]: MEMORY:
Title[localhost.mem]: MEM usage
PageTop[localhost.mem]: MEM usage Mem:128MB Swap:256MB
..
/a script/
#!/bin/bash
a1=`sar -r 1 10 | grep Average | tr -s ' ' ' '`
echo $a1 | cut -d" " -f4
echo $a1 | cut -d" " -f9
uptime | tr -s " " " " | cut -d" " -f4
echo "gepnev"
- 1327 megtekintés
Hozzászólások
Nos semmi?? JumboJet??
Az otthoni gepen csont nelkul mukxik.
- A hozzászóláshoz be kell jelentkezni
#!/bin/sh
USED=`free -b|grep cache:|cut -d ":" -f2|cut -c1-11`
FREE=`free -b|grep cache:|cut -d ":" -f2|cut -c12-22`
echo $FREE
echo $USED
En igy hasznalom.
- A hozzászóláshoz be kell jelentkezni