Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jun 16, 2019 1:48 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Need Help! CDEF function Convert watts to dbm
PostPosted: Tue Oct 02, 2012 1:49 am 
Offline

Joined: Tue Oct 02, 2012 1:40 am
Posts: 3
Hi Guys,
iam trying to input the following formula into cacti to convert watts to dbm
P(dBm) = 10 · log10( P(mW) )
Example

Convert 20mW to dBm:,

P(dBm) = 10 · log10( 20mW ) = 13.0103dBm

Does anyone know how?

i have come out with this. but its not correct.

cdef=CURRENT_DATA_SOURCE,0.001,*,LOG,10,*

cisco is giving me a reading of 33 via snmpwalk.
So i need to divide the value by a 1000 before applying the formula is bold

So the problem happens when i apply the log fuction i get a different value(-3.41), then expected (-1.48)


Top
 Profile  
 
 Post subject: Re: Need Help! CDEF function Convert watts to dbm
PostPosted: Tue Oct 02, 2012 10:00 am 
Offline
Cacti User

Joined: Fri Sep 28, 2012 6:52 pm
Posts: 111
I don't know the proper parameters for LOG, but try this:

CURRENT_DATA_SOURCE, 1000, /, 10, LOG, 10, *


Top
 Profile  
 
 Post subject: Re: Need Help! CDEF function Convert watts to dbm
PostPosted: Thu Oct 11, 2012 4:05 am 
Offline

Joined: Tue Oct 02, 2012 1:40 am
Posts: 3
Couldnt work. the problem seems to lie with the way cacti performs the log fuctions. Whats the 10 before the log function meant to be? Cacti is not able to process the formula.

Has anyone else encounter any problems with the way cacti performs log functions?








P.S. Have no idea why Cisco thinks its a good idea to have ASR 9k report in power rather than dbm.


Top
 Profile  
 
 Post subject: Re: Need Help! CDEF function Convert watts to dbm
PostPosted: Thu Oct 11, 2012 1:35 pm 
Offline
Cacti User

Joined: Fri Sep 28, 2012 6:52 pm
Posts: 111
The '10' is supposed to be the Log base. Told you I wasn't familiar with the Log syntax in RRDtool :P


Try

Code:
CURRENT_DATA_SOURCE, 1000, /, LOG, 10, *


Top
 Profile  
 
 Post subject: Re: Need Help! CDEF function Convert watts to dbm
PostPosted: Tue Oct 16, 2012 3:50 am 
Offline

Joined: Tue Oct 02, 2012 1:40 am
Posts: 3
OK! Finally figured this out. Cacti does logarithm in natural log. so to convert it to a base 10 log.
we need to divide the solution by 2.303

zzzzz.....


Top
 Profile  
 
 Post subject: Re: Need Help! CDEF function Convert watts to dbm
PostPosted: Tue May 21, 2019 4:56 pm 
Offline

Joined: Mon Jul 16, 2018 7:05 am
Posts: 4
Thanks so Below is the final CDEF functions

CURRENT_DATA_SOURCE,0.001,*,LOG,10,*,2.303,/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group