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 Mobility IoT 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 |
|
GPU |
|
RAM |
|
Storage devices |
|
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 data platform
Generate a diagnostics HTML report
Note
The Diagnostic Testing feature is a work-in-progress. Please contact us 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 C/C++ SDK API¶
The Diagnostic Testing API can be accessed by including a single header file
and linking the libpsyiage
shared library. See Advanced Setup - Building your application with libpsyiage for details.
Running the RAM Diagnostic Test¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <psyiage/psyiagesdk.h>
int main(int argc, char **argv)
{
psyiage_handle pah; // handle to psyiage instance
/* ... Initialize code omitted for simplicity ... */
// Run RAM diagnostic test
psyiage_diag_result diagres;
rc = psyiage_diag_run(pah, PSYIAGE_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"
}
}