I have been working with lots of customers to try and help them better aid there selves when it comes to client errors and error codes? It can be very difficult for some people to really understand what the errors are and what are the common trends in my organisation. The App-V client log parser gives you loads of great methods of sourcing information.
The client log file has a wealth of information, but very similar to the server log file in can be difficult to read in its native format.
However the Client Log Parser makes compiling and looking at the sftlog.txt much more easier!
The core thing you are going to need today are;
1) The App-V Client Log file
This can be identified by looking at the following regkey for App-V 4.5
The Log files are located by default to;
%ProgramFiles%\Softricity\SoftGrid for Terminal Servers\sftlog.txt
%ProgramFiles%\Softricity\SoftGrid for Windows Desktop\sftlog.txt
C:\Documents and Settings\All Users\Application Data\Microsoft\Application Virtualization Client\sftlog.txt : Windows XP, Windows Server 2003
C:\ProgramData\Microsoft\Application Virtualization Client\sftlog.txt : Windows Vista, Windows 7, Windows Sevrer 2008
2) Microsoft Excel (Now I use Excel 2007)
3) Application Virtualization Client Log Parser Utility : http://www.microsoft.com/downloads/details.aspx?FamilyId=72876C60-3A87-4705-B722-F73EB56219BF&displaylang=en
So what is the Client log parser utility? You can use the fields and values contained in the output file to filter information obtained from the log files. The output file generated by the application log parser utility contains the following fields: System, OS, Build, Date, Time, Module, Log Level, hApp, App, User, Thread, and Message. The information contained in the output file can also be imported into Microsoft Excel for subsequent evaluation. This log parser simplifies the task of looking through log files, being able to filter by log level, build report, launch failures, mini-dumps, minimum disconnected operation mode entries and more. Afterwards, the appropriate party can import the data for analysis and/or utilization.
So lets have a deeper look! and see how we might use this tool?
1) Firstly We need to download the client log parser and extract it locally on our client pc. In this instance I have extracted it to my desktop in to a folder called \MSAppVirt_ClientLogParser_Setup_220.127.116.1100.
1a) For the purpose of this example I have also created an empty folder called results located on the root of the c: drive (c:\results), this will be used to store my outputs from the log parser.
1b) I have also created a Folder on the root of my c: drive called “Logs” (c:\logs). This will be used to place all my clients sftlog.txt files for parsing.
2) So now I have the tool lets have a look at the help by running AppVClientLogparser.exe /? from a command prompt. By executing this command the Applications licensing terms are shown. Agree to the terms and conditions
The output from the this command gives us
This is a really handy source of information to know about, as we can always go back to this and refer to the information.
3) Now that we know about the tool and where the help file is we want to look at the data that it can expose. From the log files location from your client machine in your estate, collect these and place them in the c:\logs location. You may well have to rename the files from sftlog.txt to %clientname%_sftlog.txt so that they can all sit nicely into the c:\logs folder.
4) Once all your log files are gathered we can run a few commands against this. From the command prompt run the following command;
4a) AppVClientLogParser.exe /P:c:\logs /O:c:\results\errors.txt /LF /N:5
This command configures the Application Virtualization Log Parser to parse for launch failure entries in the directory c:\logs that were logged within the previous 5 days. The results will be put into a file named errors.txt. The fields in the output file will be delimited by “|”.
4b) AppVClientLogParser /P:C:\logs /N:5 /M:2 /R /O:C:\results\error.txt
This command configures the Application Virtualization Log Parser to parse for entries in all files in the c:\logs directory that date within the previous 5 days, for log level matching “Error.” When the log contains a return code, the return code is placed in the return code field of the output file error.txt.
4c) AppVClientLogParser.exe /P:C:\logs /N:100 /LT /o:C:\results\launch.txt
This command configures the Application Virtualization Log Parser to parse for entries in all files in the c:\logs directory that date 100 days back from today for start times. It will report back the elapsed time for an application to start.
5) In the Results folder located at c:\results, we should now have 3 .txt files.
errors.txt which is the output from 4a
error.txt which is the output from 4b
launch.txt which is the output from 4c
So that's it from the log parser. It has transformed our original sftlog.txt files from multiple machines into a structured specific log for the issues, for example
6) Now that we have our specific issues and outputted logs, we want to turn these into something more tangible. We will use Microsoft Office Excel 2007 to create these. Open Excel
7) Click the “Orb” and than select Open, In the Open dialogue change the file type to “All Files” and now browse and locate your App-V parsed log file and then select “Open”. In this example we shall use the log file from 4.b (error.txt).
8) A new dialogue box will Appear called the “Text Import Wizard – Step 1 of 3”, when this wizard opens select the option for “Delimited” and then click Next.
9) In the “Text Import Wizard – Step 2 of 3” check the check box for “other” and add a “|” into the box (you should see some lines now break the data in the data preview) and then click Next.
10) In the “Test Import Wizard – Step 3 or 3” click Finish.
11) Your data will now appear in the excel tables
12) Now that the data is formatted nicely this is where the fun can really start!!!! There is a feature in Excel Called Pivot tables and it makes life so much easier to review the log files, look at trends, see data over a month period!
So lets get started!
13) Select all your data, you can do this by clicking the top left corner square, Then select the Insert TAB in Excel, When in the insert TAB click the Pivot Table Button.
14) In the Create PivotTable Click OK.
15) A new sheet will open and this is where you can create some great Pivot Tables and review your data
16) Once you get to this stage you can do some great stuff! And its totally down to you how you want to play with the data!
You can drag items from the PivotTable Field List to the fields underneath it;
As we can see in the above it has displayed to us all the error codes from the log files that we specified.
We can also sort the data to show the highest to the lowest return of error codes and some other cool search option!
17) You can than delve deeper on that particular message from the pivot table, in the value fields you can double click on the value to give you a break down of the values from the log file. The highlighted section below is an example to where you can double click;
The Results for this will be;
Now I know this error code “0A-00000163” really well and it relates to When you try to open a small application package that has been compressed, it may not start, and you may receive a "0A-00000163" error. Typically, the application package is less than 1 megabyte (MB).
This is actually fixed in CU1 but if i did not have CU1 (we can see that we are using build 18.104.22.1685 which is 4.5 RTM) and this was causing me a problem I could identify the application, in this case its the “Virtual Machine Remote control Client 1.1.629.0” and unselect using compression in the sequencer.
I shall do another post soon on the launch times which is one of my most favourite bits of information to return to a customer!