The PI AF Diagnostics (AFDiag) utility is a command-line utility that you can use to enable or disable PI AF server features and perform other administrative functions. The utility makes a direct connection with the associated SQL Server database and requires the SQL Server sysadmin or db_afadmin role.
AFDiag is located in the \PIPC\AF folder.
2 of 2 people found this helpful
There are PIDiag.exe and AFDiag.exe. Basically PIDiag works for PI Data Archive and AFDiag works for AF System.
PIDiag is located in %PISERVER%\adm\pidiag.exe. if you run pidiag /? from command prompt, it shows all parameters.
Also here is a live library link.
From my experience, useful commands are
pidiag -host -file 'Path' : generate MSF file
pidiag -tz : shows timezone
pidiag -crash : subsystem crash happens to check the creating crash dump.
Maybe you are asking AFDiag and here is a live library link.
Previously I used
AFdiag /reindex : Using AF, SQL will have fragmentation. Reindex affect to the stored data and affects performance too.
AFdiag /resetadministrator : if you delete admin account, you can fix it by this
AFdiag /newID : It generate new ID for AF
AFdiag /deleteeventframes : Delete event frames
Anyway, these tools are kind of handy if you know how to use it.