forked from dotnet/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDiskStats.cs
More file actions
36 lines (32 loc) · 1.49 KB
/
DiskStats.cs
File metadata and controls
36 lines (32 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.Extensions.Diagnostics.ResourceMonitoring.Linux.Disk;
/// <summary>
/// Represents one line of statistics from "/proc/diskstats"
/// See https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats for details.
/// </summary>
internal sealed class DiskStats
{
public int MajorNumber { get; set; }
public int MinorNumber { get; set; }
public string DeviceName { get; set; } = string.Empty;
public ulong ReadsCompleted { get; set; }
public ulong ReadsMerged { get; set; }
public ulong SectorsRead { get; set; }
public uint TimeReadingMs { get; set; }
public ulong WritesCompleted { get; set; }
public ulong WritesMerged { get; set; }
public ulong SectorsWritten { get; set; }
public uint TimeWritingMs { get; set; }
public uint IoInProgress { get; set; }
public uint TimeIoMs { get; set; }
public uint WeightedTimeIoMs { get; set; }
// The following fields are available starting from kernel 4.18; if absent, remain 0
public ulong DiscardsCompleted { get; set; }
public ulong DiscardsMerged { get; set; }
public ulong SectorsDiscarded { get; set; }
public uint TimeDiscardingMs { get; set; }
// The following fields are available starting from kernel 5.5; if absent, remain 0
public ulong FlushRequestsCompleted { get; set; }
public uint TimeFlushingMs { get; set; }
}