Overall Utilization Calcualtion

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
zeskioc
Posts: 2
Joined: Mon Nov 06, 2006 4:30 am

Overall Utilization Calcualtion

Post by zeskioc »

Hi,

We have bunch of security and Network Devices. I need to report each device capacity utilization per month. I thought the following calculation may help if I can create a graph for it.

CPU CPU Utilization
MEM Memory Utilization
IF Interface Utilization 'IF1+IF2+...IFn/n as Percentage
PORT Port Utilizaiton 'Gives the number of used ports as Percentage (Used Ports/Total Ports)
SESS Session Utilization
TOT Total Utilization 'TOTAL Utilization Formula


TOT=CPU*50% + MEM*%15 + IF*%10 +PORT*%10 + SESS*15%

Does anybody know how can I create the TOT formula and represent it on Cacti as a Graph?

Any alternative idea is appreciated.

Thanks in advance

zek
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I won't discuss your approach here. But I can help on realizing what you've talked about.
1. Create a graph that includes all Data Sources you need for calculation
2. Create a CDEF, that performs your MATH, print output as GPRINT
Reinhard
zeskioc
Posts: 2
Joined: Mon Nov 06, 2006 4:30 am

RE:Overall Utilization Calcualtion

Post by zeskioc »

Hi Reinhard,

thanks for response.

I wrote ksh script that query the device and make the calculation based on the cpu, ram and session utilization than gives the output.

the script is like the following

#!/bin/ksh
typeset -i cpu15 mem session total memp sessionmax sessionp
hostname=$1
cpu15=`snmpwalk -v 1 -c <passwd> $hostname .1.3.6.1.4.1.3224.16.1.4.0 | awk '{print $4}'`
mem=`snmpwalk -v 1 -c <passwd> $hostname .1.3.6.1.4.1.3224.16.2.1.0 | awk '{print $4}'`
session=`snmpwalk -v 1 -c <passwd> $hostname .1.3.6.1.4.1.3224.16.3.2.0 | awk '{print $4}'`
sessionmax=`snmpwalk -v 1 -c <passwd> $hostname .1.3.6.1.4.1.3224.16.3.3.0 | awk '{print $4}'`
sessionp='(100*session/sessionmax)'
memp='(100*mem/761258204)'
total='((cpu15/2)+(memp/4)+(sessionp/4))'
print "CapacityUtil:$total"


The script works and I am able to run it from cacti but the graphic is still empty. I could not find the problem. Do you have any idea?

Thanks

zek
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please follow my "NaN Debugging" HowTo, see signature
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest