Putting It All Together
Let’s take a look at the last file of interest: Main.cs. Listing 4 shows the main program.
Listing 4 The main program.
using System; using System.Collections.Generic; namespace Dipping_in { class MainClass { public static void Main(string[] args) { DumpPlatformData dumpPlatformData = new DumpPlatformData(); dumpPlatformData.DumpData(); Console.ReadLine(); } } }
Listing 4 is just an extended version of Listing 1. In Listing 4, I instantiate an object of the class DumpPlatformData (for which, refer to Listing 3) and then call the method DumpData(). To prevent the program from ending at this stage, I call the method Console.ReadLine(). To end the program, you just need to press Enter in the DOS console window.
So the program has collected some data about the managed platform. You might well ask, "What use is that?" Good question! Collecting such data is an important aspect of management. In many cases, the management system product may simply display the data in a browser or some other visual program. In other cases, the data may be stored to a file or a database. What happens to the data after acquisition depends on the needs of the management system product. One open source product called MC4J Console allows you to connect to and browse the managed platform—in the case of the MC4J Console, instrumented with JMX objects. But the principles remain the same for any instrumentation technology.
For an in-depth look at some specific technologies, see my book Network Management, MIBs and MPLS: Principles, Design and Implementation.