Skip to content

Commit

Permalink
Fixed sys_mem_used metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Studer committed Aug 30, 2015
1 parent a41a02d commit c1bfc9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file modified Org.BeyondComputing.NewRelic.Brocade.VTM.v12.suo
Binary file not shown.
6 changes: 5 additions & 1 deletion VTMAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ private void PollGlobal()

// Get Global Statistics and report to New Relic
GlobalStatistics globalStats = VTM.fetchGlobalStats();

// Calculate System Memory Percent Used
float systemMemoryPercentUsed = (((float)globalStats.sys_mem_in_use) / (globalStats.sys_mem_total))*100;

ReportMetric("global/bytes_in", "bytes/sec", processors["global_bytes_in"].Process(globalStats.total_bytes_in));
ReportMetric("global/bytes_out", "bytes/sec", processors["global_bytes_out"].Process(globalStats.total_bytes_out));
ReportMetric("global/current_conn", "connections", globalStats.total_current_conn);
ReportMetric("global/sys_mem_used", "percent", ((globalStats.sys_mem_in_use/globalStats.sys_mem_total)*100));
ReportMetric("global/sys_mem_used", "percent",systemMemoryPercentUsed);
ReportMetric("global/sys_cpu_busy_percent", "percent", globalStats.sys_cpu_busy_percent);
}
catch
Expand Down

0 comments on commit c1bfc9d

Please sign in to comment.