- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Printer Monitoring Script - to report on Status - ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО06-07-2004 07:48 AM
тАО06-07-2004 07:48 AM
Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
Sometimes, the Windows NT server serving the printers would go down or its UNIX printing service (LPD) would go down or it's DNS domain changes, etc...
Does anyone have a script created to inventory and report on the status of all the Printers defined on UNIX?
Thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2004 09:37 AM
тАО06-07-2004 09:37 AM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
I am missing something here obviously but "lpstat -t" does a reasonably good job!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2004 09:48 AM
тАО06-07-2004 09:48 AM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
I was wondering the same too..
# lpstat -p does a good job for me.
If you want to know abt. only problem printers, you may grep the output like this.
# lpstat -p | grep -v -E "idle|fence|printing"
If you want to go further, you could also ping the remote lpd host's ip address to see if they respond via a script like this.
cd /etc/lp/interface/
ls ps* | while read lp
do
echo $lp
lpstat -p$lp | grep -v -E "idle|fence|printing" >> /var/adm/printer_stat.log
host=`grep "PERIPH=" $lp |grep -v MODEL| awk -F"=" '{print $2}'`
ping $host -n 2 >> /var/adm/printer_stat.log
done
HTH,
Abdul.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2004 01:54 PM
тАО06-07-2004 01:54 PM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
rm -rf WindowsNT
install Linux
configure remote-printers
retrain WindowsAdmins
(sorry, I couldn't resist)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2004 02:27 PM
тАО06-07-2004 02:27 PM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
the status of the network printer needs only the lpstat command.
# lpstat -o
tells u the print currently in queue.
# lpstat -t
tells u if the printers are enable.
i frequently use the above 2 options for lpstat and this command should suffice if u need a script as well.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2004 01:07 AM
тАО06-08-2004 01:07 AM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
for i in /etc/lp/interface/*;do
echo Checking `basename $i`
echo =========================================================================
PRT=`basename $i`
lpstat -o${PRT} 2>&1 |egrep "unknown|waiting|down|bus">/dev/null
if [ $? -ne 0 ];then
echo $PRT is down|tee -a DOWN_PRINTERS
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2004 06:09 PM
тАО06-08-2004 06:09 PM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
lpstat -o${PRT} 2>&1 |egrep "unknown|waiting|down|bus">/dev/null
with
rlpstat -d${PRT} -u
might give a better performance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2004 06:17 PM
тАО06-08-2004 06:17 PM
Re: Printer Monitoring Script - to report on Status - down, unresponsive Print Server, etc...
if you are interested only in remote printers you can query the directory /var/spool/lp/sinterface instead of /var/spool/lp/interface.