Using Performance Counters

Did you ever write a program that needed to check the available disk space, the free memory, or the status of a printer? When 640K was a lot of memory and hard disk drives had just started becoming popular, these kinds of checks were prevalent in software, at least software that didn't crash due to a lack of disk space or memory. These simple problems can occur, but in modern software we are just as likely to check TCP connections, threads, the status of IIS, Terminal Services, or the status of a service application.

Until recently programmers had to have some highly specialized knowledge of a lot of hardware and protocols to keep tabs on a wide variety of hardware and services. Fortunately, .NET captures all of this ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.