Lpstat


 
Thread Tools Search this Thread
Operating Systems HP-UX Lpstat
# 1  
Old 09-08-2008
Lpstat

Hi there all..

I got 4 HP ux systems and 4 AIX systems here.
when I let LPSTAT make a report in aix with -W
I get a really nice report.

Example:
Queue Dev Status Job Files User PP % Blks Cp Rnk
-------------------- -------------- --------- ------ ------------------ ---------- ---- --- ----- --- ---
stapr008 hp@150 READY
stapr309 hp@150 READY
stapr156 hp@150 READY
stapr046 hp@150 READY
stapr196 hp@150 READY



Is there a way to get the same report look from AIX but than in my HP UX systems?
So I can make a nice script around it that will work on both the systems?

Thanks in advance!
# 2  
Old 09-08-2008
>I get a really nice report.
Thats only because you have only 4 printer and have no trouble, you wait and see when things go wrong....

but just for the sake of comparison here is my output with your same command: v not w (unknown to my system...)
Code:
vbe@yche # lpstat -v
Queue   Dev   Status    Job Files              User         PP %   Blks  Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
xer1    hp@xe READY    
xer2    hp@xe READY    
cdti    hp@xe READY    
dierdd  hp@hp READY    
dtpe    hp@hp READY    
aire    hp@hp READY    
chancel hp@hp READY    
dassbs  hp@hp READY    
depoce  hp@hp READY    
dipfin  hp@hp RUNNING   186 /opt/thuia/dipfin/ thusys        1 100     1   2   1
              QUEUED    330 /opt/thuia/dipfin/ thusys                 1   2   2
economa hp@ec READY    
ocen    hp@hp READY    
epse    hp@hp READY    
ocp     hp@hp READY    
ocstat  hp@hp READY    
ols     hp@hp READY    
opfra   hp@hp READY    
regfonc hp@hp READY    
rfcada  hp@hp READY    
sigeoma hp@hp READY    
ecotox  hp@hp READY    
opfrd   hp@hp READY    
dam     hp@hp READY    
ome     hp@hp RUNNING   212 /opt/thuia/ome/pro thusys        1 100     1   1   1
              QUEUED    356 /opt/thuia/ome/pro thusys                 1   1   2
diae-B1 hp@hp READY    
pj-01   hp@hp READY    
djps-55 hp@hp READY    
djps-7A hp@hp READY    
djps-7E hp@hp READY    
djps-0I hp@hp READY    
df-0B   hp@hp READY    
df-0C   hp@hp READY    
diae-9I hp@hp RUNNING   183 /opt/thuia/diae-9I thusys        1 100     1   1   1
              QUEUED    327 /opt/thuia/diae-9I thusys                 1   1   2
diae-9I hp@hp READY    
afc-1E  hp@hp READY    
afc-1F  hp@hp READY    
afc-25  hp@hp READY    
afc-27  hp@hp READY    
afc-29  hp@hp READY    
df-11   hp@hp READY    
afc-18A hp@hp READY    
afc-18B hp@hp READY    
afc-18D hp@hp READY    
afc-18E hp@hp READY    
diae-93 hp@hp READY    
diae-9E hp@hp READY    
afc-1A  hp@hp READY    
afc-2A  hp@hp READY    
afc-19  hp@hp READY    
afc-20  hp@hp READY    
afc-22  hp@hp READY    
afc-23  hp@hp READY    
afc-24  hp@hp READY    
afc-28  hp@hp READY    
opf-68  hp@hp READY    
gc-03   hp@hp READY    
cti-0H4 hp@hp READY    
dip-38  hp@hp READY    
dip-3A  hp@hp READY    
dip-3C  hp@hp RUNNING   188 /opt/thuia/dip-3C/ thusys        1 100     1   1   1
              QUEUED    332 /opt/thuia/dip-3C/ thusys                 1   1   2
dip-3E  hp@hp READY    
djps-50 hp@hp RUNNING   198 /opt/thuia/djps-50 thusys        1 100     1   1   1
              QUEUED    342 /opt/thuia/djps-50 thusys                 1   1   2
diae-94 hp@hp READY    
diae-9F hp@hp READY    
dass-C4 hp@hp READY    
dass-CB hp@hp READY    
dass-CF hp@hp READY    
df-09   hp@hp READY    
dip-3D  hp@hp READY    
dael-80 hp@hp READY    
dip-3G  hp@hp RUNNING   191 /opt/thuia/dip-3G/ thusys        1 100     1   2   1
              QUEUED    335 /opt/thuia/dip-3G/ thusys                 1   2   2
dip-3H  hp@hp READY    
dip-43  hp@hp READY    
df-17   hp@hp READY    
djps-67 hp@hp DOWN     
              QUEUED    911 /opt/thuia/djps-67 thusys                23   1   1
              QUEUED     58 /opt/thuia/djps-67 thusys                23   1   2
              QUEUED    201 /opt/thuia/djps-67 thusys                 1   1   3
              QUEUED    345 /opt/thuia/djps-67 thusys                 1   1   4
djps-7D hp@hp READY    
df-2D   hp@hp READY    
afc-18F hp@hp READY    
afc-1D  hp@hp READY    
afc-1B  hp@hp READY    
afc-18  hp@hp READY    
afc-18C hp@hp READY    
df-2C   hp@hp RUNNING   161 /opt/thuia/df-2C/p thusys        1 100     1   1   1
              QUEUED    305 /opt/thuia/df-2C/p thusys                 1   1   2
df-35   hp@hp READY    
diae-9H hp@hp READY    
dass-D6 hp@hp READY    
diae-9I hp@hp READY    
diae-92 hp@hp READY    
deee-A0 hp@hp READY    
df-34   hp@hp READY    
diae-90 hp@hp READY    
diae-CE hp@hp READY    
diae-97 hp@hp READY    
deee-A2 hp@hp READY    
df-14   hp@hp READY    
df-0D   hp@hp RUNNING   155 /opt/thuia/df-0D/p thusys        1 100     1   1   1
              QUEUED    299 /opt/thuia/df-0D/p thusys                 1   1   2
diae-9I hp@hp READY    
afc-21  hp@hp READY    
diae-91 hp@hp READY    
arsenal hp@hp READY    
cti-0H3 hp@hp READY    
oce-A3  hp@hp READY    
oce-A5  hp@hp READY    
oce-A6  hp@hp READY    
oce-A7  hp@hp READY    
oce-A8  hp@hp READY    
oce-A9  hp@hp READY    
oce-AAA hp@hp READY    
oce-AD  hp@hp READY    
df-0E   hp@hp READY    
oce-AG  hp@hp READY    
oce-AHA hp@hp READY    
oce-AK  hp@hp READY    
oce-AL  hp@hp READY    
oce-AE  hp@hp READY    
oce-A4  hp@hp READY    
aire2   hp@hp READY    
oce-AI  hp@hp READY    
dass-C5 hp@hp READY    
djps-56 hp@hp READY    
dt-857  hp@hp READY    
di-02B  hp@hp READY    
afc-18G hp@hp READY    
oce-AA2 hp@hp READY    
dt-9V1  hp@hp RUNNING   206 /opt/thuia/dt-9V1/ thusys        1 100     1   1   1
              QUEUED    350 /opt/thuia/dt-9V1/ thusys                 1   1   2
dass-C7 hp@hp READY    
dcti-SA hp@hp READY    
dcti-EX hp@hp READY    
dcti-EX hp@hp READY    
dcti-EX hp@hp READY    
dcti-EX hp@hp READY    
dcti-EX hp@hp READY    
di-57   hp@hp READY    
df-24A  hp@hp READY    
dcti-95 hp@hp READY    
ocpa-D7 hp@hp READY    
di-7C   hp@hp READY    
oce-AA1 hp@hp READY    
dt-93   hp@hp READY    
df-16   hp@hp READY    
df-26   hp@hp READY    
oce-AB  hp@hp READY    
dt-9IF  hp@hp READY    
df-0F   hp@hp READY    
oce-AC  hp@hp RUNNING   232 /opt/thuia/oce-AC/ thusys        1 100     1   1   1
              QUEUED    376 /opt/thuia/oce-AC/ thusys                 1   1   2
afc-28A hp@hp READY    
lp-web  hp@hp READY    
dse-AM  hp@hp READY    
dse-AQ  hp@hp READY    
dse-AR  hp@hp READY    
vbe@yche # 

Now HPUX if you want to have just the status then type :lpstat -p¦grep -v fence e.g.:
ant:/home/vbe $ uname -r; lpstat -p|grep -v fence
B.11.11
printer LJ_3b1 is idle.  enabled since Jul 29 16:38
printer lp3 is idle.  enabled since Jul 29 16:38
printer lp8 is idle.  enabled since Jun 18 18:55
printer lp9 is idle.  enabled since Jul 29 16:38
printer lpvbe is idle.  enabled since Jul 29 16:38
printer lp0 is idle.  enabled since Jul 29 17:06
printer lpdgas is idle.  enabled since Oct 21 15:33
printer lpjuan is idle.  enabled since Apr 27 11:05
printer LJcolor is idle.  enabled since Dec  1 14:03
printer scarpatest is idle.  enabled since May 31 16:15

ant:/home/vbe $

Last edited by jim mcnamara; 09-08-2008 at 06:50 PM.. Reason: format output
# 3  
Old 09-08-2008
Just in case you believe HPUX are not as good AIX when it comes to printing, this box serves as OLTP and print server and FTP server and.... and it old and works fine (HPUX10.20...)
Code:
mos:/home/vbe $ model;lpstat -p|grep -v fence
9000/800/K580
printer B001_LJ4000 is idle.  enabled since Dec 14 12:58
printer B002_LJ4050 is idle.  enabled since Dec 14 12:58
printer B003_LJ4050 is idle.  enabled since Dec 14 12:58
printer B006A_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B006B_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B006C_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B006_DJ1220C is idle.  enabled since Dec 14 12:58
printer B006_LJ4000N now printing B006_LJ4000N-1292.  enabled since Dec 14 12:58
printer B007_LJ2200D is idle.  enabled since Dec 14 12:58
printer B008_LJ4000N is idle.  enabled since Dec 14 12:58
printer B010_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B010_LJ4000N is idle.  enabled since Dec 14 12:58
printer B019_LJ4100N is idle.  enabled since Dec 14 12:58
printer B020_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B021_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B022_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B023_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B024_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B025_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B026_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B028_LJ4000N is idle.  enabled since Dec 14 12:58
printer B118_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B119_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B120_LJ2200D is idle.  enabled since Dec 14 12:58
printer B122_LJ4100N is idle.  enabled since Dec 14 12:58
printer B123_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B127_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B130_DJ1220C is idle.  enabled since Dec 14 12:58
printer B131_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B132_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B135_IS2145 is idle.  enabled since Dec 14 12:58
printer B138_DJ2500C is idle.  enabled since Dec 14 12:58
printer B139_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B142_LJ4100N is idle.  enabled since Dec 14 12:58
printer B143_LJ4050 is idle.  enabled since Dec 14 12:58
printer B144_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B191_DJ2500C is idle.  enabled since Dec 14 12:58
printer B191_LJ4000 is idle.  enabled since Dec 14 12:58
printer B192_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B193_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B194_LJ4050 is idle.  enabled since Dec 14 12:58
printer B194_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B195_LJ4000 is idle.  enabled since Dec 14 12:58
printer B195_LJ4100N is idle.  enabled since Dec 14 12:58
printer B196_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B197_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B197_LJ4100N is idle.  enabled since Dec 14 12:58
printer B214_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B214_LJ4100N is idle.  enabled since Dec 14 12:58
printer B215_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B216_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B216_LJ4000N is idle.  enabled since Dec 14 12:58
printer B217_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B218_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B219_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B220_LJ4000 is idle.  enabled since Dec 14 12:58
printer B221_LJ4100N is idle.  enabled since Dec 14 12:58
printer B222_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B223_LJ2300DN is idle.  enabled since Dec 14 12:58
printer B226_LJ4000N is idle.  enabled since Dec 14 12:58
printer B226_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B227_LJ4000N is idle.  enabled since Dec 14 12:58
printer B228_LJ4100DTN is idle.  enabled since Dec 14 12:58
printer B230_LJ4100N is idle.  enabled since Dec 14 12:58
printer B231_LJ8000 is idle.  enabled since Dec 14 12:58
printer B232_LJ4050 is idle.  enabled since Dec 14 12:58
printer B233_LJ4050 is idle.  enabled since Dec 14 12:58
printer B235_LJ4100N is idle.  enabled since Dec 14 12:58
printer B236_LJ4100N is idle.  enabled since Dec 14 12:58
printer B237_LJ4050 is idle.  enabled since Dec 14 12:58
printer B238_LJ4050 is idle.  enabled since Dec 14 12:58
printer B239_LJ2300D is idle.  enabled since Dec 14 12:58
printer B244_LJ4050 is idle.  enabled since Dec 14 12:58
printer B245_LJ2100 is idle.  enabled since Dec 14 12:58
printer B247_LJ2300D is idle.  enabled since Dec 14 12:58
printer B247_LJ4000N is idle.  enabled since Dec 14 12:58
printer B248_LJ4000N is idle.  enabled since Dec 14 12:58
printer B250_LJ4050 is idle.  enabled since Dec 14 12:58
printer lpvbe is idle.  enabled since Dec 14 12:58
printer xerox1 disabled since Dec 14 13:00 -
        reason unknown
printer xerox2 is idle.  enabled since Dec 14 12:58
printer xerox3 is idle.  enabled since Dec 14 12:58
printer B246_LJ4000N is idle.  enabled since Jun 27 10:53


Last edited by jim mcnamara; 09-08-2008 at 06:50 PM..
# 4  
Old 09-09-2008
I do believe HPUX is really good
THe thing is I build a script for a service dest to release print jobs on a AIX system
that they can use really easy. But I also want to use the same script on the HPUX.
But than I need a report looking like the 1 I get from the command
lpstat -W (on AIX)
I am running HPUX 11iv1
My reports are same as VBE.
And I really cant use that on the same script..


I need to have the printers on the HPUX also be able to get released by the service desk from out of a script with options so they never get logged in a shell it self.
# 5  
Old 09-09-2008
You wont get the same since "ready" in aix = " idle " in hpux...
If you want a unique script you would have to test the OS and send the good command...
But if I understand your request, you could do things the other way round:
filter on "disabled" ( common to both...)
# 6  
Old 09-09-2008
I just noted your option -W (not w...) I dont have it on all aix 4.X.X... (?). my apologies
And looking through I dont see how you could get the same output...
If I understand well you have regularly jobs being blocked on you aix box which require someone to enable the printer again ( if not the spoooler itself) is that so?
If so welcome to the club!
# 7  
Old 09-10-2008
Ghehhe thanks..

Yea I made a script for the service desk withoud a shell they can use on the AIX servers to disable/enable and remove print jobs..
That works fine now. Just made with some help from here that they can never get in to the shell on that account.
But yea how to get the same results on the HPUX (the print thiny that is)
And yea all kind of jobs with the printers.
If you want a copy of the script let me know and I will post it.
I have to warn ya, the visual is dutch written at the moment.
But I can change it if you like to english.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Lpstat output in mb?

Hi all, Newbie to the site here and fairly novice to UNIX\LINUX so please bear with me.:) My question is; can the lpstat -t command show the size of the print jobs in mb or gb instead of bytes? They would be much easier to view this way. For more information of what I'm on about; please... (1 Reply)
Discussion started by: Melikins
1 Replies

2. UNIX for Advanced & Expert Users

lpstat ?

Hi, can somebody tell me what is the difference between `lpstat -s` and `lpstat -v` command. thanks. (3 Replies)
Discussion started by: anandgodse
3 Replies

3. Solaris

Need help with lpstat command

Hi lpstat reports me "Failed to contact service for xxxxxx: not-found" lpstat -p test -l printer test unknown state. enabled since Oct 27 12:01 2009. available. Remote Name: XXXXXX Remote Server: sunsrv Failed to contact service for xxxxxx: not-found can someone help... (1 Reply)
Discussion started by: xtreams
1 Replies

4. AIX

lpstat issues

Hi, I tried to migrate a server, I installed AIX on a new server and I want to configure the printer queues. I copied all of files from the old server where the printer queues are working fine. I followed these steps: 1. copy the /etc/qconfig (make a copy of the original before) 2. Copy the... (10 Replies)
Discussion started by: imad77
10 Replies

5. Shell Programming and Scripting

lpstat

Hi, here is lpstat command with queue name. queue name is not valid but lpstat takes my local queue and shows the following results.is there any way that i can stop it after waring message and dont take local print queue. i would like to print a message that queue is not valid but when lpstat... (4 Replies)
Discussion started by: sagii
4 Replies

6. Shell Programming and Scripting

lpstat throughs warning

Hi Guys, I am geting this message ".status: (WARNING): 0781-102 Invalid printer name: xerox".i m reading printer name from a text file.i try to print the value reading from file is correct xerox. if run lpstat -pxerox -l it works fine but when i try to read from file it throughs warining.please... (1 Reply)
Discussion started by: sagii
1 Replies

7. Shell Programming and Scripting

How to compare result lpstat with hostsfile

Hi there all, I got a long list of printers installed and a longer list of printers in my hosts file. In the hosts file I got a even longer list of printers in the hosts file I got the IP adress of all printers next to the printer name. How can I get a script working to get the printers... (0 Replies)
Discussion started by: draco
0 Replies

8. SCO

non root user can't use lpstat

I don't know if anyone still looks at this forum or not, but here goes. I've got two identical SCO OpenServer 5.0.7 machines, fully patched and updated. On one the non-root user can do lpstat -p and it will display a list of printers and their status, on the other: $ lpstat -p UX:lpstat: ERROR:... (3 Replies)
Discussion started by: checkpro
3 Replies

9. UNIX for Advanced & Expert Users

lpstat

Hi, I have been using Hp so far and I am a new user to Solaris.. well, in HP Unix, if I type 'lpstat' if gives me the list of printers connected to the network and their status.. but in solaris it only gives the details if there is any job on the queue. I just want to know what is the... (3 Replies)
Discussion started by: sskb
3 Replies

10. UNIX for Dummies Questions & Answers

lpstat -t

When you do a lpstat -t it displays all your printers and tty values. Where is the file that stores this information in SCO 5.0.5? Thanks in advance Stufine (2 Replies)
Discussion started by: stufine
2 Replies
Login or Register to Ask a Question