Definition at line 27 of file IoStatsImporter.cs.
Ntp.Analyzer.Import.IoStatsImporter.IoStatsImporter |
( |
string |
address, |
|
|
bool |
ntpq, |
|
|
LogBase |
log |
|
) |
| |
|
inlinepackage |
override void Ntp.Analyzer.Import.IoStatsImporter.ReadFromStream |
( |
| ) |
|
|
inlineprotectedvirtual |
Implements Ntp.Analyzer.Import.Importer< IoStatsEntry >.
Definition at line 45 of file IoStatsImporter.cs.
47 int timeSinceReset = -1;
48 int receiveBuffers = -1;
49 int freeReceiveBuffers = -1;
50 int usedReceiveBuffers = -1;
51 int lowWaterRefills = -1;
52 long droppedPackets = -1;
53 long ignoredPackets = -1;
54 long receivedPackets = -1;
55 long packetsSent = -1;
56 long packetsNotSent = -1;
57 int interruptsHandled = -1;
58 int receivedByInt = -1;
60 while (
Reader.Peek() != -1)
62 string line =
Reader.ReadLine();
64 if (
string.IsNullOrWhiteSpace(line) || line.Length < 24)
67 string name = line.Substring(0, 22).Replace(
":",
string.Empty).TrimEnd();
68 string value = line.Substring(22).TrimEnd();
72 if (!
long.TryParse(value, out parsedValue))
79 case "time since reset":
80 timeSinceReset = (int) parsedValue;
82 case "receive buffers":
83 receiveBuffers = (int) parsedValue;
85 case "free receive buffers":
86 freeReceiveBuffers = (int) parsedValue;
88 case "used receive buffers":
89 usedReceiveBuffers = (int) parsedValue;
91 case "low water refills":
92 lowWaterRefills = (int) parsedValue;
94 case "dropped packets":
95 droppedPackets = parsedValue;
97 case "ignored packets":
98 ignoredPackets = parsedValue;
100 case "received packets":
101 receivedPackets = parsedValue;
104 packetsSent = parsedValue;
106 case "packets not sent":
107 case "packet send failures":
108 packetsNotSent = parsedValue;
110 case "input wakeups":
111 case "interrupts handled":
112 interruptsHandled = (int) parsedValue;
114 case "useful input wakeups":
115 case "received by int":
116 receivedByInt = (int) parsedValue;
119 Log.NtpValueError(name);
readonly string Ntp.Analyzer.Import.IoStatsImporter.address |
|
private |
override string Ntp.Analyzer.Import.IoStatsImporter.Arguments => "-c iostats " + address |
|
protected |
override string Ntp.Analyzer.Import.IoStatsImporter.Command => ntpq ? "ntpq" : "ntpdc" |
|
protected |
readonly bool Ntp.Analyzer.Import.IoStatsImporter.ntpq |
|
private |
The documentation for this class was generated from the following file: