Command line options

Top  Previous  Next

Sleeper supports a number of command line options. If no command line options are specified,
Sleeper starts in full user interface mode. If invalid command line options are specified, Sleeper will display an error dialog and exit.

1.If no command line options are specified, Sleeper will attempt to load the last used configuration (sleeperCfg.dat).  If sleeperCfg.dat is not present, default values will be used.
2.If a configuration file is specified, the configuration file will be used.
3.If a configuration file is specified along with other command line options, the configuration file will be used.  Any command line option that appears after the configuration file (i.e. --config option) will override the configuration file's settings.  For example, if the sleep duration for S1-S4 is 60 in "myconfig.dat", and we run Sleeper with: Sleeper.exe --config=myconfig.dat -R 90.  Then Sleeper will attempt to sleep for 90 seconds instead of 60.
4.If command line options are specified without a configuration file (i.e. without --config option), default values will be used and the command line options will override its default values.  If any of the command line option is invalid, Sleeper will use its default values.  However, if a valid log file is specified (i.e. valid -L, -La or -Lo option) along with other invalid options, logs will be written to the specified log file.

Sleeper's default values:
 
Suspend Types For Cycle:
S1:                                On
S2:                                Off
S3:                                Off
S4:                                Off
 
Sleep durations:
S1 Duration:                30 secs
S2 Duration:                30 secs
S3 Duration:                30 secs
S4 Duration:                30 secs
 
State fallback (for sleep state that is not supported):
Skip sleep
 
Cycle Settings:
Perform a fixed number of cycles.
Number of Cycles:        1
Cycle Interval Duration:        60 secs
 
Error handling:
Restart automatically:        Off
Stop and prompt:                Off
 
Sleeper options:
Sleep forever:                Off
Delay before 1st sleep:        0 secs
 
Log file settings:
Append to log file
Log file:                        sleeper.log (in application's directory)
Log level:                Normal
 
External actions:
Call external app between:        Off
Call external app after last:        Off

 

--config=config_file_name.dat

Load configuration file:
Sleeper will load the configuration stored in config_file_name.dat before starting test.  If config_file_name.dat is not a valid configuration file, it will not be loaded and an error dialog will be displayed.

-A

Attempt to use all sleep states (S1, S2, S3, S4)

-B

Attempt to use all supported sleep states

-C

Continue running after a forced power cycle

-D [seconds]

Cycle mode interval:
Specifies the amount of time in seconds that Sleeper waits after waking from one state until transition to the next.

-E

Program will exit when finished running

-F

Force sleep state transition:
Some applications may attempt to prevent the system entering the specified sleep state. If the system isn’t responding to Sleepers requests to enter a certain state, it may be necessary to include this option to force the sleep state transition.

-f[x]

State fallback (in the event of an unsupported sleep state):
If a state that is not supported is configured to be run, the following are the options:
-f1:                If no support, attempt next supported lighter sleep
-f2:                If no support, attempt next supported deeper sleep
-f3:                If no support, force sleep at requested level
-f4:                If no support, skip requested level

-H

Hardware Wake:
Defines preferred method of Wake-up as hardware rather than using a timer, in this mode Sleeper will wait for the user to manually wake the system through an action.

-L [filename]

Logfile Name:
Name and path of the log file to write to during test execution.  Sleeper will create the log path if it does not exist.
 
Supported paths are:
a)                Absolute local path, i.e. beginning with an alphabet followed by a colon or beginning with an alpha-numeric and not followed by a colon.
(Example:                A:\a\b\c\d\test.log, b:\1\2\3\4\5\here.log, my\path\test.log, 1\2\3\test.log, etc)
b)                Network path, i.e. beginning with double backslashes followed by the shared folder's name
(Example:                \\userXP\sharedFolder\example.log, etc)

Unsupported paths are:
a)                Relative paths (i.e. paths that starts with dots or double dots, or paths that contains dots or double dots between back slashes)
(Example:                .\my\path\test.log, ..\my\path\test.log, C:\a\b\..\c\.\my.log)

-N [number]

Number of Cycles:

The number of times to suspend and resume, the default is forever.

-O [x]

Query supported sleep states:
If –O is specified, Sleeper returns a bit-masked value indicating which states are supported.
Only the 4 least significant bits are used.
 
Most Significant Bits                                                Least Significant Bits
0 0 0 …………………………………………... 0 0 0                LSB4 LSB3 LSB2 LSB1
 
If LSB[x] is true, Sleep State S[x] is supported.
Example:  If 5 (i.e. 0101) is returned, it means sleep state S1 and S3 are supported.
 
If –O[x] is specified, a true(1) or false(0) value will be returned if sleep state S[x] is supported or not supported.
 
Sleeper will not execute the sleep states.

-P [seconds]

The length of time in seconds to countdown before entering the first requested sleep state.

-R [seconds]

Sleep Duration:
Indicates the length of time in seconds to sleep for. If this option is specified, a valid sleep state must also be present.

-r[x]  [seconds]

Sleep duration for each individual sleep states:
Indicates the length of time in seconds to sleep for Sleep State S[x]. If this option is specified, a valid sleep state must also be present.

-S[xxxx]

Sleep State:
Tells Sleeper to test sleep states 1, 2, 3, or 4. Each x should be a 1 if you want to test a sleep state or a 0 if you don’t want to test it, eg to test sleep states 1 and 4 use –S1001. If this option is specified, then the –D option must also be present (see below).

-T [seconds]

Cycle Time Growth:
Every time a cycle time is completed, this amount (in seconds) will be added to the suspend duration.

 

Example – Execute a sleep from the command line

sleeper -S1000 -R 60 -N 1

Enter sleep state S1 for 60 seconds.

 

Example – Cycle through supported states

sleeper -B -R 60 -D 30 -N 1

Will result in the following behaviour on a system supporting S1, S3 and S4…
S1 for 60 seconds,
Wait for a 30 second interval
S3 for 60 seconds,
Wait for a 30 second interval
S4 for 60 seconds