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
Overall Utilization Calcualtion
Moderators: Developers, Moderators
RE:Overall Utilization Calcualtion
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
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
Who is online
Users browsing this forum: No registered users and 1 guest