turn memory ds data from Kbytes into Mbytes

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
tbaror
Cacti User
Posts: 75
Joined: Mon Jun 05, 2006 6:54 am

turn memory ds data from Kbytes into Mbytes

Post by tbaror »

Hello,

i am presenting machine info like cpu ping and memory using lit_OS memory for windows.

the memory value presented in Kbytes ,is there a way to turn it to Mgbytes

something like eg. below
Thanks

Code: Select all

{node:this:bandwidth_in:%.1f/1024}%
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

You can't do that, but you can do this:

Code: Select all

TARGET scale:1024:myrrdfile.rrd
to get a value that is in '1's by multiplying by1024, then let weathermap add back in the K,M etc as appropriate like this:

Code: Select all

LABEL {node:this:bandwidth_in:%.1k}
(not sure why you had the % on the end, since the result wouldn't be a percentage)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
tbaror
Cacti User
Posts: 75
Joined: Mon Jun 05, 2006 6:54 am

creates the correct scale

Post by tbaror »

Thanks Howie,

Its works , now i need to create the correct scale for free memory but its seems not possible since below 1G its start to be 1000M and so on.
i tried to create scale but value of 1G and above always appears red.
please advice
Thanks

Code: Select all

SCALE mem 50 200   255 0 0
SCALE mem 500 1000   240 240 0
SCALE mem 1 2   0 255 0
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

SCALE lines are always in PERCENTAGES (because they were originally for bandwidth). So you need to set the BANDWIDTH for the link/node to the maximum memory, and then that will equate to 100%.

The benefit of SCALEs being in percentages is that you can reuse the same scale for lots of different things, even if their maximums are different - 80-100% of something is probably bad, whether it's a 2M line or 4800/5000 firewall sessions.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest