CKMEM - Advanced Testing Techniques

CKMEM is a test applet that allows you to test the base, upper, 
expanded, extended, and video memory installed on your PC.  
CKMEM can test memory currently occupied by itself, DOS, device 
drivers, and TSRs.  Through a number of testing techniques, 
CKMEM will discover and isolate most types of memory problems 
you may encounter, including bad bits, bad parity, bad address 
lines, improper installation, and bad memory timing.

CKMEM parameter exclusion [/T:#tests] [/I:interface] [/O:dest,format] [/N:"notes"]

  Each option within a command can be specified by using 
  either a "/" or a "-".  This guide will use "/" for 
  consistency.  It is also important to that the command 
  sequences are not text- or sequence-sensitive.

parameter
  Type of memory and range to test.  Use one or more of the 
  following. (Separate each option with a space.)
  B[range]  Base memory.  The range can be from 0K to 1024K.
            The default setting is 0 through 1024K.
  U         Upper memory blocks (640K-1M).  Will only test the 
            regions of memory occupied by upper memory blocks.
  E[range]  Expanded memory (EMS).  The range can be from 0K to 
            32M but can not exceed the actual amount of EMS 
            installed.
  X[range]  Extended memory.The range can be from 1M to 64M.
  V         Video memory.  No range is allowed -- all video 
            memory up to 256Kb is tested.
  ALL       All memory found except video (default).

exclusion
  The following switches can be used if the applet has trouble 
  loading:
  -NOBUS
  -NOEMS

/T:#tests
  Set the number of test passes, and specify which type of test 
  is to be run.  The default setting is /T:1Q.
  #         Test iteration.  Default is 1.  Use 0 for 
            continuous testing.  Never use an iteration greater 
            than 999 as this may cause memory allocation 
            errors.
  Q         Quick test.  Conducts a single-pass test of memory 
            using a random bit pattern.
  C         Comprehensive test. Conducts a multi-pass test of 
            memory using pre-defined bit patterns designed to 
            find specific types of failures.

/I:interface
  Interface to use.  The following styles are available:
  S         Visually silent.  Run with no program output.
  SA        The same as "/I:S" above plus the alarm modifier 
            A, which makes the test beep when a failure is 
            encountered.
  T         Terse (default). Runs the test as a normal command 
            line utility.  Progress and status information is 
            displayed and updated as the test runs.
  TA        The same as "/I:A" above plus the alarm modifier A, 
            which makes the test beep when a failure is 
            encountered.
  B         Boxed. The test will clear the screen and display 
            progress information in a box centered on the 
            screen.
  BA        The same as "/I:B' above plus the alarm modifier A, 
            which makes the test beep when a failure is 
            encountered.
  W         Windows.  This switch should be used when launching 
            an applet from within Windows because it follows 
            the Windows interface appearance, whereas the other 
            /I: switches are strictly DOS based.
  WA        The same as "/I:W" above plus the alarm modifier A, 
            which makes the test beep when a failure is 
            encountered.

/O:dest, format
  Specifies the output format and destination.  If no output is 
  specified, the default is O:CKPRO.RPT,A.  The following 
  styles are available:
  dest      Output destination.  This can be any valid "device" 
            or pathname.  Some common device names include: 
            LPTx, PRN, COMx, AUX, CON, and NUL.

            A pathname is any filename optionally preceded by a 
            drive and/or path.  For example, C:\DATA\CKPRO.CKD 
            and CKMEM.RPT are both pathnames.  The former 
            specifies the file CKPRO.CKD on the C: drive in the 
            DATA subdirectory.  The latter specifies the file 
            CKMEM.RPT on the current drive and directory.

  format    Output format.  The applets support report and 
            journal formats when specified using the switches 
            below:
            A   ASCII report.  After completing its test, the 
                applet generates a formatted report suitable 
                for printing. Typically, the extension .RPT 
                (for report) is used when sending this type 
                of output to a file.  Note that a report will 
                append to a file of the same name, not 
                overwrite it.
            J   Journal. This format is used mainly for 
                debugging.  It generates detailed status 
                information as the test Progresses.  Typically, 
                the extension .JNL (for journal) is used when 
                sending this output to a file. Note that a 
                journal will append to a file of the same name, 
                not overwrite it.

/N:notes
  Defines a custom note.  This string is displayed in the 
  header of the tests report.  If /N:" " is used, a blank note 
  field will be entered into the report header.


Applet Version Number---------------------------------------
  The applets will be updated when necessary to meet new 
  identification and diagnostic needs.  Having the applets' 
  version numbers is also very important when calling for 
  technical support.  To check the version number of an applet, 
  use the following command:

     CKMEM /ver


Applet Help-------------------------------------------------
  Every applet has on-screen help.  To view the help for any 
  given applet, use either of the examples below:

     CKMEM [/HELP]
     CKMEM [/?]

Specifying a memory range-----------------------------------
  Some parameters allow you to specify a memory range to
  test. Unless explicitly restricted, the range can extend 
  past the end of detected memory. The general syntax for a 
  range is as START-END where START and END can be any of 
  the following:
  ALL       Test all detected memory.
  START     Uses the first detected address for the 
            specified memory type.
  END       Uses the last detected address for the specified 
            memory type.
  xxxxxH    Specifies a hexadecimal value (rounded to a 
            paragraph boundary).
  nnK       Specifies a value in kilobytes (1024 bytes).
  nnM       Specifies a value in megabytes (1024 kilobytes)

  The end address is interpreted as "end - 1 byte." 
  Therefore, a range of "0K-640K" will test memory from 
  address 0000:0000 up to but not including address 
  A000:0000.

Examples----------------------------------------------------
  CKMEM A   This is equivalent to the following:

  CKMEM A /T:1Q /O:CKPRO.RPT,A    or, more precisely:

  CKMEM B:ALL U E:ALL X:ALL /T:1Q /O:CKPRO.RPT,A

            This command will test all available system 
            memory once (base, expanded, and extended).  It 
            will not test video memory. A report will be 
            appended to the file CKPRO.RPT in the current 
            directory.

  CKMEM X:START-32M global switches
            This will test extended memory from 1M (the 
            start of extended memory) to 32M regardless of 
            how much memory is actually installed on the 
            machine.

  CKMEM V /T:C global switches
            This will conduct a one-pass comprehensive test 
            of video memory. This syntax is generally used 
            in a batch file using CKVID to test the video 
            sub-system.

  CKMEM B:512-END /T:0C global switches
            This command line will continually test base 
            memory from 512K (the K is assumed) to the end 
            of base memory. This type of command is useful 
            when trying to track down intermittent problems.

  CKMEM parameter /O:LPT1,A /N:"New PC in the lab."
            After the test completes, a report will be sent to 
            the printer attached to LPT1.  The header of the 
            report will include the note "New PC in the lab."  
            This description will help identify the report 
            later.

  CKMEM parameter /T:1 /O:MEMORY.RPT,A /O:CKPRO.RPT,A
            This will conduct a one-pass test and send the 
            report to both MEMORY.RPT and CKPRO.RPT.

  CKMEM parameter /T:0 /O:COM1,J /O:RESULT.RPT,A
            This command line will run a continuous test until 
            the user presses [Esc]. A journal detailing all 
            test steps as they occur is sent to COM1. A report 
            is sent to RESULT.RPT when the test is finally 
            stopped.  This type of command is useful when 
            trying to track down intermittent problems or 
            problems on flaky machines.

Tips--------------------------------------------------------

1.  Repetition is the best way to find subtle or intermittent 
    problems.  Use /T:0C to run a comprehensive test an 
    infinite number of times (use ESC to stop after letting it 
    run overnight).  This technique will help find problems 
    where the wrong speed or mixed speed memory chips are being 
    used.

2.  The quick test (/T:Q) will find most problems and is a part 
    of a good burn-in suite for a new PC.

3.  Never use an iteration greater than 999.  While numbers 
    greater than 999 may be supported, they may also cause 
    memory allocation errors.

4.  To find a problem quicker, limit the test to the specific 
    memory type and address range of where you suspect the 
    problem.

5.  Memory managers, Windows, and OS/2 all limit the 
    effectiveness of the memory test.  For best results, test 
    from a clean DOS boot. This will allow CKMEM to find more 
    errors and provide a real failure address.

6.  If your system has a true EMS hardware board, you should 
    test all the memory because CKMEM only has access to 
    logical addresses.  This means that running "CKMEM E:128K-
    256K" merely tests the 128K that the EMM driver has decided 
    to map into the pages 8-16. It does not test the 3rd and 
    4th 64K blocks on the board.

7.  If your system uses emulated EMS, reboot your system 
    without the memory manager loaded and test the memory as 
    extended.

8.  To test a specific upper memory region, use "B:start-end."  
    The "U" memory type will only test upper memory blocks 
    available to DOS.

9.  EMS version 3.2 or higher is required to test EMS memory.

10. Back-filled EMS memory must be tested as base memory.

11. Only one range can be specified for each memory type.  To 
    test two different ranges in the same memory area, you must 
    run CKMEM twice.  For example, the command line:
      CKMEM X:2M-4M X:6M-8M
    is illegal.  You must run CKMEM twice:
      CKMEM X:2M-4M
      CKMEM X:6M-8M

12. Use "CKMEM V" in a batch with CKVID for a comprehensive 
    video test.

13. Use /I:SA to test or burn-in a machine without using a 
    monitor.  This will run the test without any user interface 
    but will beep the speaker any time a problem is 
    encountered.  Note that the alarm will work with any of the 
    interface switches.

14. If you want to display a custom message while running a 
    test, display the message and then use /I:SA to keep the 
    applet from displaying any output of its own.

15. Use /T:0 to run an overnight burn-in test on a component.  
    In the morning, press [Esc] to stop the test and review the 
    report.

16. Use /N to include details such as machine name, location, 
    and other identifying information in the test results.

17. When using batch files, you may want to specify to delete 
    an old journal or report before the applet runs.  Doing so 
    will provide you with smaller, more concise output files.  
    Remember, the reports and journals append, not replace, 
    files of the same name.

18. When testing on an extremely flaky machine, the PC may hang 
    just as the applet finds the problem.  When this happens, 
    use /O:FILENAME.JNL,J to send a journal to a file.  This 
    will tell you exactly where the system is hanging to help 
    you pinpoint the failure.


Warnings----------------------------------------------------

1.  Extended memory cannot be tested in OS/2, Windows, or when 
    386 memory managers such as EMM386, QEMM, or 386Max are 
    running.

2.  Some 386 and 486 motherboards are only built to address 16M 
    of memory. Testing addresses above 16M on these systems 
    will produce unusable results.

3.  Do not test upper memory blocks if your memory manager's 
    "stealth" option is active.  This will produce false 
    failures.

4.  DOS limits any command line length to 127 characters. Keep 
    this in mind when creating long commands.

5.  Avoid sending journal output to a network printer. Because 
    the output is sent sporadically during the test, it will 
    tend to tie up your printer for long periods of time.  The 
    network may also decide to split the output between other 
    network print jobs.  This makes it difficult gather the 
    results later.  Remember, journals are for debugging.  In 
    cases where you need the journal output, it is often worth 
    the effort of setting up a local printer to capture the 
    output.

