PwrTest Sleep Scenario

The PwrTest Sleep Scenario facilitates automated testing of sleep and resume transitions.

PwrTest is capable of directing the platform into one or more sleep states in an automated fashion and logging sleep state performance information such as the BIOS initialization and total resume times.

Syntax

pwrtest /sleep [/c:n] [/d:n] [/p:n] [/h:{y|n}] [/s:{1|3|4|all|rnd|hibernate|standby|dozes4}] [/unattend] [dt:n] [/e:n] [/?] 

/c:n
Specifies the number of cycles (1 is the default) to run.

/d:n
Specifies the delay time in seconds (90 is the default).

/p:n
Specifies the sleep time in seconds (60 is default). If wake timer isn't supported for hibernate, the system will restart and immediately resume after writing the hibernation file) .

/h:{y|n}
Specifies whether hybrid sleep should be enabled (y) or disabled (n). The default is system policy.

/s:{1|3|4|all|rnd|hibernate|standby|dozes4}

1
Specifies that the target state is always S1.

3
Specifies that the target state is always S3.

4
Specifies that the target state is always S4.

all
Specifies cycling through all supported power states in order.

rnd
Specifies cycling through all supported power states randomly.

hibernate
Specifies target state is always hibernate (S4).

standby
Specifies target state is any available Standby state (S1 or S3).

dozes4
Specifies to doze to S4 from Modern Standby (S0 Low Power Idle).

/unattend
Specifies not to change system execution state after wakeup.

/dt:n
For dozeS4 only, specifies the doze timeout in seconds to spend in Modern Standby before transitioning to hibernate (S4).

/e:n
Specifies the timeout in seconds to wait for the transition end event (120 seconds is the default).

Examples

pwrtest /sleep /c:4 /s:all 
pwrtest /sleep /c:4 /p:120 /d:150 /s:all
pwrtest /sleep /c:10 /s:dozes4 /dt:100 /p:100

XML log file output

<PwrTestLog>
  <SystemInformation>
  </SystemInformation>
  <SleepScenario> 
    <SleepTransitions 
            critical="" 
            hybrid="" 
            delay="" 
            sleeptime=""> 
            <SleepTransition 
                  number="" 
                  status=""> 
                  <StartT></StartT> 
                  <EndT></EndT> 
                  <SleepTimeMs></SleepTimeMs> 
                  <TargetState></TargetState> 
                  <EffectiveState></EffectiveState> 
                  <BIOSInitTimeMs></BIOSInitTimeMs> 
                  <DriverWakeTimeMs></DriverWakeTimeMs> 
                  <Suspend></Suspend> 
                  <Resume></Resume> 
                  <HiberReadTimeMs></HiberReadTimeMs> 
                  <HiberWriteTimeMs></HiberWriteTimeMs> 
                  <HiberPagesWritten></HiberPagesWritten> 
            </SleepTransition> 
            <SleepTransition 
                  number="" 
                  status=""> 
                  <StartT></StartT> 
                  <EndT></EndT> 
                  <SleepTimeMs></SleepTimeMs> 
                  <TargetState></TargetState> 
                  <EffectiveState></EffectiveState> 
                  <BIOSInitTimeMs></BIOSInitTimeMs> 
                  <DriverWakeTimeMs></DriverWakeTimeMs> 
                  <Suspend></Suspend> 
                  <Resume></Resume> 
                  <HiberReadTimeMs></HiberReadTimeMs> 
                  <HiberWriteTimeMs></HiberWriteTimeMs> 
                  <HiberPagesWritten></HiberPagesWritten> 
            </SleepTransition>
    </SleepTransitions> 
  </SleepScenario> 
</PwrTestLog> 

The following table describes the XML elements that appear in the log file.

Element Description
<SleepScenario>

Contains information related to the sleep scenario. There is only one <SleepScenario> element in a PwrTest log file.

<SleepTransitions>

Provides overall data about the sleep transition cycles such as the state of critical and hybrid sleep features.

<SleepTransition>

Provides per-sleep cycle information such as the start and end times, as well as details about the resume time, such as the BIOS initialization time. A <SleepTransition> element is generated for each sleep transition cycle.

<StartT>

Indicates the start time of the sleep cycle. (hh:mm:ss)

<EndT>

Indicates the end time of the sleep cycle. (hh:mm:ss)

<SleepTimeMs>

Indicates the duration of the sleep cycle. (hh:mm:ss)

<TargetState>

Indicates the target sleep state.

<EffectiveState>

Indicates the effective sleep state.

<BIOSInitTimeMs>

Indicates the amount of time required to initialize the BIOS (TargetState must be 3) on resume in milliseconds.

<DriverWakeTimeMs>

Indicates the amount of time required to initialize drivers on resume in milliseconds.

<Suspend>

Indicates the amount of time required to suspend the system in milliseconds.

<Resume>

Indicates the total amount of time required to resume the system in milliseconds.

<HiberReadTimeMs>

Indicates the time required to read the hibernation file in milliseconds. (TargetState must be 4)

<HiberWriteTimeMs>

Indicates the time required to write the hibernation file in milliseconds. (EffectiveState must be 4)

<HiberPagesWritten>

Number of pages written in the hibernation file. (EffectiveState must be 4)

PwrTest Syntax