i am using opserver tool to monitor SQL performance everything works fine except it is not display CPU graph sparks for both standalone and cluster
Asked
Active
Viewed 257 times
-1
-
Welcome to SO. A bit more information about your configuration etc. might be useful. – Uwe Allner Jul 15 '15 at 09:02
1 Answers
1
i replace SQLCPUSpark function with this code
public ActionResult SQLCPUSpark(string node)
{
var instance = SQLInstance.Get(node);
if (instance == null)
return ContentNotFound("SQLNode not found with name = '" + node + "'");
var dataPoints = instance.CPUHistoryLastHour;
var chart = new Chart();
var area = new ChartArea();
area.AxisX.Enabled = AxisEnabled.False;
area.AxisY.Enabled = AxisEnabled.False;
area.AxisY.Maximum = 100;
// configure your chart area (dimensions, etc) here.
chart.ChartAreas.Add(area);
// create and customize your data series.
var series = new Series();
foreach (var item in dataPoints.Data)
{
series.Points.AddXY(item.EventTime.ToOADate(), item.ProcessUtilization);
}
series.Label = "";
series.Font = new Font("Segoe UI", 8.0f, FontStyle.Bold);
series.ChartType = SeriesChartType.Area;
chart.Series.Add(series);
return chart.ToResult();
}

Ahmed
- 1,542
- 2
- 13
- 21
-
If this was the solution to your problem, please mark it as answer, to help other persons with the same problem as yours – Ange1 Dec 17 '15 at 15:02