On Wed, 30 Sep 2009, Tom Chen wrote:

> Robin,
> 
> Thanks. 
> 
> Could you give me some detailed steps to use "uadmin" to test Suspend/Resume?
> 
> Tom


  First, setup cpr_debug:

    echo "cpr_debug/W0xff" | mdb -kw

This will display debugging information to the console about which 
devices are being suspended.


And then us uadmin(1m) with the A_FREEZE cmd (3) and one of the 
following fcn's (all but 0, 2, 20, and 21 should be considered 
"Volatile" interfaces and *may* change at any time):

    0 - AD_SUSPEND     Suspend, saving the state (a.k.a. S4/Hibernate)
    2 - AD_CHECK       Check the above suspend is enabled
    7 - AD_CPR_TESTNOZ Suspend normal, immediate resume
    8 - AD_CPR_TESTZ   Suspend compress, immediate resume
    20 - AD_SUSPEND_TO_RAM  (the below are in my blog)
    21 - AD_CHECK_SUSPEND_TO_RAM
    22 - AD_LOOPBACK_SUSPEND_TO_RAM_PASS
    23 - AD_LOOPBACK_SUSPEND_TO_RAM_FAIL
    25 - AD_DEVICE_SUSPEND_TO_RAM (note on this below)

  Note on the "25" fcn, it takes an mdep argument which is the major 
number of the driver that is being tested - AND only works on x86 
machines.

So, to verify if Suspend to Disk is enabled:

    uadmin 3 2

To verify if Suspend to RAM is enabled:

    uadmin 3 21

To test Suspend to Disk with immediate restart:

    uadmin 3 7

(note that this writes an uncomressed statefile, using '8' compresses 
the statefile, which for most testing probably doesn't make a 
difference)

To test Suspend to RAM without actually powering the machine off:

    uadmin 3 22

To test a driver who's major number is 79 (which happens to be the 
major number of the bge driver on one of my test machines):

    uadmin 3 25 79



  Additional note:

    Suspend to disk is currently only supported on Sparc
    Suspend to RAM is currently only supported on X86

So: 'uadmin 3 21' will fail on Sparc as will 'uadmin 3 2' on x86.

 

  Good Luck!


        ---- Randy

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to