简体   繁体   English

数据收集器集中的奇怪值

[英]Strange values in data collector set

I'm collecting some performance data on various virtual machines. 我正在各种虚拟机上收集一些性能数据。 The DataCollectorSet is initialized as follows: DataCollectorSet初始化如下:

set.Subdirectory = set.name;
set.SubdirectoryFormat = AutoPathFormat.plaYearMonthDay;

var schedule = set.Schedules.CreateSchedule();
schedule.Days = WeekDays.plaEveryday;
schedule.StartDate = DateTime.Now;

set.Schedules.Add(schedule);

set.Commit(set.name, null, CommitMode.plaCreateNew);

Then I add a collector: 然后我添加一个收藏家:

var collector = (IPerformanceCounterDataCollector)set.DataCollectors.CreateDataCollector(DataCollectorType.plaPerformanceCounter);

collector.FileName = counterPath.Replace("\\", "_");
collector.LogAppend = true;
collector.FileNameFormat = AutoPathFormat.plaYearMonthDay;
collector.SampleInterval = 60u;
collector.SegmentMaxRecords = 1440;
collector.LogFileFormat = FileFormat.plaTabSeparated;

set.DataCollectors.Add(collector);

var counters = new string[1];
counters[0] = counterPath;
collector.PerformanceCounters = counters;

set.Commit(set.name, null, CommitMode.plaCreateOrModify);

When I run this with \\LogicalDisk(_Total)\\% Disk Time , on dozens of machines, I get values that look like percentages, as expected — they're mostly around 0.00 through 5.00, but sometimes, during high activity, go into the double digits. 当我使用\\LogicalDisk(_Total)\\% Disk Time ,在几十台机器上,我得到的值看起来像预期的百分比 - 它们大多在0.00到5.00之间,但有时,在高活动期间,进入两位数。

On one machine, however, all values are above 100. They all appear to be between about 120 and 170, regardless of whether the machine appears to be busy or not. 但是,在一台机器上,所有值都在100以上。无论机器是否显示繁忙,它们都显示在120到170之间。 Meanwhile, running perfmon manually with the same counter shows the presumably correct values — it goes near 100% when busy, and otherwise stays below 10%. 同时,使用相同的计数器手动运行perfmon显示可能正确的值 - 忙时接近100%,否则保持在10%以下。

Here's the first few output lines from a machine with expected results: 这是来自具有预期结果的机器的前几个输出线:

"(PDH-TSV 4.0) (Mitteleuropäische Sommerzeit)(-120)" "\\BR-DOMAIN\\Logischer Datenträger(_Total)\\Zeit (%)" "08/04/2015 01:00:18.425" " " "08/04/2015 01:01:18.407" "2.4181960253316448" "08/04/2015 01:02:18.406" "0.24834083322649675" "08/04/2015 01:03:18.404" "0.19900577879613995" “(PDH-TSV 4.0)(MitteleuropäischeSommerzeit)( - 120)”“\\ BR-DOMAIN \\LogischerDatenträger(_Total)\\ Zeit(%)”“08/04/2015 01:00:18.425”“”“08 / 04/2015 01:01:18.407“”2.4181960253316448“”08/04/2015 01:02:18.406“”0.24834083322649675“”08/04/2015 01:03:18.404“”0.19900577879613995“

On the presumably misconfigured one, instead, they look like this: 在可能错误配置的一个,相反,他们看起来像这样:

"(PDH-TSV 4.0) (Mitteleuropäische Sommerzeit)(-120)" "\\BR-SQL-03\\Logischer Datenträger(_Total)\\Zeit (%)" "08/04/2015 09:22:07.685" " " "08/04/2015 09:23:07.686" "138.63521370727958" "08/04/2015 09:24:07.679" "141.86027406369067" "08/04/2015 09:25:07.679" "124.80150934108948" “(PDH-TSV 4.0)(MitteleuropäischeSommerzeit)( - 120)”“\\ BR-SQL-03 \\LogischerDatenträger(_Total)\\ Zeit(%)”“08/04/2015 09:22:07.685”“”“ 08/04/2015 09:23:07.686“”138.63521370727958“”08/04/2015 09:24:07.679“”141.86027406369067“”08/04/2015 09:25:07.679“”124.80150934108948“

The machines that work as expected run a range of OSes (2008 R2, 2012, 2012 R2) in both German and English, and it doesn't appear to be something with the regional settings either. 按预期工作的机器以德语和英语运行一系列操作系统(2008 R2,2012,2012 R2),它似乎也不属于区域设置。

% disk time is merely the average disk queue length multiplied by 100. See this article for more details. %disk time只是平均磁盘队列长度乘以100.有关更多详细信息,请参阅文章。

The “% Disk Time” counter is nothing more than the “Avg. “%Disk Time”计数器只不过是“平均值”。 Disk Queue Length” counter multiplied by 100. It is the same value displayed in a different scale. 磁盘队列长度“计数器乘以100.它是以不同比例显示的相同值。 If the Avg. 如果平均。 Disk queue length is equal to 1, the %Disk Time will equal 100. If the Avg. 磁盘队列长度等于1,%Disk Time将等于100.如果是平均值。 Disk Queue Length is 0.37, then the %Disk Time will be 37. This is the reason why you can see the % Disk Time being greater than 100%, all it takes is the Avg. 磁盘队列长度为0.37,然后%磁盘时间为37.这就是为什么您可以看到%Disk Time大于100%的原因,只需要Avg。 Disk Queue length value being greater than 1. 磁盘队列长度值大于1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM