LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices


Reply
  Search this Thread
Old 05-09-2018, 11:55 AM   #1
Ken_Snauffer
LQ Newbie
 
Registered: May 2018
Posts: 1

Rep: Reputation: Disabled
Tru64 Printing to something other than a printer


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 lp=@ip.address: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?

Thank you in advance.
 
Old 05-09-2018, 01:58 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,492
Blog Entries: 15

Rep: Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463Reputation: 1463
Wow - Tru64!

When I saw your post I thought about using named pipes (FIFOs) where you send your prints to a script that extracts only what you want then that actually prints what it extracted. It has been a while since I played with named pipes but I found this link that is sort of on track to the idea that may help you get started:

https://unix.stackexchange.com/quest...ut-interfering

I'd previously used named pipes for MeasureWare/Perf data collection on HP-UX years ago so I'm assuming Tru64 has the same capabilities to use them though I've never worked on it (even after HP bought Compaq and got Tru64).

Last edited by MensaWater; 05-09-2018 at 02:00 PM.
 
1 members found this post helpful.
Old 05-09-2018, 05:29 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,531

Rep: Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776Reputation: 2776
Basically you would like to take that print stream and instead of going to a printer, you want to take it to a file or parse it some way?

You might be able to take that jetdirect stream and use it in some manner I'd guess unless your ip example is in conflict with some subnet issue I'd think. https://unix.stackexchange.com/quest...-raw-port-9100 example but look for other ways in this stream capture.

As you say there is no one willing to mess with this code and down time is critical. Might be worth it to just let it print. Maybe set print font on printer to 6.

Jetpcl may be a solution but I didn't look at it too much.

I would think that some business printers could be set to monitor and save pages to internal but report as being printed back to software.

Last edited by jefro; 05-09-2018 at 05:46 PM.
 
1 members found this post helpful.
Old 05-09-2018, 07:24 PM   #4
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,316

Rep: Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559
See if the answer in this thread is helpful. It does print to /dev/null (no nothing printed), but the required data is written to a file via an output filter
Code:
:of=:of=/var/output/capture:\
pointing to a very simple script (outlined in the answer).
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Continous printing with CUPS thermal printer (GeBE USB Printer N78) ThaRez Linux - Hardware 0 04-15-2014 03:44 PM
[SOLVED] How to set printer options when printing from Linux to Windows printer r_ranasinghe69 Linux - General 2 06-27-2011 12:54 AM
HP Laserjet 2300 dn printer (Internet Printer) keeps on printing multiple copies mayurmvegad Linux - Networking 0 09-15-2008 02:35 AM
printing to xp printer... moschi Linux - Newbie 3 03-30-2004 02:33 AM
keeping printer on at bootup keeps printer from printing (some printer modules loaded TheOneAndOnlySM Slackware 1 10-17-2003 07:39 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX

All times are GMT -5. The time now is 07:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration