In attempting to make the offline snapshots more readable, I have put together a repackaged Microsoft Windows application, which includes multiple other free third-party tools (such as 7Zip, Python, OpenSSL, Notepad++, grepWin etc.), a few PowerShell scripts (all signed), and Python scripts from my learned colleagues. During installation, the scripts are placed into the c:\tools\scripts folder, with a shortcut added to the users Send To folder. This allows the administrator to simply right click on a snapshot or downloaded log snippet, and “Send To” the Pexip log tools so create some summary reports.
The script will then extract snapshot files to C:\Snaps, create summarised call reports of the first 20 support log files that appear in the snapshot plus a system overview, then display these in a Notepad++ tab. If you send a downloaded support log snippet to the Pexip log tools, the script will create a call summary for that file, which gets placed into a .\parsed folder in the current working folder. At the same time, the log files that are processed are translated into more human readable versions, similar to how you see the support logs via the Pexip GUI interface.
So far I have only built this for Windows platforms, and I am NO developer….. This started life as a script to help me with my day to day job, but as a lifelong Windows user I have been “GUI’fied” (hey you know what you know 😊), so rather than use the CLI with tools such as grep and sed, I created these scripts to make things easier for me. It turns out that it may make your life as a Pexip administrator simpler too.
Essentially, it helps make the Log files readable and was designed primarily to help me analyse call flows – of course the first part to analysing them is to make them readable, but it won’t necessarily help beyond this ;). If you are interested in troubleshooting within a Pexip Infinity deployment, and how Pexip support personnel use these logs to determine issues, then please sign up for the Troubleshooting and Logreading class at https://www.pexip.com/pexip-academy-and-training-programs. Please ensure you read the description of the course and the pre-requisites to make sure this is for you.
In the expanded snapshot, there are multiple other files that may need unconcatenating (as each log line is joined with a ^M making the raw file difficult to read). For example, other support log files not included in the initial 20 that are analysed (you can use grepWin (installed during setup) as a GUI grep tool to search through the files for specific Call-IDs, then process all of them at once), or the OSStatus log (that contains 5 minute chunks of TOP, Netstat etc., from each of the nodes). Each of these can be processed the same way, by simply right clicking and sending to the Pexip Log Tools.
To download, install and use the tools, see:
- A 12-minute video on installing this and using it is available here - https://youtu.be/LwmTbwgBa3k (spoiler Next, Next, Next, Finish),
- To use the tool, a shortcut is added to the Send To folder, so just right click on the file(s) you want to process and Send to -> Pexip Log Tools,
- The tool is available here: https://dl.pexip.com/resources/tools/PexipLogTools.exe
To Update the underlying scripts (in order to better handle newer Pexip versions):
- Run the following script file: c:\tools\scripts\Get-Pexscripts.ps1
- WARNING: this will actually break the script to shows the call reports (logreader). You need to then run the following to install some additional Python libraries: pip install lxml
- BONUS: If you want to show some additional good stuff in the system overview report (DBsummary) in relation to what certificates are installed an applied to the nodes, please run the following to install some more Python libraries: pip install pyopenssl
- The applications require local administrative privileges in the Windows system for installation.
- The PowerShell scripts require a minimum of PowerShell version 4 to run. Windows 7 shipped with PowerShell version 2 (which is positively ancient) and is not upgraded with Windows updates. You should download and install the latest Windows Management Framework (currently 5.1, which includes PowerShell) from https://www.microsoft.com/en-us/download/details.aspx?id=54616. You can see the PowerShell version you are using by opening a PowerShell window and entering $PSVersionTable.
- When you download a support log snippet from Pexip, you will see this saved as support.txt, but you already have multiple file in you Downloads folder, then the OS will rename this support (1).txt, support (2).txt, etc. The file MUST end in support.txt, so I generally add the Call-ID to the beginning of the file name, just to distinguish one file from another. Also ensure there are no space in the file name, for example a file name 1234abcd_support.txt.
- The code doesn't handle spaces in the path or file name. Sorry about that, I need to make this better.