- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to check if a Printer is Defined on another UN...
Operating System - HP-UX
1819809
Members
2821
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2006 01:33 AM
тАО07-14-2006 01:33 AM
How to check if a Printer is Defined on another UNIX Print Server
Does anyone have any quick trick to check from one UNIX machine if a printer is defined on another UNIX machine (acting as a print server)?
Am developing a script to add printers pointing to printers defined on a designated UNIX print server. One check I'd like to add is to check whether the printer is defined on the remote UNIX Print Server. It seems "lpadmin" when performing an add, does not check the existence of the printer on the Print Server.
Thanks.
Am developing a script to add printers pointing to printers defined on a designated UNIX print server. One check I'd like to add is to check whether the printer is defined on the remote UNIX Print Server. It seems "lpadmin" when performing an add, does not check the existence of the printer on the Print Server.
Thanks.
Hakuna Matata.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2006 02:48 AM
тАО07-14-2006 02:48 AM
Re: How to check if a Printer is Defined on another UNIX Print Server
The only way I can think of is to use a remote command - like remsh or ssh to that server and execute
lpstat -pQUEUENAME
Now, if the queues are different, then you have more work...
Basically, you would have to do a remsh (or ssh) to the remote system, and grep for the hostname in /etc/lp/interface/*
or ip address if you use ip's instead of hostnames (which is a bad thing!).
Rgds...Geoff
lpstat -pQUEUENAME
Now, if the queues are different, then you have more work...
Basically, you would have to do a remsh (or ssh) to the remote system, and grep for the hostname in /etc/lp/interface/*
or ip address if you use ip's instead of hostnames (which is a bad thing!).
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2006 03:33 PM
тАО07-14-2006 03:33 PM
Re: How to check if a Printer is Defined on another UNIX Print Server
I'm not sure how it would be done in a script (since the rlpstat command should not be invoked manually), but I do know of a way to do it from a Windows system using lpq:
C:\>lpq -Sgdosux.atl.hp.com -Psos01101
no entries
gdosux: Warning: sos01101 is down
gdosux: sos01101: ready and waiting
lpq -Ssystemname -Premoteprintername
C:\>lpq -Sgdosux.atl.hp.com -Psos01101
no entries
gdosux: Warning: sos01101 is down
gdosux: sos01101: ready and waiting
lpq -Ssystemname -Premoteprintername
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2006 05:01 AM
тАО07-15-2006 05:01 AM
Re: How to check if a Printer is Defined on another UNIX Print Server
Only the local system knows if it has printers attached, so you'll need to run lpstat -v on the remote system. Stay away from lpstat -t as it performs remote interrogation on network and shared printers and can easily hang.
Bill Hassell, sysadmin
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP