1832120 Members
3224 Online
110038 Solutions
New Discussion

Who is using printer?

 
SOLVED
Go to solution
Prasad Joshi
Regular Advisor

Who is using printer?

Hi All,

People in company tend to use printer for taking nonsense printouts.

We found that our printer is being used to much. Is there any way to know who all are giving print commands and how much pages are being printed by each of them.

Very very thanks if you could give any solution.

Thanks & regards,
Prasad.
7 REPLIES 7
Peter Godron
Honored Contributor

Re: Who is using printer?

Prasad,
you could use the lpstat command:
while true
do
date
lpstat
sleep 30
done

Or, most printers have a built in history queue which you can get to at the printer.
Arunvijai_4
Honored Contributor

Re: Who is using printer?

Hi Prasad,

You can use lpsatat command.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Raj D.
Honored Contributor

Re: Who is using printer?

Prasad ,

Check the logfile to check the print requests details:

/var/adm/lp/log


2. For jetadmin printer:

# netstat -n | grep 9100

And you will get the IP , who is printing currently,

Cheers,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Bill Hassell
Honored Contributor
Solution

Re: Who is using printer?

Is this printer connected directly to your HP-UX computer? If true, you can edit the printer's script to turn on the banner page which will identify each printout with the user name, the file name (or stdin) and date/time.

When you say "nonsense" printouts, are these pages of random characters? Users may be trying to print binary files like programs. If education does not work, you'll have to alias the lp command to a non-working state for those users -- or take away their shell and replace it with a menu script without printing capability.

If the printer is on the network, you options are more complex. If the printer is on a PC server or a non-HP network card, you'll have to look at add-on applications to monitor and log the activities. If the printer is an HP network card, anyone on the network can print to the printer. In that case, you can tell the LAN card to reject any jobs from selected computers (not by user name, just by IP address of the sender).


Bill Hassell, sysadmin
Prasad Joshi
Regular Advisor

Re: Who is using printer?

Hi Bill,

Your answere is gr8.

My printer is on the network, that too is not only HP-UX network. It is a conbination LINUX, WINDIWS etc.

But, how can set LAN card to reject any jobs from selected computers.

Thanks & regards,
Prasad.
Arunvijai_4
Honored Contributor

Re: Who is using printer?

Hi Prasad,

You need to set the rules for this purpose. IPFilters may help you.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bill Hassell
Honored Contributor

Re: Who is using printer?

As I mentioned, the HP JetDirect LAN card has the ability to reject all connedctions except those enumerated in the allowable IP list in the card. if the card is not an HP JetDirect LAN card, I don't know of any other cards that have connection restrictions. Now as I mentioned, the restriction is for IP addresses -- not users. So you might allow a Linux box and a couple of PCs and your HP-UX system (maximum list of IPs is 10) and reject other IP addresses.

So if multiple users login to your Linux, PCs or HP-UX systems, you still have the problem. About all you can do then is to enable the trailing separator page in the JetDirect card (called a banner page). It prints a simple text page with a few lines about the source of the printout. Remember that it is at the end of the job and only works with HP JetDirect cards. You can telnet to almost all JetDirect cards to set the option, or for newer cards, they have a built-in web page for config.


Bill Hassell, sysadmin