Retrieve the windows service uptime?
Is there is a way to get the start time of a windows service by code in C#? Is t开发者_JAVA技巧here is a way to get the number of re-starts of the windows service in last 72 hours?
This for the first question.
As for the second question, I think you would need to look at the Windows events to find how many time it started, unless you can change the code to log it somewhere.
You can try to capture it from the Event Log. As far as I know when a service starts it hooks an entry to the event log.
精彩评论