Suriyan Suresh
Suriyan Suresh

Reputation: 3024

how do i monitor network systems?

i would like to monitor my systems in my network using c#, below is the list of things to monitor

  1. Status of remote system(logged in, logged out, turned off)
  2. Shutdown/reboot/logoff remote system

Upvotes: 0

Views: 1818

Answers (2)

Jeremy McGee
Jeremy McGee

Reputation: 25200

You should be able to monitor the status of remote systems using WMI and the System.Management namespace. An introductory article is here.

To force remove shutdown, reboots and logoff, probably the easiest way is to use the Sysinternals psshutdown (details). You can use this from C# by running it as an external Process.

Upvotes: 0

BobbyShaftoe
BobbyShaftoe

Reputation: 28499

This is a broad question. Are you using SNMP? If these are Windows computers you can use WMI. Both of those items can be done simply with WMI.

You may find this link useful for basic WMI information.

Here is a WMI reference.

Essentially, you can think of any piece of system information you like and then search for how to retrieve it using WMI. It doesn't matter if you find samples for VBScript (which is what most examples probably will be coded for), you can convert that to C# easy.

Alternatively, you can use SNMP, which is a bit more complex and requires extra setup.

Another possibility, and more work than WMI but less setup than SNMP, is to write your own code to query various pieces of information using the actual API calls. This is overkill for most things, stick with WMI where you can.

Upvotes: 2

Related Questions