report only whole numbers

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

report only whole numbers

Post by daksh »

Hi,
Running Cacti 8.7b on opensuse 11; net-snmp-5.4.1; rrdtool-1.2.27

I am monitoring a webserver, and how many HTTP connections this server gets. On my cacti graphs, it reports "Current Connections" with decimals. When I do snmpwalk, I always get a whole number, so I am bit confused on why Cacti is showing number of connections with decimals? Is there a way I can set only this graph with whole numbers?

Thanks
Attachments
cacti.JPG
cacti.JPG (25.11 KiB) Viewed 3016 times
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

Post by daksh »

I forgot to mention how I am getting this info:
I added "proc httpd" line in snmpd.conf file on webserver, then I ran following command to get OID
snmpwalk -v1 -c some_password hostname prTable -On

Once, I had the OID, I created a new graph with "SNMP - Generic OID Template"

Thanks
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

the GPRINT type of your legend items in your graph template need to be set to "Exact Number". I recommand keeping the "average" item to "Normal".

If you don't have the "Exact Number" GPRINT preset, create a new one and enter "%8.0lf" without the quotes for the GPRINT text.

Cacti display floating number because there are extrapolation taking place when the polling isn't done at a strict 5 minutes interval. In some case such as yours, extrapolation isn't a good thing because you can't have half a session or half a user obviously.
daksh
Cacti User
Posts: 78
Joined: Tue Nov 11, 2008 4:46 pm

Post by daksh »

Your tip worked perfectly.

Thanks for your help... :D
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Exo7 wrote:Cacti display floating number because there are extrapolation taking place when the polling isn't done at a strict 5 minutes interval. In some case such as yours, extrapolation isn't a good thing because you can't have half a session or half a user obviously.
In fact, this is a _feature_ of rrdtool, not of cacti. See 1st link of my sig, rrdtool chapter, for more explanation
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest