Operating System - HP-UX
1838295 Members
4280 Online
110125 Solutions
New Discussion

Limiting the size of a print job request.

 
Dr. Zoidberg
Occasional Advisor

Limiting the size of a print job request.


I am running under HP-UX 11.11 with lpsched handling my print requests.

I would like to set a job size limit for ANY print job submitted, in order to stop users from wasting huge amounts of paper by sometimes sending incorrect files, and files larger than 200K for example.

I am thinking this might have to be done in the interface section of the printers, but I have more than 30 printers in my site, and this probably wouldn't be the best approach.

I need something that can be control by the scheduler, and I was thinking of wrapping the lp command with my own script, however I do not want to jump the gun if there is another solution.

Thanks in advance for any assistance.


8 REPLIES 8
YAQUB_1
Respected Contributor
Dr. Zoidberg
Occasional Advisor

Re: Limiting the size of a print job request.


Thanks.

But I posted this specific question because I already searched through these forums, and the links provided are no help at all. 8-)

Hopefully someone with experience in this area will reply soon (within the next year perhaps).

Thanks again for your help.
Dennis Handly
Acclaimed Contributor

Re: Limiting the size of a print job request.

Dr. Zoidberg
Occasional Advisor

Re: Limiting the size of a print job request.


Thanks for the links to other posts, but none of them are helpful at all.

So I am still waiting for someone with more experience in this area.

I the mean time I am starting my own wrap around script to add the functionality to the lp command. Seems this will have to be done the hard way ... 8-(

TwoProc
Honored Contributor

Re: Limiting the size of a print job request.

The only thing I can think of is to turn on quotas in the /var/spool/lp directory. It will give you *some* limits on file size creation, but not a lot.

Another thought - how about changing the ulimit for the user "lp" ? I'm thinking that should work.

I see in the "man ksh" under the "ulimit" command:

-f List or set the number of 512-byte blocks in files
written by child processes (files of any size can
be read).

That might get it done for you.
We are the people our parents warned us about --Jimmy Buffett
Dr. Zoidberg
Occasional Advisor

Re: Limiting the size of a print job request.

Thanks.

But since I have more than 30 printers, it is going to be a configuration nightmare to modify each one, and besides not all of them are the same brand and model.

It seems that a lp wraper is making more and more sense.

I was just hoping that within the lpsched structure that was something similar to the lpd system were you can set a wide policy change via the printcap file.

However I can check the size of the job via the lp wraper, and if it is within my desire limits, then I can allow the request to proceed to the real lp handler.
Bill Hassell
Honored Contributor

Re: Limiting the size of a print job request.

Although it is admirable to try to save some trees, unless all the printouts are plain ASCII, 200K may be create more problems than it is worth. For instance, a one page doc file might contain several thousand bytes of font information, which is sent prior to the actual text of the printout. This is also true for Postscript files (which are native to Netscape and Mozilla), or Xwindow screen copies. The result of a 200KB (or even a 2MB limit) may be truncated printouts and printer error messages, with users doing their "normal" reaction: print it again (and again, etc). And you can expect a lot of user calls about the broken printers, followed by calls from managers asking that certain users be allowed to print larger files.

There is nothing in the lp spooler to limit files except the individual printer scripts. 30 printers is a fairly small number when some HP-UX systems I have seen have more than 1000 printers on HP-UX systems. As long as the users run the lp command, a wrapper is likely the best choice.

It is difficult at best to dictate human behavior with technology. Perhaps another approach would be to tabulate user print files by size. It won't be an accurate representation of paper usage but can provide a rough estimate of usage. Send this report to managers (sorted with the largest users at the top). Managerial pressure may be more effective...


Bill Hassell, sysadmin
Dr. Zoidberg
Occasional Advisor

Re: Limiting the size of a print job request.


Bill.

Thanks for the advice, however this particular HP-UX system handles main production in a FAB environment, so I know in advance that any type of print job will be a report of some kind, so there is no confusion about any other type of print request, like web HTML pages, or word documents, but rather almost all ASCII requests.

However there is always a couple of engineers that THINK they know what they are doing and sometimes they submit the odd type of print job, and we can not do anything about it, until the printer already wasted hundreds of pages, and the printer has to be power cycle to remove the job from its memory.

That's why I need something to stop any type of print job request that falls outside the norm. That way that particular engineer would be require to contact us, and then we can give him some excellent BOFH support with his/her specific print request. 8-)

In any case, I guess I'll get started with my lp wrapper then.