VirtualizationAdmin.com

Smonitor for Metaframe and Winframe-A utility to reset down listener ports

by Peter Ghostine of Emergent Online

There are many causes of down listeners or winstations in Citrix Products. The below smonitor utility solves some of these issues. It has been found that hung print jobs will hold listeners in the down state. See the following document for a batch file that resets the print spooler every two hours. Also it has been found that the combination of a seamless window connection and the use of the idle timeout cause the problem. When the seamless connection has an idle timeout, the session does not disconnect properly. The solution is to stop using the idle timeout until a solution is found.
Also disable ALL popup messages. A leftover popup when a session logs off will also hold a session in the down state. See the following document on how to disable them. For Post SP4 Metaframe there is an MS hotfix available that also solves some down listeners at /files/winspool.zip.

Please note that this utility has been updated for Metaframe and is now a commercial product called EOL ICA Watchdog which also monitors orphaned autocreated printers as well as down port listeners. You can find information on this product and download it from here.

DISCLAIMER: This utility requires editing the registry. Be certain and do an rdisk /s before doing any registry changes. If you dont know what you are doing in the registry dont mess with it. All disclaimers apply. Neither The Thin Net or any other parties mentioned on this page will be responsible for any damage you do to your system. Read our copyright notice thorougly so that you understand this.

The Server Winstation/Listener Port Monitoring utility (smonitor) is designed to periodically capture and reset Winstations (WinFrame) and listener ports (Windows Terminal Server) which:

  • Inexplicably transitioned from "Listen" or "Idle" (Winstations)  state to "down" state.
  • Failed to transition back to "Listen" or "Idle" (Winstations) state upon a user logoff / disconnect.

First click here to download the file Smonitor.zip

Follow the below instructions to install Smonitor.zip

Installing Smonitor:

  1. Unzip the smonitor.zip file in a temporary directory(note:do not unzip to a directory called smonitor).
  2. Run change user /install from a command prompt and then execute setup.exe from the directory you unzipped the file to install the utility.
  3. Go to the system32 directory (i.e., m:\winframe\system32 or m:\wtsrv\system32 or equivalent)
  4. Execute the following command: instsrv smonitor m:\winframe\system32\srvany.exe (or whatever your drive and directory are)
  5. Run REGEDT32 and go to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/smonitor
  6. Create a key and call it: Parameters
  7. Under the Parameters key you just created, create a value of type REG_SZ and call it: Application

    Assign its value to be the full path to smonitor.exe (i.e., m:\smonitor\smonitor.exe or m:\program files\smonitor\smonitor.exe, etc)

  8. Edit the smonitor.ini file in your WinFrame or WTSRV directory and set the FileLoc to point to the full path of your WinFrame or WTSRV directory.(if this file winds up not in your Winframe or WTSRV directory look under your users/default/winframe directory or search the drive for it. Edit it and copy it to winframe or wtsrv directory)
  9. Go to Control Panel, Services, and start the smonitor service.

The utility captures ports in the down state and resets them. A log file called slog.txt is generated in the WinFrame (or WTSRV) directory with entries related to ports in down states and the date and time the utility detected them. The smonitor.ini file also contains an interval parameter. By default, it's 60 seconds and cannot be set higher than that. The utility hardly imposes any overhead (CPU or memory) on the system at all.

I will continue improving the utility and any feedback is appreciated. I can be contacted as follows:

  • Peter Ghostine (pghostine@go-eol.com)
  • Citrix Systems Platinum Reseller
  • Emergent Online, Inc. (www.go-eol.com)
  • 11260 Roger Bacon Drive, Suite 105
  • Reston, VA 20190
  • Phone: 703-709-9210
  • Toll Free: 877-WINFRAME
  • Fax: 703-709-9219

Receive all the latest articles by email!

Receive Real-Time & Monthly MSTerminalServices.org article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become an MSTerminalServices.org member!

Discuss your Terminal Services & Citrix issues with thousands of other SBC experts. Click here to join!

Solution Center