NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Monitor.Server.TextCommand.ServerCommand Class Reference
Inheritance diagram for Ntp.Analyzer.Monitor.Server.TextCommand.ServerCommand:
Collaboration diagram for Ntp.Analyzer.Monitor.Server.TextCommand.ServerCommand:

Public Member Functions

 ServerCommand (string[] args)
 
- Public Member Functions inherited from Ntp.Analyzer.Monitor.Server.TextCommand.MonitorTextCommand
override object Execute ()
 

Protected Member Functions

override string ExecuteTextCommand ()
 
- Protected Member Functions inherited from Ntp.Analyzer.Monitor.Server.TextCommand.MonitorTextCommand
 MonitorTextCommand (string[] args)
 
 MonitorTextCommand ()
 

Additional Inherited Members

- Public Attributes inherited from Ntp.Analyzer.Monitor.Server.TextCommand.MonitorTextCommand
override CommandType CommandType => CommandType.Text
 
- Properties inherited from Ntp.Analyzer.Monitor.Server.TextCommand.MonitorTextCommand
string[] Args [get]
 
- Properties inherited from Ntp.Analyzer.Monitor.Server.Command
abstract CommandType CommandType [get]
 

Detailed Description

Definition at line 29 of file ServerCommand.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Monitor.Server.TextCommand.ServerCommand.ServerCommand ( string[]  args)
inline

Definition at line 31 of file ServerCommand.cs.

32  : base(args)
33  {
34  }

Member Function Documentation

override string Ntp.Analyzer.Monitor.Server.TextCommand.ServerCommand.ExecuteTextCommand ( )
inlineprotectedvirtual

Implements Ntp.Analyzer.Monitor.Server.TextCommand.MonitorTextCommand.

Definition at line 36 of file ServerCommand.cs.

References Ntp.Analyzer.Config.Node.HostConfiguration.AboutPage, Ntp.Analyzer.Monitor.Server.ApplicationState.Config, Ntp.Analyzer.Config.Node.HostConfiguration.HostGraphPage, Ntp.Analyzer.Config.Node.HostConfiguration.HostGraphs, Ntp.Analyzer.Config.Node.HostConfiguration.HostPages, Ntp.Analyzer.Config.Node.HostConfiguration.PeerGraphPage, Ntp.Analyzer.Config.Node.HostConfiguration.PeerGraphs, Ntp.Analyzer.Config.Node.HostConfiguration.PeerPages, Ntp.Analyzer.Config.Node.HostConfiguration.PeerSummaryPages, Ntp.Analyzer.Config.Node.HostConfiguration.ServerName, and Ntp.Analyzer.Config.Node.Configuration.Servers.

37  {
38  var builder = new StringBuilder();
39 
40  builder.Append("Host".PadRight(18));
41  builder.Append("#HP".PadLeft(4));
42  builder.Append("#HG".PadLeft(4));
43  builder.Append("#GP".PadLeft(4));
44  builder.Append("#PP".PadLeft(4));
45  builder.Append("#PG".PadLeft(4));
46  builder.Append("#GP".PadLeft(4));
47  builder.Append("#PS".PadLeft(4));
48  builder.Append("#AB".PadLeft(4));
49  builder.AppendLine();
50 
51  builder.AppendLine(string.Empty.PadLeft(18 + 8*4 + 2, '-'));
52 
53  foreach (HostConfiguration server in ApplicationState.Config.Servers)
54  {
55  builder.Append(server.ServerName.PadRight(18));
56  builder.Append(server.HostPages.Count().ToString(CultureInfo.InvariantCulture).PadLeft(4));
57  builder.Append(server.HostGraphs.Count().ToString(CultureInfo.InvariantCulture).PadLeft(4));
58  builder.Append((server.HostGraphPage == null ? "0" : "1").PadLeft(4));
59  builder.Append(server.PeerPages.Count().ToString(CultureInfo.InvariantCulture).PadLeft(4));
60  builder.Append(server.PeerGraphs.Count().ToString(CultureInfo.InvariantCulture).PadLeft(4));
61  builder.Append((server.PeerGraphPage == null ? "0" : "1").PadLeft(4));
62  builder.Append(server.PeerSummaryPages.Count().ToString(CultureInfo.InvariantCulture).PadLeft(4));
63  builder.Append((server.AboutPage == null ? "0" : "1").PadLeft(4));
64  builder.AppendLine();
65  }
66 
67  return builder.ToString();
68  }
IEnumerable< PeerPageConfiguration > PeerPages
IEnumerable< HostPageConfiguration > HostPages
IEnumerable< PeerSummaryPageConfiguration > PeerSummaryPages
IEnumerable< HostGraphConfiguration > HostGraphs
IEnumerable< PeerGraphConfiguration > PeerGraphs

The documentation for this class was generated from the following file: