Results 1 to 4 of 4

Thread: config MRTG in fedora core 2

  1. #1
    Newbie
    Join Date
    Mar 2005
    Location
    vn
    Posts
    3

    config MRTG in fedora core 2

    Hi to all
    I am having problem with MRTG cfgmaker scrip.
    I want to make mrtg.cfg flie to monitor CPU in my PC
    I have used cfgmaker scrip :
    cfgmaker --output=/etc/mrtg/server.cfg \ -ifref=ip --global "workdir: /var/www/server" \
    --global 'options[_]: growright,bits' \ --snmp-options=:::::2 public@192.168.0.20

    to make server.cfg file in /etc/mrtg
    192.168.0.20 is my ip address in LAN
    Then, I edit server.cfg flie:
    ###############################
    LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt
    workdir: /var/www/server/
    RunAsDaemon:Yes
    Interval:5
    Options[_]: nopercent,growright,noinfo,gauge
    MaxBytes[_]: 125000000
    #############################

    Target[cpu]:ssCpuRawUser.0&ssCpuRawUser.0ublic@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0ublic@localhost + ssCpuRawNice.0&ssCpuRawNice.0ublic@localhost
    Title[cpu]: Server CPU Load

    PageTop[cpu]: <H1>CPU Load - System, User and Nice Processes</H1>
    MaxBytes[cpu]: 100
    ShortLegend[cpu]: %
    YLegend[cpu]: CPU Utilization
    Legend1[cpu]: Current CPU percentage load
    LegendI[cpu]: Used
    LegendO[cpu]:
    Options[cpu]: growright,nopercent
    Unscaled[cpu]: ymwd
    ###################################

    After, I run: env LANG=C /usr/bin/mrtg /etc/mrtg/server.cfg
    but there is nothink in /var/www/serser directery

    please tell me the way to edit server.cfg file

    thanks!

  2. #2
    Senior Member
    Join Date
    May 2004
    Location
    Pakistan
    Posts
    253

    Re:

    Dear huynxbk45,
    Hello,

    Code:
    ###############################################################################
    # Multi Router Traffic Grapher -- Configuration File
    ###############################################################################
    
    WorkDir&#58; /var/www/server
    RunAsDaemon&#58;Yes
    Interval&#58;5
    Options&#91;_&#93;&#58; nopercent,growright,noinfo,gauge
    MaxBytes&#91;_&#93;&#58; 125000000
    
    #----------------------------
    # CPU
    #----------------------------
    Target&#91;cpu&#93;&#58; `/usr/bin/awk '/cpu /&#123;print $2+$3; print $2+$3+$4; print "quite some time"&#125;'</proc/stat`
    Title&#91;cpu&#93;&#58; CPU usage for server
    PageTop&#91;cpu&#93;&#58; <H1>CPU Usage</H1>
    MaxBytes&#91;cpu&#93;&#58; 100
    Options&#91;cpu&#93;&#58; nopercent,growright,noinfo,bits
    LegendI&#91;cpu&#93;&#58; user&#58;
    LegendO&#91;cpu&#93;&#58; total&#58;
    Ylegend&#91;cpu&#93;&#58; %CPU
    ShortLegend&#91;cpu&#93;&#58; %CPU
    Legend1&#91;cpu&#93;&#58; Time spent in user mode
    Legend2&#91;cpu&#93;&#58; Time spent in user mode + time spent in system mode
    Legend3&#91;cpu&#93;&#58; Maximum occurance of time spent in user mode
    Legend4&#91;cpu&#93;&#58; Maximum occurance of &#40;time spent in user mode + time spent in system mode&#41;
    Type following commands.

    # export LANG=C
    # /usr/bin/perl /usr/bin/mrtg /etc/mrtg/server.cfg


    Best Regards.
    Frrkh hmd

  3. #3
    Newbie
    Join Date
    Mar 2005
    Location
    vn
    Posts
    3
    thanks LinuxFreak very much.

    Can you help me once more time
    i have done server.cfg file same your code, then I run.
    I received some error:

    ERROR: Target[cpu][_OUT_] ' $target->[0]{$mode} + $target->[1]{$mode} + $target->[2]{$mode} ' (warn): Use of uninitialized value in addition (+) at (eval 11) line 1

    WARNING: Skipping Update of cpu, inlast is not defined

    I don't understand this error, can you telll me the way to repair it
    A,
    I want to view CPU usage on web, I have installed apache.
    I used indexmaker command to maked index file:
    indexmaker --output=/var/www/server/index.html \ /etc/mrtg/server.cfg

    but index.html file is very simple and have no emage.
    please tell me the detail to do that
    thanks!

  4. #4
    Senior Member
    Join Date
    May 2004
    Location
    Pakistan
    Posts
    253

    Re:

    Dear huynxbk45,
    Hello,

    Ignore this error because when you run Mrtg 1st time it will always give you these type of errors. I suggest you to restart Mrtg two to three times.

    Best Regards.
    Frrkh hmd

Similar Threads

  1. Fedora Core 10
    By kupertini in forum Redhat / Fedora
    Replies: 1
    Last Post: 10-16-2008, 01:30 AM
  2. Fedora Core 5-T1 DVD
    By GhostDawg in forum Linux - General Topics
    Replies: 2
    Last Post: 11-29-2005, 02:31 PM
  3. Fedora Core 4 Available
    By trickster in forum General Chat
    Replies: 14
    Last Post: 09-27-2005, 05:24 AM
  4. uisng mib in mrtg config
    By argie01 in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 06-02-2005, 11:46 PM
  5. MRTG cfgmaker script problem with Fedora
    By cheezetrix in forum Programming
    Replies: 1
    Last Post: 05-13-2004, 06:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •