Nao-diagnostic is a command-line tool to compile useful files for NAO and PEPPER diagnostic.
This article explains how to generate diagnostic files into a single archived file.
When locally connected to the Robot via SSH, the nao-diagnostic command line generates an archived file, named: nao-diagnosis_[date of creation].tar
It is saved in the permanent memory of the Robot, in the /home/nao/diagnosis directory.
The structure of the archive depends on the NAOqi version.
It contains a lot of data about the robot state, including log files: