Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the PSSDIAG Collection Utility

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you how to use the PSSDIAG collection utility, the content is very detailed, interested friends can refer to, hope to be helpful to you.

PSSDIAG is a general-purpose diagnostic collection utility, and Microsoft product support services are used to collect various log and data files. The inherent features of PSSDIAG allow it to collect performance Monitor logs SQL Profiler tracking SQL Server to block script output Windows Event Logs, and SQLDIAG output. You can customize the data set by enabling or disabling any of these log types by changing the blocking script and the $performance Monitor log for the sampling interval, and by modifying the counters and specific events captured by SQL Profiler and performance Monitor. If custom utilities or $custom TRANSACT-SQL scripts are supported, you can also run PSSDIAG if you need data other than the diagnostic types supported in native mode.

How to start PSSDIAG

PSSDIAG is expanded to the folder C:\ PSSDIAG to create on your computer. This folder will need to have enough disk space on the drive to hold the data and the log file PSSDIAG has been configured to capture. Because many different log types are collected, PSSDIAG can be configured, and the available disk space required may vary from one megabyte or two up to a few gigabytes. It is important to know that the amount of trace data sometimes collected depends on the nature and the volume on which the server handles the workload. Therefore, accurate estimates are not possible. For a large number of trace types involved, such as SQL Profiler trace data collection, make sure that PSSDIAG is running instead of from a network shared local drive or a slave mapped network drive.

Typically, you will run PSSDIAG locally on the monitoring server. However, you can configure PSSDIAG to monitor remote servers. For more information about how to run PSSDIAG remotely, see the article section "running PSSDIAG remotely or aggregating SQL Server."

Note that you may need to perform additional steps if you collect data from the cluster instance SQL Server. If you are connecting to the cluster instance SQL Server, be sure to read this article, the "How to Run PSSDIAG Remotely or on a Clustered SQL Server" section, even if PSSDIAG will run locally on the server.

Pssdiag.exe has no significant inherent security requirements. However, Microsoft Windows NT administrator credentials are also required. PSSDIAG can diagnose many (optional) configurations for capture. In addition, you must have the credentials of the system administrator for SQL Server if PSSDIAG is captured from the SQL Server diagnostics (if PSSDIAG is not running in "generic" mode using the / G command line switch). By default, PSSDIAG SQL Server pairs connections that will be authenticated by Windows; however, you can use SQL Server if you want authentication.

PSSDIAG supports several optional command line arguments. For more information about optional command line parameters, see the "PSSDIAG Command Line parameters" section. However, you usually do not need to use optional parameters. After extracting the PSSDIAG, run Pssdiag.exe on the Microsoft download center to start the data collection.

Will start PSSDIAG, which will first open, and then configure it to capture log files. This process may take several seconds. When all logs that are fully started by PSSDIAG are active, it outputs the following message to the Control Station:

On 2003-10-02, the set of 12-10-30-14. 90 PSSDIAG begins. Please press Ctrl + C to stop.

If you are running a PSSDIAG that collects data about a problem that you can reproduce at will, you will receive a message before attempting to reproduce the problem.

Do not record console sessions that have been collected beyond the PSSDIAG run and before PSSDIAG has been closed. Because PSSDIAG is a console utility and does not serve, logging out of sessions running PSSDIAG closes the utility and ends data collection. If you want, you can disconnect instead of logging out of the session running from PSSDIAG, and you can run PSSDIAG from the terminal server session.

How to stop PSSDIAG

To stop PSSDIAG, press CTRL + C to run PSSDIAG in the console window. Note that it may also indicate that the PSSDIAG shutdown itself will automatically be at a specific time. For more information about this, see the "automatically start and stop PSSDIAG" section. If PSSDIAG automatically adds files to the compressed .cab file, it may take quite a bit of PSSDIAG to complete the compression, resulting in the log file. After pressing CTRL + C, PSSDIAG sends a message equivalent to the following to the console:

On 2003-10-02, the data collection was completed by 12RV 24RU 00.69 PSSDIAG. Wait for the process to close and compress the file (this may take a few minutes)

After this message appears, PSSDIAG no longer collects additional data from your server, even though it may continue to compress previously collected data.

Before PSSDIAG shuts down completely, it may prompt you to resemble a message like:

The file in F:\ pssdiag\ output\ has been added to PSSDIAG.CAB. Delete the backup at F:\ pssdiag\ output\ backup\?

Where possible, Microsoft recommends that you answer "N" to keep the collected data files and in the $backup, you can leave the Pssdiag.cab confirmthat folderuntil output files unchanged.

Location of PSSDIAG output

Unless you specify a custom output folder with the / O command line argument, PSSDIAG will create a folder called the output run location folder. If you are running with PSSDIAG the / C0 (default) or / C1 disable automatic compression, the output file will remain in the command line arguments in this folder. You may want to compress the tool output folder of your choice if you want to upload it to the folder of Microsoft support professionals.

If you run PSSDIAG in automatic compression mode, it adds all output files to the compressed Pssdiag.cab file output folder. By default, PSSDIAG will not perform any compression. After the file has been successfully added to the Pssdiag.cab file, it will be moved to a separate folder named backup. Create a backup folder in the output folder. Note that the maximum amount of uncompressed data that can be added to an CAB file is 2 gigabytes (GB). If the data collected exceeds 2 GB, other CAB files named Pssdiag2.cab, Pssdiag3.cab, and so on will be created.

Delete PSSDIAG

PSSDIAG does not register any COM objects, copies any files to the system directory, or modifies the system registry. To complete the data collection, delete the PSSDIAG and delete the folder where the PSSDIAG file is located. PSSDIAG does not install multiple system stored procedures in the master database. These stored procedures are automatically deleted when PSSDIAG is closed.

Automatically start and stop PSSDIAG

Sometimes, it may be convenient for PSSDIAG to automatically start data collection at a specified time or for a specified period of time after automatic stop. For example, for problems you might troubleshoot, it is shown consistently at 2: 00 am. In such a case, you may need PSSDIAG to start data collection at 1: 00 a.m., and automatically turn off at 3: 00 a.m. The easiest way to start and stop data collection automatically at a specified time is to use the / Bhand B and / E command line arguments. Be sure to specify the exact date format for these parameters in the PSSDIAG Command Line parameters section. The local time on the computer on which PSSDIAG must be running is relative to the specified time.

PSSDIAG will also automatically turn off the output folder in the power Pssdiag.stop utility when a file named is found. This is useful when something happens after you want to shut down PSSDIAG programmatically, but you don't know it will happen in advance. The contents of the Pssdiag.stop file have little practical significance. One option is to use the following command in the batch file:

ECHO abc > F:\ PSSDIAG\ Output\ PSSDIAG.STOP

Influence of PSSDIAG on performanc

Because PSSDIAG is only required by api and utilities, the performance impact of PSSDIAG is usually equal to the impact of the trace on other data sets that the PSSDIAG has been configured to capture. If you capture the same trace data without using PSSDIAG manually, you will see the same performance impact.

PSSDIAG can configure it to capture a small amount of data or a large amount of captured data types that are typically customized for each event. Therefore, it is not possible to make general statements about running PSSDIAG, regardless of the type of customer log and the possible effect of the trace events collected. If you are concerned about the potential impact of the data collection on the server, contact a technical support professional to determine that it has been configured to send your capture in the diagnostic type PSSDIAG.

A task Pssdiag.exe executes directly and may take up a lot of CPU resources to automatically compress the data files in the CAB archive. This feature is disabled by default. However, it can enable the use of the / C command line argument. The / C command line arguments are discussed in detail in the "PSSDIAG command line arguments" section.

Remote or aggregated SQL Server running PSSDIAG

Used to collect data, the SQL Server PSSDIAG,Pssdiag.ini file from a remote server or cluster instance must be modified. It must specify the name that PSSDIAG should connect to the server. Tells you that you are using the name of the server so that it can be sent to your technical support professional by PSSDIAG before it is configured correctly.

If you make this change yourself, find the folder where Pssdiag.ini Pssdiag.exe is located. Open Pssdiag.ini in notepad. The first line in the file contains the string ".". Replace with the name of the remote server using the time period between square brackets. If you are collecting data from a named instance of SQL Server, note that the server name is not the name of the complete SQL Server instance. For example, for an SQL Server instance, the name is "MYSERVER\ MyInstance", if you will replace the first line "[MYSERVER]" of the Pssdiag.ini file.

Always perform a SQL Profiler trace on the server. Therefore, if PSSDIAG has been configured to collect profiler data, there are other complexities involved with running PSSDIAG remotely. In this case, Microsoft recommends that you run PSSDIAG on the local server. If you want to consider the options in the remote data collection, ask for more details used by technical support professionals when you need profiler tracking.

If the cluster instance is SQL Server, use the virtual server name instead of the computer name of a cluster node.

It is important that you can connect it to the cluster instance SQL Server, even when PSSDIAG will run locally on one of the cluster nodes, you must always explicitly specify the virtual server name in the Pssdiag.ini file.

The PSSDiag utility in this article applies only to SQL Server 7.0 and SQL Server 2000. A version has been created for SQL Server 2005. The new version is named SQLDiag with SQL Server 2005. For more information about SQLDiag, see SQL Server 2005 Books online in the "sqldiag" topic.

An example:

D:\ > cd pssdiag

D:\ PSSDIAG > pssdiag.exe

2009-07-07 17:03:44.77 PSSDIAG Collector version 9.00.000.5

2009-07-07 17pur03purl 44.77 PSSDIAG Copyright (C) 2001-2005 Microsoft Corporation

IMPORTANT: Please wait until you see "Collection started" before attempting to

Reproduce your issue

2009-07-07 17 output 03 PSSDIAG Output path: d:\ PSSDIAG\ output\

2009-07-07 17 PSSDIAG Collecting from 03VR 44.87 logical machine 3 (s)

2009-07-07 17Rom 03JV 44.89 GBSDGD00-CT01\ * Error opening HKLM key Function result:

fifty-three。 Message: The network path was not found.

2009-07-07 17pur03Swiss 44.89 GBSDGD00-CT01\ * No valid instances from which to collect

Data

2009-07-07 17pur03Swiss 44.89 GBSDGD00-CT01\ * Configuration file is corrupt or missing

2009-07-07 17pur03Swiss 44.89 GBSDGD00-CT01\ * Shutting down the collector

2009-07-07 17Rom 03JV 44.89 GBSDGD00-GB01\ * Error opening HKLM key Function result:

fifty-three。 Message: The network path was not found.

2009-07-07 17Rom 03JV 44.89 GBSDGD00-CC01\ * Error opening HKLM key Function result:

fifty-three。 Message: The network path was not found.

2009-07-07 17pur03Swiss 44.89 GBSDGD00-GB01\ * No valid instances from which to collect

Data

2009-07-07 17pur03Swiss 44.89 GBSDGD00-CC01\ * No valid instances from which to collect

Data

2009-07-07 17pur03Swiss 44.89 GBSDGD00-GB01\ * Configuration file is corrupt or missing

2009-07-07 17pur03purl 44.91 GBSDGD00-CC01\ * Configuration file is corrupt or missing

2009-07-07 17pur03purl 44.91 GBSDGD00-GB01\ * Shutting down the collector

2009-07-07 17pur03purl 44.91 GBSDGD00-CC01\ * Shutting down the collector

On how to use the PSSDIAG collection utility to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report