Windows 服务启动时间 [英] Windows Service startup time

查看:75
本文介绍了Windows 服务启动时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法以编程方式检索在 Windows XP 中启动期间启动的所有 Windows 服务的启动时间/持续时间?也就是说,服务初始化到启动"状态的时间.

Is there a way to programmatically retrieve start-up time/duration for all the Windows Services that have started during boot in Windows XP? That is, the time the service was initialized to getting to the "started" state.

先谢谢你!

附言我不是在寻求软件推荐.

P.S. I'm not asking for software recommendation.

推荐答案

我会从查看事件查看器中的日志开始,检查您想要的信息是否在那里.

I would start with looking at the logs in event viewer, check if that information you want is there.

如果是,那么使用微软的 EventLog 类来获取你想要的日志.

If it is, then use Microsofts EventLog class to get the log you want.

例如,如果您对系统日志使用感兴趣 -

For example if you're interested in the System log use -

 EventLog systemLog = new EventLog("System");

systemLog 包含系统日志中所有条目的集合.从那里开始应该很容易.

systemLog contains a collection of all entries in the System log. Should be easy from there.

这篇关于Windows 服务启动时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆