GPRINT syntax ??

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

Moderators: Developers, Moderators

Post Reply
sir_dlb
Posts: 2
Joined: Wed Jun 29, 2005 6:54 am

GPRINT syntax ??

Post by sir_dlb »

Hi peeps,

Can someone tell me what is the GPRINT syntax i have to use when i'm getting a value like 253 and want it to appears as 25.3 ????

%8.2lf => 253.00
%8.1lf => 253.0
%8.0lf => 253
????? => 25.3

I've tried C syntax but it doesn't seem to work as perl's one...
I've also tried to modify the output via the OID i'm cheking for by putting /10 at the end but it didn't work...

Thx for help :wink:
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Since that is math and not a format, you have to use a CDEF to divide the value by 10.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
sir_dlb
Posts: 2
Joined: Wed Jun 29, 2005 6:54 am

Post by sir_dlb »

Yes this is what i've done ;)

I did not read the whole documentation before asking sorry. This feature is detailed at the last page of the Cacti Manual... :oops:

FYI : cdef=CURRENT_DATA_SOURCE,10,/


Thx

sir_dlb
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests