1752795 Members
6493 Online
108789 Solutions
New Discussion юеВ

LP Wrapper Needed

 
TheJuiceman
Super Advisor

LP Wrapper Needed

Has anyone come up with a lp wrapper for hpux 11.11 that will capture basic info like byte count, report names, and user? Any help is appreciated. Thanks.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: LP Wrapper Needed

While that is possible there is a big downside. Every lp job that uses stdin as a source (e.g. ls | lp; cat myfile | lp ) will actually have to read stdin and store the contents in a temp file and then direct that file to the lp command. Depending upon the lp demands, you could eat a huge chunk of disk up in addition to what the lp susbsystem already requires for temp files. The other thing is that translating raw byte counts into any sort of meaningful information is all but impossible with modern printers. For example, you might have a fairly small textfile that produces thousands of pages of output and a huge graphics-rich file than produces only a few pages of output. The only thing that can make sense of this data are the output devices themselves. Most modern printers have SNMP traps or web interfaces (that could be manipulated with a scraper) that could produce meaningful data. That is where you should concentrate your efforts.
You can also mine the lp log for information but that will tell you nothing of page counts.

If it ain't broke, I can fix that.
D Block 2
Respected Contributor

Re: LP Wrapper Needed

Juiceman, I agree w/ A.Clay.. too much to track you might be asking..

say, maybe you can start small, Keep it Simple.. by Monitoring the system..

Run the: lpstat -t or lpstat -o command and see what is going on.. every 15 minutes.. whey you see the big heavy users, then start by running a stat by user-login: see the: man lpstat


lpstat -u"juiceman,A.Clay, Tom"

then create your own script and put in the cron.. building your own collection of data for analysis purposes.. maybe even monitor the Spool Queue if there are many jobs waiting to print..

Golf is a Good Walk Spoiled, Mark Twain.