Self-diagnostic

A self-diagnostic was a diagnostic that a machine, system, or android performed on itself to check for errors, usually on a regular basis.

Soong-type androids like Data would initiate self-diagnostics at regular intervals to verify that all functions were within established parameters.

Data ran a self-diagnostic in 2369 after it seemed that he had lost over 90 minutes of memories as his internal chronometer was not in sync with the ship's chronometer leading him to believe that he was experiencing a malfunction. It later turned out that he had been abducted by solanogen-based lifeforms and that his systems were functioning properly. 

In 2372, after B'Elanna Torres had repaired Automated Personnel Unit 3947 for the most part, he reported that his self-diagnostic showed that he was operating at 68% of peak operating capabilities. 

Later that year, The Doctor ran a level-two self diagnostic on his program when he claimed to have suffered lapses in concentration. Kes believed that it was not a technical problem, but that he had feelings for Denara Pel. 

In 2373, after the effects of long-term use had begun affecting The Doctor, he claimed that his self-diagnostic routines have always indicated that in the event of cascade failure he should be completely re-initialized. But the crew of USS Voyager were worried that if he did that, all his memories and individualism would be erased. 

Metaphorical use
In 2371, shortly after being stranded in the Delta Quadrant, Tom Paris wanted to double date with the Delaney sisters and Harry Kim. When Kim said he didn't have time, and that had to run a communications diagnostic, Paris told him he needed to run a self-diagnostic, because he shouldn't pass up an opportunity like going out with the Delaney sisters.