PwrTest 监视方案

PwrTest 监视器方案记录与监视或显示自动变暗和空白相关的用户空闲统计信息。

运行 PwrTest 监视器方案时,可能还需要在另一个窗口中运行 PwrTest 请求方案 (/requests) 方案。 PwrTest 请求方案可能有助于了解为什么监视器可能仍处于打开状态或系统仍然处于唤醒状态,即使用户的空闲时间足够长,空闲计时器会过期。

如果同时运行这两种方案,请确保使用 /ln:name 参数,以便可以更改日志文件和 ETW 跟踪会话名称。 名称需要不同,以避免工具的两个实例之间发生冲突。

语法

pwrtest.exe /monitor  [/t:n] [/?] 

/t:n
指定方案运行的总时间 () 分钟, (n 的默认值为 30 分钟) 。

示例

pwrtest.exe /device 
pwrtest.exe /device /t:60

XML 日志文件输出

<PwrTestLog>
  <SystemInformation>
  </SystemInformation>
  <MonitorPower> 
    <PhysicalMonitorBrightnessEvent>
        <Timestamp></TimeStamp>
        <PhysicalMonitorBrightnessPercent></PhysicalMonitorBrightnessPercent>
    </PhysicalMonitorBrightnessEvent>
    <MonitorIdleStatusEvent>
        <Timestamp></TimeStamp>
        <SessionId></SessionId>
        <AccruedIdleTimeMs></AccruedIdleTimeMs>
    </MonitorIdleStatusEvent>
    <MonitorTimeoutsChangeEvent>
        <Timestamp></TimeStamp>
        <SessionId></SessionId>
        <DisplayTimeoutValueMs></DisplayTimeoutValueMs>
        <ScreenSaverTimeoutValueMs></ScreenSaverTimeoutValueMs>
        <DimTimeoutValueMs></DimTimeoutValueMs>
        <DimBrightnessValue></DimBrightnessValue>
        <NormalBrightnessValue></NormalBrightnessValue>
    </MonitorTimeoutsChangeEvent>
    <MonitorIdleActionExpireEvent>
        <Timestamp></TimeStamp>
        <SessionId></SessionId>
        <IsConsoleSession></IsConsoleSession>
        <IdleAction></IdleAction>
        <IdleStartTime></IdleStartTime>
        <TimeoutValueMs></TimeoutValueMs>
    </MonitorIdleActionExpireEvent>
    <MonitorPowerEvent>
        <Timestamp></TimeStamp>
        <SessionId></SessionId>
        <IsConsoleSession></IsConsoleSession>
        <NewState></NewState>
        <PreviousState></PreviousState>
        <PreviousStateTime></PreviousStateTime>
    </MonitorPowerEvent>
    <MonitorAdaptiveDimTimeoutEvent>
        <Timestamp></TimeStamp>
        <Timeout></Timeout>
    </MonitorAdaptiveDimTimeoutEvent>
  </MonitorPower>
</PwrTestLog> 

下表描述了日志文件中显示的 XML 元素。

元素 说明
<MonitorPower>

包含所有不同的监视器电源事件。 PwrTest 日志文件中只能 <有一个 MonitorPower> 元素。

<时间 戳>

任何给定事件的时间戳。

<SessionId>

事件所针对的用户会话的名称。

<IsConsoleSession>

显示物理控制台会话是否附加到物理监视器 。

<PhysicalMonitorBrightnessEvent>

事件指示当前监视器的亮度。

<MonitorIdleStatusEvent>

事件指示用户处于空闲状态。

<AccruedIdleTimeMs>

累计用户空闲时间(以毫秒为单位)。

<MonitorTimeoutsChangeEvent>

事件指示当前空闲超时。

<DisplayTimeoutValueMs>

显示空超时值(以毫秒为单位)。

<ScreenSaverTimeoutValueMs>

屏幕保护程序超时值(以毫秒为单位)。

<DimTimeoutValueMs>

显示 dim 超时值(以毫秒为单位)

<DimBrightnessValue>

处于昏暗状态时要使用的亮度。

<NormalBrightnessValue>

处于打开状态时要使用的亮度。

<MonitorIdleActionExpireEvent>

事件指示已命中空闲超时并已执行操作。

<IdleAction>

描述在屏幕保护程序启动、主机锁定、监视器变暗、监视器空白) (执行的操作。

<IdleStartTime>

此空闲状态的开始时间。

<TimeoutValueMs>

此空闲状态的超时值(以毫秒为单位)。

<MonitorPowerEvent>

事件指示已命中显示空闲超时并已执行操作。

<NewState>

监视器的新状态 (打开/调暗/关闭) 。

<PreviousState>

监视器的以前状态 (打开/调暗/关闭) 。

<PreviousStateTime>

处于上一状态的时间。

<MonitorAdaptiveDimTimeoutEvent>

事件指示自适应暗淡超时已更改。

<超时>

新的超时值(以秒为单位)。

PwrTest 语法