Cpu and memory utilisation graphs



  • 1. Is it possible to have graphs showing cpu and memory utilisation, similar to the existing RRD graphs for the interfaces?
    2. Is it possible to have a page where we can choose which graphs to display and have them displayed on a single page? What I mean is that, it would be useful to have, for example,  graphs of bandwidth, cpu and memory utilisation on the same page.



  • Anything is possible.  You have the source code.



  • Are there any files concerned apart from status_rrd_graph.php?
    Anything else I should know?

    What do I need to know to retrieve/store the cpu and memory utilisation values and eventually plot them on a graph?



  • OK. I've found the files (/usr/local/www) from which I can get enough help to start working on this.
    Will post back to let you know.



  • root crontab does not seem to contain anything regarding the automatic updates of the values.
    I found the file /var/db/rrd/updaterrd.sh which does the interface updates when run, but is it being called from another program?
    I want to know how pfSense is automatically updating the RRD values. Any help here?



  • You have to write the code.  There are no magic hooks waiting for you to complete this task.



  • That's what I'm trying to do. I've already started writing some code using the pfSense source code.
    I have MRTG running on a server at work (on Linux) and I've scheduled the updates using cron.
    I thought the current RRD graphs were being updated in a similar fashion in pfSense.
    That's why I checked /etc/crontab.

    I'm new to FreeBSD. Can you just tell me how the automatic update is being done in pfSense, since it does not seem to be running from cron?



  • Take a look at /etc/inc/pfsense-utils.inc

    In paticular:

    enable_rrd_graphing()



  • @sullrich:

    Take a look at /etc/inc/pfsense-utils.inc

    In paticular:

    enable_rrd_graphing()

    Thank you sullrich for the tip.

    I am using pfsense in a very pequliar way, you can find in :
    http://forum.pfsense.org/index.php/topic,772.msg4635.html#msg4635

    Since my original post, the ethernet card of the LAN interface, totally useless to my wireless community application, gave it's seat on the PCI bus to a 3rd wireless card, shrinking to a vlan opt that serves nothing.

    This, as an update.

    The important thing is that by looking at your mentioned file, I now have quality rrd graphing on one of my wireless links.

    My coding skills are just not existing, so my implementation is the "crude" way.

    a) For my setup the quality of the WAN interface is of minimal importance. It is directly wired to the cisco router.

    So, I changed the if statement :

    if("$ifname" == "wan") {
    /* create link quality database */

    to the Atheros card interface :

    if("$ifname" == "opt2")

    b) Then, I had to change the ip address it is pinging to. I did this by "hardwiring" the ip of my peer's wireless card.

    I know, it's not a very educated way, but it works.

    out=$btick ping -c $numpings -q $gatewayip $btick

    this was changed to :

    out=$btick ping -c $numpings -q aaa.bbb.ccc.ddd $btick

    The next thing I have to figure out is which part of the code I have to duplicate to provide the same service for the other two wireless interfaces.

    Any help on this will be appreciated.

    If I had the required programming skills, I would have included a parameter box in the wireless interface web page for setting the ip to be pinged.

    But I am not a programmer, nor a purist, so even so it's a nice thing to have.


Locked