From Kenneth Snauffer@21:1/5 to All on Wed May 9 10:22:33 2018
I have been searching for a solution to a printing issue for several months now and have come up with no decently working solution. Please give input.
We have an old inventory control program running on TRU64 Unix V5.1B operating system. Around 2003 it was virtualized onto VMware via AVT's vtAlpha emulator. The program appears to have been written to print it's own internal events to two files (log_
file and log_file1) which are then lpr'd to printers (control and logger) set up in the operating system via printcap and then the files are deleted. The printcap file showes these printers to be email@example.com:9100 which are old HP print servers (lan to
parrallel) with simple text only dot matrix printers attached.
These two printers print an average of about 3 single line entries per 1 minute, 98%+ of which is not needed. There is 1 print job (about 6 lines of text) submitted and printed every hour with an inventory update, which IS needed. Therefore, I cannot
just redirect the printers to /dev/null.
We cannot just turn off the printers because the spooler then stops once it gets to about 100 entries and the program hults (but not the system). I say this because we can go in and purge the print queue (via lpc) and everything starts working again.
I did figure out that if we turn the spooler off, the log_file and log_file1 do not get deleted, but are instead appended to. The problem here is that 1 weeks worth of "held" printing ended up creating 1 log_file a little over 350KB and crashed the
entire unix system because it filled up the minimal available disk space. We did have a backup of the VM, but this created about 8 hours of downtime till we cleaned up and updated the program's internal database.
A few things to mention...
1: There is a network obviously, but everything else is windows based.
2. There are no programmers that are willing to try to tackle re-writting the software (internal or external).
3. Everything that is "printed" is actually submitted to some sort of file and then that file is spooled to the printer (the log_file and log_file1 are just some of the files) then the files are deleted.
4. If these files exist, they are appened to and not over-written.
I am not sure what options I have, therefore I do not have specific quesitons on how to do something.
Can we change the printcap to print to a file or something else somewhere else? Can we set up some sort of filter that only prints the information we want and just ignores the rest?
Are we just stuck and have to keep replacing print cartridges and paper regularly?
Is there anything else you would like to know to help you help me?
From Hans Vlems@21:1/5 to All on Sat May 19 02:51:50 2018
Warning: I have very little Tru64 knowledge. Reading beyond this point may be a waste of time...
If all print output is produced at a fairly low frequency, say a file every 5 minutes,then the following strategy may work.
- redirect all printer output to files, as I understand from your explanation is possible
- if you have control over de path and the filename then put them all in one directory, and add a timestamp or other unique marker to the name.
- write a program that inspects that directory and let it delete unneccessary files and make it print the inventory opdates. (And zip and backup their contents for a week if necessary)
- run this program (under cron, is that it?) at twice the rate that files are created (assuming a print job every 5 minutes, let cron run the programevery 2.5 minutes)
IIRC there is a C compiler for Tru64 available, free.