1820620 Members
2024 Online
109626 Solutions
New Discussion юеВ

Re: Printers queue log

 
Manuales
Super Advisor

Printers queue log

Hi all ...
i need to verify the following
i need to know if the printers added into the system (printers queue) have been used, i mean, we have 1000 printers, but many of them are not being used, i need to know that, how can i know that? in my understanding there are logs where inidcate "printer_name was used or printer queue used ..." something like that, is that true? if so, where are located those logs? or , what other way can i know that?
please let me know.

Thaks in advance ... :)
14 REPLIES 14
Mounaam
Trusted Contributor

Re: Printers queue log

Hi,
take a look to: /var/adm/lp/log

This file is renamed to oldlog each time lpsched is started (during a manual restart or a reboot).
Ramesh S
Esteemed Contributor

Re: Printers queue log

Hi

/var/spool/lp/request

This is the place for print queues. This directory contains other subdirectories, each of which represents one print queue. The actual print requests are spooled in this directory.

Best Regards,
Ramesh
OldSchool
Honored Contributor

Re: Printers queue log

To amplify on what Ramesh said:

go in to the request directory and do:

ls -ltadr *

that will give you a list of the queues. It will be sorted in Date Ascending order (ie the one that's been unused the longest will be first). If you want it sort from most recently used to longest unused omit the "r" (reverse) in the above.

not bulletproof, but is will get you started on a list.

You can disable the queues you think are unused and remove them at a later date if no one complains
Manuales
Super Advisor

Re: Printers queue log

OK ....
Could you please let me know the meaning of the lines into the file /var/adm/lp/log

what is the meaning of each field?

please let me know ..
James R. Ferguson
Acclaimed Contributor

Re: Printers queue log

Hi Manuales:

You can look at the last access timestamp of the device scripts, too:

# ls -ult /etc/lp/interface

As for the fields of '/var/adm/lp/log' they are the printer name followed by a hyphen an the print request number; the user who requested the output; the printer name; and the date of the printer request.

Regards!

...JRF...
Tim Nelson
Honored Contributor

Re: Printers queue log

>>OK ....
>>Could you please let me know the meaning of the lines into the file /var/adm/lp/log

>>what is the meaning of each field?

>>please let me know ..

It is fairly simple.
example:
NOCP2-10 root NOCP2 Oct 25 12:37
/etc/lp/interface/model.orig/NOCP2
/opt/hpnpl/bin/hpnpf -j NOCP2-10+root -x NOCP2

request ID
user
printer name
date
interface/command

Maybe an example of yours would help.

Manuales
Super Advisor

Re: Printers queue log

what exactly does the date mean when i run "ls -ult /etc/lp/interface" ?

i mean, i have 1000 printers, 200 have different date and the other ones have only one date (that is strange for me) why could be same date for the 800 printers when many of them (i know that) are not in use?

please let me know.
thanks.
Manuales
Super Advisor

Re: Printers queue log

these are some rows:

/usr/sbin/lpsched: FIFO: Apr 24 04:06 n
what is the meaning of "n" and "FIFO"?

/usr/sbin/lpsched: FIFO: Apr 24 04:06 r 21103 1209024382 0 328 0 0 34 unix10 KLTKKRAU KLTP2178 -
why appears two printers (KLTKKRAU KLTP2178) ?
What is the meaning of "n" after date?


usr/sbin/lpsched: FIFO: Apr 24 02:47 r 6850 1209019625 0 325 0 0 34 unix 10 KLTKKRAU KLTP2178 -
KLTP2178-325 KLTKKRAU KLTP2178 Apr 24 02:47
/etc/lp/interface/model.orig/KLTP2178
/opt/hpnpl/bin/hpnpf -j KLTP2178-325+KLTKKRAU -w -a1 -x KLTP2178.prt.europe
why does appear here several lines?
What is the meaning of "r" after date?



/usr/sbin/lpsched: CHILD: Apr 24 04:06 KLTP2178 328 0000
what is the meaning of "CHILD"? why in the other lines appear "FIFO"?


finally
why appears /usr/sbin/lpsched: in all the lines? is that the daemon?

please let me know
thanks in advance.


Tim Nelson
Honored Contributor

Re: Printers queue log

Yowza, that is a lot of probably meaningless info in your lp log, what version of HPUX are you running?


Is your lpsched running with -v enabled ? Might make things easier to read if you turn off the cryptic debug ( if is is on ).


Manuales
Super Advisor

Re: Printers queue log

my user is not root, i'm a normal user.

**** Is your lpsched running with -v enabled ?
how can i know that?

Manuales
Super Advisor

Re: Printers queue log

$ ps -fea | grep lpsched | grep -v ps
lp 12203 12202 0 Apr 18 ? 0:00 /usr/sbin/lpsched -v -a
lp 12202 1 0 Apr 18 ? 0:34 /usr/sbin/lpsched -v -a
lp 25287 12202 0 04:21:21 ? 0:00 /usr/sbin/lpsched -v -a
Tim Nelson
Honored Contributor

Re: Printers queue log

Not that this solves your initial question but.

There probably is no reason to have lpsched running with -v and -a. ( -a gathers stats, not sure who cares about printing performance stats, and is probably a huge burdon to the system with over 1000 printers ).but.. maybe those stats might lead you to what printers are being used ( ahah !!! ) man lpana for more info

edit /sbin/init.d/lp ( remove -v and -a options if defined there at the lpsched startup section)

Manuales
Super Advisor

Re: Printers queue log

ok ...
i have a question
the file /var/adm/lp/log is only for the tasks on schedule? or
is it for keeping log if someone prints in whatever moment of day?

please let me know.
Yogeeraj_1
Honored Contributor

Re: Printers queue log

hi,

>the file /var/adm/lp/log is only for the tasks on schedule? or
>is it for keeping log if someone prints in whatever moment of day?

Yes. All requests submitted using 'lp' command are logged-in in this file.

e.g.
SRV2:var/adm/lp>cat log
***** LP LOG: Apr 23 09:52 *****
SRV2:var/adm/lp>lp -dit1 /etc/hosts
request id is it1-3429 (1 file)
SRV2:var/adm/lp>cat log
***** LP LOG: Apr 23 09:52 *****
it1-3429 root it1 Apr 26 09:02
SRV2:var/adm/lp>


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)