Operating System - HP-UX
1830901 Members
2094 Online
110017 Solutions
New Discussion

HP-UX logging print information

 
pmaths
New Member

HP-UX logging print information

Hi,

Can anyone advise if there is a utility or a known script that I can use to log all print activity on our unix box. We are running HP-UX version B.11.00.

The type of thing I would want to record is: user, printer, pages, time

Any help you may offer will be gratefully received.

Cheers

Pete
4 REPLIES 4
Marco A.
Esteemed Contributor

Re: HP-UX logging print information

When using the lpsched, use the -v param to log all the activity to the lp default log file
/usr/sbin/lpsched [-v] [-a]

-v Write a verbose record of the lpsched process on /var/adm/lp/log.

Regards
Just unplug and plug in again ....
Geoff Wild
Honored Contributor

Re: HP-UX logging print information

lpsched -v

/var/adm/lp/log will things like:

OK38-3082 ipradm OK38 Apr 23 07:20
Start: OK38-3082 Mon Apr 23 07:20:21 MDT 2007
End: OK38-3082 Mon Apr 23 07:20:22 MDT 2007
/etc/lp/interface/model.orig/OK38 nb
/opt/hpnpl/bin/hpnpf -j OK38-3082+ipradm -a1 -x OK38.mydomain.net
CHILD: Apr 23 07:20 OK38 3082 0000
FIFO: Apr 23 07:20 m OK38 20537
FIFO: Apr 23 07:21 r MA33 3083 ipradm svr004 0


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
pmaths
New Member

Re: HP-UX logging print information

Hi Guys,

Thanks for the response's...

I've entered the lpsched command and have got the following from the log file:

Start: finance5-4822 Mon Apr 23 15:22:18 BST 2007
End: finance5-4822 Mon Apr 23 15:22:19 BST 2007
/etc/lp/interface/model.orig/finance5 nb
/opt/hpnpl/bin/hpnpf -j finance5-4822+bgraham -x finance5

Is there any way that I cen get the number of pages printed?.

Many Thanks,

Pete
Bill Hassell
Honored Contributor

Re: HP-UX logging print information

> Is there any way that I cen get the number of pages printed?.

No. HP-UX does not have a true driver that interacts with the massively large list of incompatible printers that can be hooked to your HP-UX box. A page count can only be obtained from the printer since one page might have just one character on it, or it might have pictures or graphics or sideways text, etc. To query the printer, you will need to read about the PJL language which interacts with the printer hardware and then write a program to query the printer at the end of each job. NOTE: PJL is HP-only. Non-HP printers may have a way to do this but it will likely be quite different.


Bill Hassell, sysadmin