Ntpq host importer.
More...
|
void | CreateEntry (string peerIp, double offset, double jitter, double frequency, double stability) |
|
Ntpq host importer.
Definition at line 34 of file NtpqHostImporter.cs.
Ntp.Analyzer.Import.NtpqHostImporter.NtpqHostImporter |
( |
string |
address, |
|
|
Host |
host, |
|
|
ReadingBulk |
bulk, |
|
|
LogBase |
log |
|
) |
| |
|
inlinepackage |
void Ntp.Analyzer.Import.NtpqHostImporter.CreateEntry |
( |
string |
peerIp, |
|
|
double |
offset, |
|
|
double |
jitter, |
|
|
double |
frequency, |
|
|
double |
stability |
|
) |
| |
|
inlineprivate |
override void Ntp.Analyzer.Import.NtpqHostImporter.Initialize |
( |
| ) |
|
|
inlineprotectedvirtual |
override void Ntp.Analyzer.Import.NtpqHostImporter.ReadFromStream |
( |
| ) |
|
|
inlineprotectedvirtual |
Implements Ntp.Analyzer.Import.Importer< HostReading >.
Definition at line 65 of file NtpqHostImporter.cs.
73 while (
Reader.Peek() != -1)
75 string line =
Reader.ReadLine();
77 if (
string.IsNullOrWhiteSpace(line) || line.Length < 24)
80 string name = line.Substring(0, 19).Replace(
":",
string.Empty).TrimEnd();
81 string value = line.Substring(19).Trim();
86 peerIp = value.Replace(
":123",
string.Empty).Trim();
89 offset = Convert.ToDouble(value.Replace(
"s",
string.Empty).Trim());
92 frequency = Convert.ToDouble(value.Replace(
"ppm",
string.Empty).Trim());
95 jitter = Convert.ToDouble(value.Replace(
"s",
string.Empty).Trim());
98 stability = Convert.ToDouble(value.Replace(
"ppm",
string.Empty).Trim());
103 if (peerIp != null && peerIp.StartsWith(
"0.0.0.0"))
109 CreateEntry(peerIp, offset, jitter, frequency, stability);
void CreateEntry(string peerIp, double offset, double jitter, double frequency, double stability)
readonly string Ntp.Analyzer.Import.NtpqHostImporter.address |
|
private |
override string Ntp.Analyzer.Import.NtpqHostImporter.Arguments => "-nc kerninfo -c sysinfo " + address |
|
protected |
readonly ReadingBulk Ntp.Analyzer.Import.NtpqHostImporter.bulk |
|
private |
override string Ntp.Analyzer.Import.NtpqHostImporter.Command => "ntpq" |
|
protected |
readonly Host Ntp.Analyzer.Import.NtpqHostImporter.host |
|
private |
List<Peer> Ntp.Analyzer.Import.NtpqHostImporter.peers |
|
private |
The documentation for this class was generated from the following file: