?
Solved

Determining if a printer is up and running.

Posted on 2003-03-24
8
Medium Priority
?
563 Views
Last Modified: 2013-12-27
Hi:

   I 've noticed that when I execute the lpstat command I get a list of printers.  Even when the listed printer is turn off it is still listed when I ran the lpstat command.
 

   How can I determine if a printer is up and running.  Somebody mention something about the mac address of the printer broadcasting itself.

       
0
Comment
Question by:nutless
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 8200693
pluto # > lpstat -a
lexmark accepting requests since Fri Feb 28 13:58:25 MET 2003


pluto # > /usr/ucb/lpc
lpc> status
lexmark:
        queueing is enabled
        printing is enabled
        no entries
pluto_lex:
        queueing is enabled
        printing is enabled
        no entries
lpc> help
Commands may be abbreviated.  Commands are:

abort   enable  disable help    restart status  topq    ?
clean   exit    down    quit    start   stop    up
lpc> exit
pluto # > 
0
 
LVL 2

Expert Comment

by:soupdragon
ID: 8201682
Depends on how the printer is connected.

If it's a directly attached network printer you should get a response from ping if it's powered on. Things get trickier if you are spooling to it via another print server (NT or Netware for instance).

If it has a jetdirect card, you can telnet to it and query it's status directly - (including things such as offline, out of paper etc.) You might be able to script this using expect.

SD
0
 

Author Comment

by:nutless
ID: 8204189
Situation is that I created a created bunch of printers using the lpadmin command but the problem is that these printers really does n't exist.

When I use the lpc 's status command it shows that the printer are enable when actually they are not.

I know that printers broadcast their MAC address, how can I intercept these broadcasts.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:austinwmatthews
ID: 8226416
Run a snoop in the console and then ping the printer from another terminal.

If the printer is up and running it will respond.

You should see the MAC, if:
   -the printer is not already in your system's ARP table
   -your system doesn't know the dest MAC of the printer

my .02
0
 

Expert Comment

by:austinwmatthews
ID: 8226491
oh yeah, you can run a 'arp -a' to see if the MAC is already in you're arp table associated with it's IP address.

good luck ...
0
 

Expert Comment

by:SuryaGE
ID: 8293709
1) Lpstat -a
2) Lpstat -pprintqueue name
3) If connected to network then telnet the printer ( ipaddress) enter / and status
0
 
LVL 18

Expert Comment

by:liddler
ID: 10476779
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ  No refund

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 

Accepted Solution

by:
amp072397 earned 0 total points
ID: 10522882
PAQed - no points refunded (of 20)

amp
Community Support Moderator amp~at~experts-exchange.com
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question