Please note:
You can download the required file from the Citrix downloads website by visiting the following link: https://www.citrix.com/downloads/citrix-tools
StressPrinters Version 1.3.2
Created date: 03/30/2006
Modified date: 6/19/2013
Description
Many printer driver problems in Terminal Services/Remote Desktop Services environments revolve around poor multi-threaded performance, which in turn can cause print spooler instability. Problematic multi-threaded performance is usually exposed when multiple users connect to a Terminal Server simultaneously using the same printer driver. Symptoms include the failure to autocreate client printers, increased thread count of the printer spooler and/or Citrix Print Manager services, and possibly the unresponsiveness and/or unexpected termination of these services (stop responding).
This tool can be used to simulate multiple sessions auto-creating printers using the same printer driver.
It can also be used to compare the following among various drivers:
Note: The current version of the tool does not test concurrent printer capabilities, settings, or actual printing calls, which are also possible causes of failing to print. Therefore, good/passing stress results do not always mean that printers are actually working or certified.
Prerequisites
The printer driver you want to test must be installed on the system. You can check for installed drivers by performing the following procedure:
There must be a valid port to connect the printer to (for example, LPT1:). It is acceptable to connect multiple printers to the same port for testing purposes. You can check for available ports by performing the following procedure:
Installing StressPrinters
Copy and extract the StressPrinters.zip file to a directory on a test system. The program does not require any Citrix software installed and should never be run on a production server during production hours.
Note: Extract the StressPrinters.exe, addprinter.exe and/or StressPrinters64.exe, and addprinter64.exe to the same directory (for example, the desktop of the server). StressPrinters.exe is the GUI that calls AddPrinter.exe.
How to Use StressPrinters
Citrix TV - How To: Use the Stress Printers Tool
The parameters are defined as:
Best practices:
Annotated Log File
Following is the annotated log file example corresponded to the stress test depicted above (comments are in bold):
Launching cmd.exe /C addprinter.exe -name "HP LaserJet 4000 Series PCL" -port "LPT1:" -driver "HP LaserJet 4000 Series PCL" -proc "Winprint" -conc 1 -iter 1 -delay 0
CMD process has been created. PID: 118c (4492)
Launching cmd.exe /C addprinter.exe -name "HP LaserJet 4050 Series PCL" -port "LPT1:" -driver "HP LaserJet 4050 Series PCL" -proc "Winprint" -conc 1 -iter 1 -delay 0
CMD process has been created. PID: 1184 (4484)
--- Begin Log for "HP LaserJet 4000 Series PCL" ---
AddPrinter Ver 2.01 (c) Citrix 2006-2007 (pid: 4108)
WARNING: thread id 0x468 may be stuck on AddPrinter for printer HP LaserJet 4000 Series PCL1!
Time elapsed: 6 seconds. Done with 0 errors.
>>> The warning can be ignored because the log for HP LaserJet 4000 Series PCL stress test reports elapsed time less than 1 minute timeout and 0 errors.
--- End Log for "HP LaserJet 4000 Series PCL" ---
--- Begin Log for "HP LaserJet 4050 Series PCL" ---
Logging is in progress...
>>> This is an indication of the ongoing stress test for HP LaserJet 4050 Series PCL driver. Had not been finished by the time the log was saved.
--- End Log for "HP LaserJet 4050 Series PCL" ---
Stress tests have not finished for the following drivers after 1 minutes(s):
HP LaserJet 4050 Series PCL
>>> The list of printer drivers whose tests had not been finished when the timeout of 1 minute expired.
Command-line Usage
The package contains command-line versions addprinter.exe and addprinter64.exe that you can use to test individual printer drivers manually.
For example, the following command adds three printers with the base name test (test1,test2,test3) using the HP LaserJet 4 print driver with a delay of 500 milliseconds between the printer being added and deleted for a particular thread. It also only prints status if any of the AddPrinter() or DeletePrinter() calls fail and keeps the three printers that are created during the final (third) iteration of the test.
addprinter.exe -name "test" -driver "HP LaserJet 4" -conc 3 -iter 3 -delay 500 -keep –quiet
Uninstalling StressPrinters
To uninstall StressPrinters, delete StressPrinters.exe, addprinter.exe, StressPrinters64.exe, and addprinter64.exe.
More Information
By default, if an AddPrinter() call fails while auto-creating printers on a system, the following event is created in the Event Log:
"Source: MetaFrameEvents
Category: Printer Management
Event ID: 1116
Description: Printer auto creation failure. Reason: AddPrinter() failed with status 0x709. Client name: ClientName Printer name: PrinterName Port name: PortName Driver name: DriverName Print processor: (WINPRINT)"
Where:
• Reason is the ntstatus code of failure.
You can leverage the NET HELPMSG facility as shown above to translate the code into a readable error message.
• Client name is the client name of the client that attempted to autocreate the printer.
• Printer name is the name used when attempting to autocreate.
• Port name is the name of the port used when attempting to autocreate.
• Driver name is the name of the driver used when attempting to autocreate.
• Print processor is the name of the print processor used when attempting to autocreate.
Note: Auto-created printers always use the WINPRINT print processor.
Contact Information
Questions? Concerns? Send any feedback for this tool to supporttools@citrix.com.
Disclaimer
This software application is provided to you "as is" with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.
Please note:
You can download the required file from the Citrix downloads website by visiting the following link: https://www.citrix.com/downloads/citrix-tools