KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

SNMP value to single decimal

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
Kris



Joined: 12 May 2010
Posts: 264

PostPosted: Mon Oct 08, 2018 12:18 am    Post subject: SNMP value to single decimal Reply with quote

Hi guys,

I'm pretty sure this has been answered before, but I can't find it anywhere.

I have a SNMP test that returns a temperature in 3 digits.
It needs to be divided by 10 to get the actual value.
So far I came up with
Code:
[%SuggestedReply_Integer% div 10]

However, this only returns the integer part, eg. 253 becomes 25 instead of 25.3

What am I missing here?

Thanks!
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 11927
Location: USA

PostPosted: Mon Oct 08, 2018 3:41 am    Post subject: Reply with quote

[%SuggestedReply_Integer% div 10].[%SuggestedReply_Integer% mod 10]

If decimal separator on your system is comma, then use comma
[%SuggestedReply_Integer% div 10],[%SuggestedReply_Integer% mod 10]


Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Kris



Joined: 12 May 2010
Posts: 264

PostPosted: Tue Oct 09, 2018 3:31 am    Post subject: Reply with quote

Awesome. Works like a charm.

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index