Diagnostic Testing

Ensuring the reliability and stability of a safety-critical system is a necessity when considering the socio-economical costs of a system failure. The consequences of a failure can be benign such as an intermittent disk failure causing few corrupted entries in a log file, or it can be catastrophic such as a memory failure causing the navigation system of an autonomous vehicle to halt. Including diagnostic tests as part of the normal operation of the device allows chronic or intermittent problems to be discovered before a more catastrophic failure can occur.

PSYGIG Triage SDK provides an extensive suite of diagnostic tests designed to exercise and stress the most common subsytems of an embedded device.

The Diagnostic Testing API includes many features suitable for integration into embedded systems:

  • Works out-of-the-box; just run psydiag
  • Full diagnostic test suite:
cpu CPU
gpu GPU
ram RAM
disk Storage devices
network Network
  • Simultaneous testing of all subsystems to fully stress the device as a whole
  • Customizable and extensible diagnostic tests
  • Track diagnostic results with built-in integration in the PSYGIG diagnostics platform
  • Generate a diagnostics HTML report

注釈

The Diagnostic Testing feature is a work-in-progress. Please if you are interested in beta-testing this feature.

Running the diagnostics tests

Simply run the included standalone binary psydiag to run the full diagnostic suite. For example:

psydiag -f json -o diagnostic-results.json

See psydiag man page for a complete list of options.

Using PSYGIG SDK API

The Diagnostic Testing API can be accessed by including a single header file and linking the libpsygig shared library. See Advanced Setup - Building your application with libpsygig for details.

Running the RAM Diagnostic Test

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include <psygigsdk.h>

int main(int argc, char **argv)
{
    psygig_agent_handle     pah;  // handle to psygig agent

    /* ... Initialize code omitted for simplicity ... */

    // Run RAM diagnostic test
    psygig_diag_result diagres;
    rc = psygig_diag_run(pah, PSYGIG_DIAG_RAM, &diagres);

    /* ... Cleanup code omitted for simplicity ... */
}

Sample diagnostic JSON results

{
    "DiagResults": {
        "Type: "RAM"
        "StartTime": 1547534065,
        "StartTimeOfDay": "2019-01-15 15:34:25",
        "Result": "PASS"
    }
}