Local Monitor

Overview

Local Monitor is a thin client application that monitors printing using MS Windows Print Spooler on a workstation or a print server.

  • All printer ports are monitored.

  • Ports can be excluded by the IgnorePortsN configuration options.

  • Default configuration excludes common SafeQ ports, comon 'print to file' ports, and all SMB printers (port names starting with '\\').

The following diagram depicts how Local Monitors accounts print jobs sent to directly connected printers (blue) and sent to SMB printer (orange) under normal circumstances.

images/download/attachments/21955676/local_monitor.png

Local Monitor uses Windows Print Spooler accounting method (see: Print tracking methods). Accounting information is sent to a SafeQ at scheduled intervals; Local Monitor does not keep persistent connection to the server. If the server is unavailable, Local Monitor stores accounting information into a local cache and delivers it to the server once the connection is restored. Cache is kept even if the system is restarted and is able to keep data as long as disk storage space is available.

Installation

Supported operating systems

  • MS Windows 32 bit (XP/Vista/7/8/8.1/10)

  • MS Windows 64 bit (XP SP3/Vista/7/8/8.1/10)

  • MS Windows Servers 2003/2003R2/2008/2008R2/2012 (32bit/64bit)

Application log

Important information about installation and application run can be found in system temporary folder (usually C:\Windows or C:\Windows\Temp) in file SQLocalM.log.

Workstations installation steps

  1. Log in to Windows workstation as an administrator (or a user with administrator rights).

  2. Go to the directory with Local Monitor installation files.

  3. Preconfigure Local Monitor by editing Install.reg file. The list of all configuration options are described in the section "Configuration options".

  4. Start install.exe/install64.exe executable

Workstation uninstallation steps

  1. Log in to Windows workstation as an administrator (or a user with administrator rights).

  2. Go to the directory with Local Monitor installation files.

  3. Start install.exe/install64.exe executable with parameter "-u".

Microsoft Cluster Server installation (MSCS)

  1. Log in to server node as an administrator (or a user with administrator rights).

  2. Go to the directory with Local Monitor installation files.

  3. Preconfigure Local Monitor by editing Install.reg file.

    1. Set option "MonitorServer"="\\\\ClusterName" with appropriate cluster name.

    2. Set option "LocalIP" to IP address of cluster.

    3. Set option "LMHost" to unique name.

  4. Install YSoft Local Monitor service by starting install.exe/install64.exe.

  5. Change service status from "started" to "stopped".

  6. Change service "startup type" from "automatic" to "manual".

  7. Ensure that the service (running by default under the SYSTEM account) has credentials to access monitored printers (setup service to run under administrator account).

  8. Repeat steps 1 - 7 for remaining nodes in the cluster.

  9. Using the Cluster Administrator, add a new resource as a "Generic service".

    1. When asked for service name, enter "SQLocalMon".

    2. When asked for service registry keys, add "SOFTWARE\Y Soft Corporation\SafeQ\Local Monitor" to the list.

  10. Bring created resource online.

Microsoft Cluster Server uninstallation

  1. Bring created resource offline.

  2. Delete resource using Cluster Administrator.

  3. Start install.exe/install64.exe executable with parameter "-u" on each node.

 

Configuration

Local Monitor installation package includes configuration file Install.reg, which must be configured prior installation. Description of configuration options follows.

Configuration option name

Description

Default value

Interval

Interval for checking new jobs in printer queue in seconds.

dword:0000001E (30s)

AcceptComplete

Take into account all jobs, which have status 'SENT_TO_PRINTER'.

True - dword:00000001
False - dword:00000000

dword:00000001

Server

IP address or DN of SafeQ server. The information about jobs will be sent to this IP address.

127.0.0.1

ServerPort

Port, which will be used for communication with SafeQ server. The same port must be defined on the SafeQ server side.

9100

LocalIP

IP address of local interface from which the Local Monitor connects to SafeQ.

Use this option when installing on Microsoft Cluster Server (set IP of cluster).

 

LMHost

Name of workstation, which will be reported as a source computer of the printed jobs.

Use this option when installing on Microsoft Cluster Server.

 

IgnorePorts1, IgnorePorts2, ...

Local Monitor will ignore outputs on these ports.

 

MonitorPrinter1, MonitorPrinter2, ...

Local Monitor will monitor this printer even if a port of the printer is in the list of ignored ports. Specify the printers name in Windows.

 

MonitorServer

Local Monitor will monitor printers on specified server instead of local printers.

Note: This option is especially useful for monitoring printers on Windows Cluster server.

 

ReportEmptyJobs

Some printer drivers create empty print job in Windows spooler and send the print job data directly to printer.
Do not report empty print jobs - dword:00000000
Allow reporting of empty print jobs - dword:00000001

dword:00000000

ParserDPI

Specify DPI for internal parser.

72

DisableParser

Disables/enables analysis of job files for accounting using internal parser.

Enable - dword:00000000
Disable - dword:00000001

dword:00000001

CurrentUserNameFormat

How the Local Monitor should report the user name. If no input is given, than just standalone user name is reported (default).

DS_FQDN_1779_NAME                  CN=someone,OU=Users,DC=Engineering,DC=Fabrikam,DC=Com
DS_NT4_ACCOUNT_NAME             Engineering\someone
DS_DISPLAY_NAME                       Jeff Smith
DS_UNIQUE_ID_NAME                    4fa050f0-f561-11cf-bdd9-00aa003a77b6
DS_CANONICAL_NAME                  engineering.fabrikam.com/software/someone
DS_USER_PRINCIPAL_NAME         someone@engineering.fabrikam.com
DS_CANONICAL_NAME_EX            engineering.fabrikam.com/software\tsomeone
DS_SERVICE_PRINCIPAL_NAME    www/www.fabrikam.com@fabrikam.com
DS_SID_OR_SID_HISTORY_NAME  S-1-5-21-397955417-626881126-188441444-501
SAFEQ_SID_FORMAT                     01:05:00:00:00:00:00:05:15:00:00:00:23:2e:93:00:5e:fc:94:30:e5:fd:ce:87:63:04:00:00
Note: Specifying any of above options may report currently logged on user as a job owner

 

ParseUserFromJobTitle

This option allows parsing of job user from the job title.

Enable - dword:00000001
Disable - dword:00000000

dword:00000000

ParseUserFromJobTitleDelimiter

Defines delimiter of username parsed from job title.

Standard Perl compatible regular expression is used.
Default setting uses as delimiter one of these signs .:_/\,backslash must be defined as \\\\.

[.:_/\\\\]

ParseUserFromJobTitleIndex

Position of owner token in job title (indexing starts at 0, ie. first token is 0, second is 1, etc.).

dword:00000000

ParseUserFromJobTitlePreserveTitle

Use this option to preserve title after parsing job. Using default value will remove username from job title (if the ParseUserFromJobTitle is used).

Enable - dword:00000001

Disable - dword:00000000

dword:00000000

Caveats

Accounting Accuracy

  • Accounting information reflects what Windows Print Spooler (thinks it) sends to a printer. Print parameters and number of pages that are actually produced may differ.

  • It is possible to enable internal PCL parser to increase accuracy of accounting information for PCL5/PCLXL/HPGL2 print jobs. When enabled, each print job is read from Windows Print Spooler and analyzed.

  • Some print drivers do not provide correct number of pages when the printer is shared from Windows Print server. We recommend to enable internal PCL parser to provide more accurate accounting information.

  • Accounting information can get lost if YSoft SafeQ server crashes. Local Monitor does not wait for the server to store accounting information to a persistent storage; as soon as the server accepts the accounting information, it is removed from Local Monitor cache.

Duplicate Jobs in Accounting Records

Although default configuration is likely to work well in most environments, it is recommended to properly configure ignored ports in environments where YSoft SafeQ queues, directly connected printers, and Windows shared printers are available. Failure to do so may result in duplicated job accounting records in SafeQ:

  • Print job sent to YSoft SafeQ queue is initially accounted by the Local Monitor when the job is submitted to the queue. YSoft SafeQ will then account the same job after it is actually delivered to a printer.

  • Print job sent to SMB printer is initially accounted by the Local Monitor on the client as it is sent to the print server. If the print server is equipped with another instance of Local Monitor, job is accounted again as it is being delivered to the printer.

Duplicated or Missing Devices

YSoft SafeQ automatically creates device entries for printers tracked by Local Monitors using configurable heuristics to identify identical printers reported by multiple Local Monitors (see the local-match-N configuration options of YSoft SafeQ). The results of this method is based on information available about printers such as hostname, port type, port name, printer name, and printer's IP address. Unless configured properly, one physical printer may show in reports as multiple device entires or multiple physical printers may show as single device entry in YSoft SafeQ.

For example: When two workstations with Local Monitor print to a network printer directly, two device entries might be created for the same printer in YSoft SafeQ - each one from Local Monitor on each workstation. One physical printer will appear as two in the reports, each showing its share of print jobs.

local-match-0

In SafeQ 5 prior to MU31, a new option called local-match-0 must be created in order to proceed the other ones. The bug was fixed in the mentioned versions, the options are now enumerated starting with local-match-1.

Authorized access

When the safeqPortAuthOnly configuration property is set to enabled, the communication between Local Monitor and YSoft SafeQ does not work. The default value of safeqPortAuthOnly is disabled.

 Limitations

Upgrade from SafeQ 4 to SafeQ 5

  • The parameters local-price-bw and local-price-color have been removed from SafeQ 5. If they were used for accounting in SafeQ 4, it is necessary to update Default Price List for local devices in SafeQ 5 after upgrade.