Many at times while working with 'BMC Support' they ask for patrol agent diagnostics aka PDiags.
PDiags I would say a powerful tool and provides detailed information about the environment/server where agent is running.
Here is the list of all information it collects:
1. PatrolAgent and Operating System version details.
2. Hostname, IPAddress port where agent is running
3. $PATROL_HOME, $BEST1_HOME and PERFORM_HOME
4. Agent defaultAccount and encrypted password string
5. Console login account, if connected
6. Agent accessControlList
7. Contents of /etc/patrol.d/patrol.conf
8. Output of %SET displaying agent tuning variables:
9. Output of %DUMP KM_LIST
10. Output of %PSLPS
11. Output of %DUMP CONSOLES
12. Operating System environment variable; output of env command.
13. PatrolAgent default configuration; config.default file content
14. PatrolAgent current configuration; output of pconfig +get (for the agent instance where you are running PDiags)
15. Output of %DUMP ALL
16. PatrolAgent error log files $PATROL_HOME/log/*.errs.*
17. Log listing for $BMC_ROOT dir.
18. bgscollect and best1 error log files.
19. List of installed patrol packages from archive and histtory (insthist)
And many more
1. Output of %DUMP KM_LIST
2. Output of %PSLPS
3. Output of %DUMP CONSOLES
4. Operating System environment variables and Patrol specific env variables
5. List of installed patrol packages from archive and histtory (insthist)
6. PatrolAgent default configuration; config.default file content
7. PatrolAgent current configuration; output of pconfig +get (for the agent instance where you are running PDiags)
8. Content of PatrolAgent error log files.
And many more
So it is always good to share this to share detailed information about the patrol agent environment.
Here is a video that includes the steps to collect PDiags, and below we have documented those steps as well.
Here are the detailed steps to collect PDiags:
send us the "pdiags" as follows
a. Double click on the problematic agent hostname icon -> Right click the Unix OS icon -> Knowledge Module commands -> Debugs & Diagnostics -> Click Capture Unix Diagnostics
b. When you run the task, several GUIs will pop up.
On the first, select all three check boxes.
On the second, select the 'ALL' check boxes (second to last).
On the third, select all check boxes (except for the 3rd check box).
c. Click on Accept button and please send the file /tmp/PDiag.log and /tmp/PDiag.tar files across.
- Gathering patroldiags from a PATROL Classic Console
›Right Click on the PATOL Agent => KM Commands => PSL Task > Select the 'Open File' icon (2nd from left) and open the %PATROL_HOME%\lib\psl\patroldiags.psl file => Select Apply
›This will create file diag-<hostname>-<port>.log in the PATROL_HOME\log directory
- Gathering patroldiags from a PATROL Central Operator Windows Edition Console
›Right Click on the Managed System => Knowledge Module Commands => PSL Task => Click on the paper icon in the Value box => Click on the file open icon (yellow folder) > locate %PATROL_HOME%\lib\psl\patroldiags.psl and click Open to bring the psl script into the task window => Click on the Save icon => Close the task window by clicking on the x at the top right of the task window => Click on the Submit button in the Knowledge Module Commands window
›This will create file diag-<hostname>-<port>.log in the PATROL_HOME\log directory.
- Gathering patroldiags from the Windows Command line
›Save patroldiagscl.lib to %PATROL_HOME%\lib\psl on the PATROL Agent machine.
›From a dos prompt start patrolcli:
PCli% connect <hostname> <port>
PCli% execpsl "1; requires patroldiagscl; diags();"
›after a few seconds the following will appear at the command prompt:
›issue the following to determine if it was successful or not:
›PCli% getvar /diagsresult
›which should return message:
›PATROL Diags has completed.
›This will create file diag-<hostname>-<port>.log in the PATROL_HOME log directory
›will terminate patrolcli
<This works on UNIX too>
Same instructions are documented in below BMC Knowledge Article as well:
Now a days the latest version of Agent and KM is shipped with patroldiags.psl, but I am attaching it here in case its not there.
Hope this helps..
Please add your comments if we should add/modify something in this document.