I have a windows service that spawns off around 60 threads when it starts. I am using Nagios for general monitoring and I have all necessary routines to send data to nagios. However, I cannot figure out how to get a sum of all threads and make sure that none of them are dead.
Basically what I want to do is:
foreach(thread t in threadPool)
{
if(t.isAlive())
{
PingHost(t.ThreadID);
}
}
It doesn't seem like this should be very difficult, but I am not sure where to start.