LPRngInfo for Win32 (NT/2000)

Version 1.2b
Copyright 2000 University of Wisconsin - Madison, CAE Center

Obtaining LPRngInfo

There are two versions of LPRngInfo available. One version contains support for getting status information of HP printers via SNMP. The other, version does not contain this support and does not require two additional DLL files.

The HP Printer Status version uses SNMP++ which is open source found at:

 http://rosegarden.external.hp.com/snmp++/index.html  

The copyright information for SNMP++ is:

Copyright 1994-1996 Hewlett Packard Company
All Rights Reserved
Hewlett Packard
Peter Erik Mellquist

 

The SNMP_PP.DLL is included with the distribution of LPRngInfo. This DLL requires the WinSNMP library (WSNMP32.DLL). An evaluation version can be obtained from ACE*COMM at http://www.acecomm.com/

Overview

LPRngInfo is a WinNT/2000 utility that will allow you to view and slightly manage your Unix based print queues. This program assumes you are using LPRng for your print system. Geared mainly for our helpdesk, this program presents a easy to use GUI environment to display the print activity on our Unix system. The main window (shown below) allows you to see at a quick glance a summary of print queues. The LPRng print queues listed can come from multiple hosts if desired.

 

Viewing the Queue

By double-clicking on a queue entry, or selecting an entry and pressing the Show Jobs button, the program will bring up the list of jobs in the specified queue as well as some LPRng Status information. From this window, you can delete print jobs. The program will obtain the NT user name of the person logged into the machine and send that name in the request to LPRng to delete a job.  The user must have rights on the remote system to be able to delete a job. If they don't, you will get an error.  

As with the main window, the list will auto-refresh every so often (configurable). The user also has the option to force a refresh by pressing the Refresh button.

 

Support for HP Printers

One version of the program has support for getting status information from HP printers via SNMP. This version requires two additional DLLs (see Obtaining LPRngInfo for details). When enabled, the program will query the specified printers via SNMP and obtain the status information (Out of paper, Toner Low, Paper Jam, etc). This process has been placed into the background as it can take a long time to refresh the display if the list of printers is long.  Once the background thread polls all the printers, it will pause for a configurable amount of time before starting to poll all the printers again.

The program uses HP's SNMP++ which uses WinSNMP. 

System Requirements

There are two requirements for this program. This program was written to work with Windows NT (uses user security information to obtain the currently logged in user. If someone has a better way of doing this so it will work on Windows9x and NT/2000, feel free to modify the source and send me the update). It may work under Win9x, but I have not tested it.

The other requirement is that you use LPRng for your print system. LPRngInfo relies on the output from LPRng to populate the windows with information. LPR daemons for the various Unix systems will differ in the output and can't be used. This has been tested with LPRng version 3.5.3.

Installing and configuring LPRngInfo

Installation is fairly simple. You need to place the executable and its config file LPRngInfo.cfg in the same directory. Edit the LPRngInfo.cfg file to your liking. If you are using the HP Printer Supported version, you also need to copy the DLL files SNMP_PP.DLL and WSNMP32.DLL to the same directory as the application (or they could be in the system's path).

LPRngInfo.cfg

The config file is fairly simple. Any line starting with a pound sign (#) is treated as a comment. The rest of the config file is formated like most windows INI files.

[options] section

In this section, you can set up a few items to control the program's behaviour. The options are fairly self explanitory:

An example of these options is below:

[Options]
AutoRefresh = 1
QueueRefreshTime=60
QueueJobRefreshTime = 30
ShowHPStatus=0
HPPrinterStatusRefreshTime=60
ShowErrorJobs=0
UseNTUserName=0
RemoteUserName=root

 

[printers] section

This is the section where you define the printers. The format of the entries in this section is:

<print queue>@<hostname>

If you are using the HP version, then the format of the line changes just slightly to allow you to specify the hostname of the actual printer. The format is:

<print queue>@<hostname>:<hp printer hostname>

Both formats can be used in either version of the program. In the non-SNMP aware version, the hp printer host information is just ignored.

For example, if you had two Unix systems with LPRng installed. One one system (unix1.mydomain.org) you have the print queues my_laser and hp_laser configured and on the other (unix2.mydomain.org) you have the print queue local_printer. The printers my_laser and hp_laser are HP printers with JetDirect cards in them. The hostname for my_laser is myprinter.mydomain.org and the hostname for hp_laser is hpprinter.mydomain.org. The config file would look like the following for this setup:

[printers]
my_laser@unix1.mydomain.org:myprinter.mydomain.org
hp_laser@unix1.mydomain.org:hpprinter.mydomain.org
local_printer@unix2.mydomain.org

Version History

Version 1.2b

Version 1.2a

Version 1.2

Version 1.1

Version 1.0

File: http://www.cae.wisc.edu/~drews/lprnginfo/readme.html