开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜