Skip to content

Frequently Asked Questions

Jack Li edited this page Jan 9, 2017 · 1 revision

How do I tell PSSDIAG to shut down automatically after a certain amount of time?

You can use the /E command line parameter. For example: PSSDIAG.CMD /E21:00:00 - Shut down at 9pm (current day, or following day if current time is >9pm) PSSDIAG.CMD /E+10:00:00 - Start, collect data for 10 hours, then shut down automatically

I need to collect data for a long time but there isn't enough disk space. What can I do?

use command like "PSSDIAG.CMD /E 03:00:00 /L /Q /N2" to like pssdiag to recycle at certain time

I want to start pssdiag later

If you want to delay the start of the PSSDiag collection for a specific amount of time (say 3 hours) from now you can use PSSDiag.CMD /B +03:00:00

I need to collect data from an x64/x86 SQL instance. Is there anything I need to do differently?

Be sure to select the CPU platform (see the 32-bit Pentium, Itanium, or x64 buttons on the left pane of Diag Manager UI) before making other selections -- selecting a new platform loads new defaults for the rest of the form. Note that you should select the platform that matches the version of sqlservr.exe that you are targeting. For example, for a 32-bit SQL instance running in the WOW64 layer on x64 Windows, you should select 32-bit Pentium/x86. Select the AMD64 option only for native x64 SQL 2005 instances.

PSSDIAG was killed abruptly with kill.exe/taskman, orphaning the profiler trace. What do I do?

  1. Run the following to stop any active profiler trace EXEC tempdb.dbo.sp_traceXX 'OFF' -- where XX is the version number 10 for 2008 & R2, 11 for 2014, 12 for 2014, 13 for 2016
  2. ALTER EVENT SESSION [pssdiag_xevent] ON SERVER STATE = stop
  3. Run "logman query -ets" from a command prompt to identify any orphaned ETW perfmon logs. Run "logman stop -ets" to stop them (replace "" with the appropriate trace name).
  4. Kill sqlcmd.exe processes that were not launched by you manually

Can I run PSSDIAG on a remote machine to minimize the load on the server being monitored?

If you are not capturing a profiler trace, yes, you can run the collector on a remote machine. If you need to capture a profiler trace, it is srongly recommended to run the collector on the server being monitored. SQL Server itself always captures the profiler trace, so there is no way to offload profiler trace-related work to a remote machine. Because the primary performance impact of data collection is typically caused by the profiler trace, and because the trace is always captured by sqlservr.exe regardless of where PSSDIAG is running, there are generally no performance advantages to be gained by running the collector remotely.

How do I import the perf stats script output and profiler traces that PSSDIAG collects?

The data collected by PSSDIAG (.trc and .out files) can be imported by SQL Nexus into a SQL Server database.

PSSDIAG is too "heavy". My server slows down when we are capturing data.

The set of data that PSSDIAG/SQLDIAG captures is completely configurable. The impact of data collection is equal to the combined impacts of the various log types that you configure for collection using the Diag Manager to capture (the collector itself has a negligible impact on the machine), which means that if a PSSDIAG/SQLDIAG data capture hurts performance on a server it is almost certainly due to the log types and trace events that were selected.