Monday, June 24, 2013

Use the Lync Server Logging Tool to Troubleshoot: 20 Tasks Every Lync Administrator Should Know

The Lync Server 2010 Logging Tool is a handy troubleshooting aid for the Lync platform. It helps administrators locate problems on Lync Server roles by capturing messages from them.

What's the Logging Tool Useful For?

Every admin knows how useful log files are. If a network line is choking or a server command is down, the log file will tell you what & where. Lync's Logging Tool does exactly the same thing. Logs are saved as .etl files in C:\Windows\Tracing (of the server it's running on) by default.

Note: Microsoft does not recommend leaving the Logging Tool running all the time. You'll drain server performance that way. Only activate the Logging Tool when you want to capture logs for a certain server.

How Do I Start it Up?

Run the Logging Tool from the Management Shell or a command prompt. By default, you'll find it at:
%ProgramFiles%\Common Files\Microsoft Lync Server 2010\Tracing\OCSLogger.exe

Remember! The server you run this on determines what information you'll capture. You will have different logs on a Director than you would on Enterprise Voice.

How Do I Configure Logging to Get What I Need?

Local options have three 'fields' if you will: Components, Levels and Flags.

Components are the components in the Lync Server role you're logging. They'll vary depending on whether you're on a Director, Edge Server, etc. You can enable or disable components after logging is started, so finding what areas you want to log won't take long.

There are 6 Levels at which you can log:

  • Fatal Errors
  • Errors
  • Warnings
  • Information
  • Verbose
  • All

These levels are inclusive; each time you move down the list, your logging includes the previous level. For example, let's say you have a communication hiccup between servers. It might be an error; it might not. You set the Logging Tool to Information – thus scanning for Information, Warnings, Errors and Fatal Errors.

(Quick Tip: Start with Warnings for your initial logs. That will focus you on anything serious. If the issues you're looking at don't show up at this stage, re-run the logs at the Information level. And so on up.)

Flags are call-outs for each component. Logging flags are useful for drilling into a component's log. Microsoft Support can even use them during advanced troubleshooting.

How do I View Log Files Once They're Captured?

The Event Trace Log (.etl) files the Lync Logging Tool creates are regular old binary files. They are NOT text files though. You must click View Log Files in the main Logging Tool window to see them.

When you do this, you'll see a list of components logged. Uncheck the boxes by any components you don't want to view logs for. Then you can output logs to text files. By default, output log files are saved in \AppData\Local\Temp\ under your Users folder. The text files will be named "OCSLogger_DateTime".

How Do I Use These to Troubleshoot?

There are two ways to troubleshoot using these logs. One, the eyeball method: Go through them one-by-one, server by server. Narrow down the levels, and focus on only a few components at a time. Otherwise you'll be there for quite a while.
Two, analyze the log files with Snooper. Snooper is a separate tool that analyzes Lync log files. It's in the Lync Server 2010 Resource Kit (download it here if you don't have it already).
With Snooper you can look at things like:

  • Traces in UCCP log files (server and client)
  • SIP Stack
  • Mediation Server
  • Database size
  • Resource diagnostics
  • PSOM/LDM
  • Recordings from Monitoring Server (if you have one)

No comments:

Post a Comment