47 references to InvalidOperationException
Microsoft.Extensions.Diagnostics.ResourceMonitoring (47)
..\..\..\..\src\Libraries\Microsoft.Extensions.Diagnostics.ResourceMonitoring\Linux\LinuxUtilizationParserCgroupV1.cs (15)
113
Throw.
InvalidOperationException
($"Could not get cpu usage from '{_cpuacctUsage}'. Expected positive number, but got '{new string(usage)}'.");
133
Throw.
InvalidOperationException
($"Expected proc/stat to start with '{StartingTokens}' but it was '{new string(bufferWriter.Buffer.WrittenSpan)}'.");
149
Throw.
InvalidOperationException
(
199
Throw.
InvalidOperationException
($"Could not parse '{_memoryLimitInBytes}' content. Expected to find available memory in bytes but got '{new string(memoryBuffer)}' instead.");
220
Throw.
InvalidOperationException
($"Unable to find total_inactive_file from '{_memoryStat}'.");
228
Throw.
InvalidOperationException
($"The value of total_inactive_file found in '{_memoryStat}' is not a positive number: '{new string(inactiveMemorySlice)}'.");
241
Throw.
InvalidOperationException
(
251
Throw.
InvalidOperationException
($"The total memory usage read from '{_memoryUsageInBytes}' is lesser than inactive memory usage read from '{_memoryStat}'.");
268
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected first line of the file to start with '{MemTotal}' but it was '{new string(firstLine)}' instead.");
277
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get total memory usage on first line but we've got: '{new string(firstLine)}'.");
282
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get memory usage followed by the unit (kB, MB, GB) but found no unit: '{new string(firstLine)}'.");
367
Throw.
InvalidOperationException
(
426
Throw.
InvalidOperationException
($"Could not parse '{_cpuCfsQuotaUs}'. Expected an integer but got: '{new string(quotaBuffer)}'.");
444
Throw.
InvalidOperationException
($"Could not parse '{_cpuCfsPeriodUs}'. Expected to get an integer but got: '{new string(periodBuffer)}'.");
474
Throw.
InvalidOperationException
($"Could not parse '{_cpuPodWeight}' content. Expected to find CPU weight but got '{new string(cpuPodWeightBuffer)}' instead.");
..\..\..\..\src\Libraries\Microsoft.Extensions.Diagnostics.ResourceMonitoring\Linux\LinuxUtilizationParserCgroupV2.cs (29)
124
Throw.
InvalidOperationException
($"The file '{_cpuCgroupInfoFile}' is empty or could not be read.");
131
Throw.
InvalidOperationException
($"Invalid format in file '{_cpuCgroupInfoFile}'. Expected content with ':' separator.");
179
Throw.
InvalidOperationException
($"Expected proc/stat to start with '{StartingTokens}' but it was '{new string(bufferWriter.Buffer.WrittenSpan)}'.");
195
Throw.
InvalidOperationException
(
300
Throw.
InvalidOperationException
($"Could not parse '{_memoryLimitInBytes}' content. Expected to find available memory in bytes but got '{new string(memoryBuffer)}' instead.");
333
Throw.
InvalidOperationException
(
368
Throw.
InvalidOperationException
($"Unable to find inactive_file from '{_memoryStat}'.");
377
Throw.
InvalidOperationException
($"The value of inactive_file found in '{_memoryStat}' is not a positive number: '{new string(inactiveMemorySlice)}'.");
395
Throw.
InvalidOperationException
($"The total memory usage read from '{_memoryUsageInBytes}' is lesser than inactive memory read from '{_memoryStat}'.");
412
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected first line of the file to start with '{MemTotal}' but it was '{new string(firstLine)}' instead.");
421
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get total memory usage on first line but we've got: '{new string(firstLine)}'.");
426
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get memory usage followed by the unit (kB, MB, GB) but found no unit: '{new string(firstLine)}'.");
511
Throw.
InvalidOperationException
(
529
Throw.
InvalidOperationException
($"Could not parse '{memoryMinFile}' content. Expected to find memory minimum in bytes but got '{new string(memoryMinBuffer)}' instead.");
550
Throw.
InvalidOperationException
($"Could not parse '{memoryLowFile}' content. Expected to find memory low in bytes but got '{new string(memoryLowBuffer)}' instead.");
573
Throw.
InvalidOperationException
($"Could not parse '{cpuUsageFile}'. Expected to find 'usage_usec' but it was not present in the file content.");
581
Throw.
InvalidOperationException
($"Could not get usage_usec from '{cpuUsageFile}'. Expected positive number, but got '{new string(content.Slice(usageIndex))}'.");
588
Throw.
InvalidOperationException
($"Could not parse '{cpuUsageFile}'. Expected to find 'nr_periods' but it was not present in the file content.");
596
Throw.
InvalidOperationException
($"Could not get nr_periods from '{cpuUsageFile}'. Expected positive number, but got '{new string(content.Slice(periodsIndex))}'.");
687
Throw.
InvalidOperationException
($"Could not parse '{cpuLimitsFile}'. Expected an integer but got: '{new string(quotaBuffer)}'.");
697
Throw.
InvalidOperationException
($"Could not parse '{cpuLimitsFile}'. Expected to get an integer but got: '{new string(cpuPeriodSlice)}'.");
714
Throw.
InvalidOperationException
($"Could not read content from '{cpuLimitsFile}'. The file was empty.");
726
Throw.
InvalidOperationException
($"Could not parse period value from '{cpuLimitsFile}'. Expected an integer after 'max' but got: '{new string(content)}'.");
741
Throw.
InvalidOperationException
($"Could not parse period value from '{cpuLimitsFile}'. Expected an integer after '-1' but got: '{new string(content)}'.");
753
Throw.
InvalidOperationException
($"Could not parse quota value from '{cpuLimitsFile}'. Expected an integer but got: '{new string(content)}'.");
766
Throw.
InvalidOperationException
($"Could not parse period value from '{cpuLimitsFile}'. Expected an integer after quota but got: '{new string(content)}'.");
806
Throw.
InvalidOperationException
(
814
Throw.
InvalidOperationException
(
859
Throw.
InvalidOperationException
(
..\..\..\..\src\Libraries\Microsoft.Extensions.Diagnostics.ResourceMonitoring\Linux\Network\LinuxNetworkUtilizationParser.cs (3)
80
Throw.
InvalidOperationException
($"Could not split contents. We expected every line to contain more than {Target - 1} elements, but it has only {numRanges} elements.");
147
Throw.
InvalidOperationException
($"Could not parse '{file}'. File was empty.");
153
Throw.
InvalidOperationException
($"Could not parse '{file}'. We expected first line of the file to start with '{Sl}' but it was '{firstLine}' instead.");