How to Determine If Printer is Offline from Terminal?

My printer is connected via USB, but the device it powered off. In System Preferences -> Printers & Scanners, the printer has a red dot with "Offline" as its status.
How can I obtain a printer's "online/offline" status from Terminal?
lpstat -s reports:
system default destination: Canon_iP4200_2
device for Canon_iP4200_2: usb://Canon/iP4200?serial=306DD0
lpstat -p reports:
printer Canon_iP4200_2 is idle.  enabled since Thu Nov  7 09:36:45 2013
So the printer is idle, but it is also "offline". How do I see the "offline" part in Terminal?

Hi Larry
You can use this command to list the status in terminal
lpstat -p
You will get a list of all the printers and for an offline one like this it will be on the next line from the current job status
printer Samsung_ML_1510_700 now printing Samsung_ML_1510_700-131.  enabled since Wed 18 Dec 15:41:11 2013
          The printer is offline.
For normal ones you get this
printer Peninsula_Port_2_Datamax is idle.
And for disabled ones this
printer I4208 disabled since Thu 27 Jun 16:56:31 2013
Regards
Guy
www.peninsula-group.com

Similar Messages

  • How do I copy printer software files from a folder on my desktop to a CD?

    How do I copy printer software files from a folder on my desktop to a CD?

    Select all the files, right click and choose burn.

  • How to Change the Default SSH Port from Terminal ?

    How to Change the Default SSH Port from Terminal ?

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to Change the Default SSH Port from Terminal ? now showing default SSH Port 22 i need change it pls help me how can do

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to reset the network IP address from terminal/command line in Mac OSX?

    Do anyone knows how to set the network IP address from terminal/command line in Mac OS X?

    how about a GUI, ever heard of a GUI? it's this really neat thing, where you don't have to worry about remembering long strings of text to do something. Mac OS X actually has a rather decent one (that was sarcasm by the way, Mac is the best) you could have it done in like 30 sec, if you use the network pane of system preferences.

  • How to read and print a Pdf from Server

    Hallo, i need a help. I have some pdf documents on server and i want to allow viewing and printing them from the client. I would like not to have it outside my application cause i don't want client computers have to download adobe reader.. I think that purePDF can help me but i really don't know how to load the stream and put it on display.. Can anyone help me or give me some advices?
    Thx for all
    Max

    The simplest way that I know of would be to use 'navigateToURL()' and let the user to print the pdf from the browser.
    Does anyone have the advice on doing this within the Flex app; i.e. without opening a new browser window?
    FTQuest.

  • How to script to Print a document from SAP Business One SDK

    I have created a project using UDO, Form and User table using B1DE2005.
    I wonder how can i program to print a document from my screen. something like Sales Order, where user can click on Print Preview button and it will print the sales order confirmation preview..
    KC

    Where do you want to execute this print/print preview?  Inside Sales Order?
    If that is the case use the print event, now if you have your own form and is separate of any of the SAP B1 system forms, then you will have to use the menu event and evaluate when they have press the print button (which you also probably will have to make sure that is active).
    WB

  • How to determine the download media required from my License key?

    Hi
    After recently rebuilding a dead PC,  The user has advised me she used to use Illustrator.
    Unfortunately the user does not have the install media available.
    Support advised my license key is a volume license for Design Standard.
    I have downloaded Design Standard (Universal) but the Licence key is not accepted.
    Can anyone advise how to determine the correct download based on my License key?
    Many thanks

    Some times you may need to sign in to volume licensing account and download
    refer
    Adobe Licensing Website | Serial numbers | Orders | Accounts

  • How to determine the Country and Organization from IP

    Hi,
    I would like to determine the Country and Organization from a given IP. I have to write a JSP, which when given the IP address gives the country and the organization to which the IP belongs. The organization may be the ISP, or a MNC or any other corporate/government body, or it may be of an individual. I have to do it progamitically from inside a JSP?
    Any suggestions anybody
    Thanks in Advance for your reply

    even when tracking IP's, if it is static you can narrow it down pretty far - if it's dynamic, you can only narrow it down to a specific part of the country.

  • How to determine the Current Domain name from inside an Mbean / Java Prog

    We have registered an Application Defined MBean. The mbean has several APIs. Now we want to determine the currrent domain using some java api inside this Mbean. Similarly we have deployed a Webapp/Service in the Weblogic domain. And inside this app we need to know the current Domain. Is there any java api that will give this runtime information.
    Note: We are the MBean providers not clients who can connect to the WLS (using user/passwd) and get the domain MBean and determine the domain.
    Fusion Applcore

    Not sure if this will address exactly what you are looking to do, but I use this technique all the time to access runtime JMX information from within a Weblogic deployed application without having to pass authentication credentials. You are limited, however, to what you can access via the RuntimeServiceMBean. The example class below shows how to retrieve the domain name and managed server name from within a Weblogic deployed application (System.out calls only included for simplicity in this example):
    package com.yourcompany.jmx;
    import javax.management.MBeanServer;
    import javax.management.ObjectName;
    import javax.naming.InitialContext;
    public class JMXWrapper {
        private static JMXWrapper instance = new JMXWrapper();
        private String domainName;
        private String managedServerName;
        private JMXWrapper() {
        public static JMXWrapper getInstance() {
            return instance;
        public String getDomainName() {
            if (domainName == null) {
                try {
                    MBeanServer server = getMBeanServer();
                    ObjectName domainMBean = (ObjectName) server.getAttribute(getRuntimeService(), "DomainConfiguration");
                    domainName = (String) server.getAttribute(domainMBean, "Name");
                } catch (Exception ex) {
                    System.out.println("Caught Exception: " + ex);
                    ex.printStackTrace();
            return domainName;
        public String getManagedServerName() {
            if (managedServerName == null) {
                try {
                    managedServerName = (String) getMBeanServer().getAttribute(getRuntimeService(), "ServerName");
                } catch (Exception ex) {
                    System.out.println("Caught Exception: " + ex);
                    ex.printStackTrace();
            return managedServerName;
        private MBeanServer getMBeanServer() {
            MBeanServer retval = null;
            InitialContext ctx = null;
            try {
                //fetch the RuntimeServerMBean using the
                //MBeanServer interface
                ctx = new InitialContext();
                retval = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
            } catch (Exception ex) {
                System.out.println("Caught Exception: " + ex);
                ex.printStackTrace();
            } finally {
                if (ctx != null) {
                    try {
                        ctx.close();
                    } catch (Exception dontCare) {
            return retval;
        private ObjectName getRuntimeService() {
            ObjectName retval = null;
            try {
                retval = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
            } catch (Exception ex) {
                System.out.println("Caught Exception: " + ex);
                ex.printStackTrace();
            return retval;
    }I then created a simply test JSP to call the JMXWrapper singleton and display retrieved values:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page import="com.yourcompany.jmx.JMXWrapper"%>
    <%
       JMXWrapper jmx = JMXWrapper.getInstance();
       String domainName = jmx.getDomainName();
       String managedServerName = jmx.getManagedServerName();
    %>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JMX Wrapper Test</title>
        </head>
        <body>
            <h2>Domain Name: <%= domainName %></h2>
            <h2>Managed Server Name: <%= managedServerName %></h2>
        </body>
    </html>

  • How to determine Tax and Basic amount from BSEG entry

    Hi Guru's,
    How can I determine from the BSEG table the following lines for one BELNR?
    I need to know the TAX amount and the basic amount (without TAX). When I search  the bseg table I see tree lines and the field DMBTR contains all values but I need to determine which line is the line with tax amount and the line with the basic amount.
    Hope someone can help me out.
    Best regards.
    Edited by: Julius Bussche on Jan 9, 2009 1:58 PM
    Please use meaningfull subject titles.

    Hello,
    How can I determine from the BSEG table the following lines for one BELNR?
    I need to know the TAX amount and the basic amount (without TAX). When I search the bseg table I see tree lines and the field DMBTR contains all values but I need to determine which line is the line with tax amount and the line with the basic amount.
    In our system we have BSEG-BUZID: 'T' (for Tax items)
    For the Tax line:
    BSEG-HWBAS: Tax Base Amount in Local Currency
    BSEG-DMBTR: Tax Amount in Local Currency
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Jan 9, 2009 1:39 PM

  • Determine if Printer is offline or online

    Hello,
    Does anybody know if it is possible to determine if a printer is online or offline when I start printing ?
    Thank you vermy much for your help !!!

    in
    System.getProperties()
    on getProperty() you can get the status on proper driver specification
    this is a native interface
    though direct detection is not possible

  • How can I prevent printing of this FROM location label even if suppressed?

    I am using Crystal Reports 10.
    The examples follow the problem description.
    The idea is print a label when moving one part from one location to another.
    The Control ID# is the main parameter which I must receive in order to get the values from the 3rd party software to print the label information.
    The Control Rec# is from the Record Number within Crystal Reports.
    The Trans Rec ID# is the data I am retrieving from the transaction table.  This Trans Rec ID# s the link between the Control ID# table, which also contains the Trans Rec ID# for this table.
    The 3rd party software always passes one control record#, which will always have two records - one negative quantity and one positive quantity.  The records are always in order by negative then positive quantity.  Also, the Trans Rec ID# is in ascending sequence.  The negative record will display "FROM" in the location portion of the label.
       NOTE:  Each time the label is to be printed, there are two more records created in the transaction table.
    Here is a list of what I have tried, by itself and/or in conjunction with the others:
    - in the Record Selection, I have tried selecting just the positive quantity, which will give me a leading blank page
    - suppressed the Report Header
    - conditionally suppressed report header - always prints blank page at beginning (see Example #2)
    - conditionally suppressed detail (this works fine - see Example #2)
    - sorting records in descending order by quantity
    - sorting records in descending order by Trans Rec ID#
    - grouping by Trans Rec ID#
    - grouping by quantity
    Whenever I try to suppress the printing of the negative quantity label, which I do not want to print, it always prints as a blank page.  Is there a way to keep it from doing this?  Is there something I can do that I am missing?
    Example #1  : Suppressing report/page headers
    Part#  ABC      Control ID# 166551   Control Rec# 1   Trans Rec ID# 143497   ...
    Quantity = -1   Location = DC0-19   (This is the FROM Label)                                                                                .
    Part#  ABC      Control ID# 166551   Control Rec# 1   Trans Rec ID# 143498   ... 
    Quantity = 1     Location = DOCK     (This is the TO Label - no indicator of From/To prints)
    =================================================================
    Example #2  : In Record Select, selecting only positive quantity and suppressing headers
    (Blank page prints here - negative record is the first record)
    Part#  ABC      Control ID# 166551   Control Rec# 1   Trans Rec ID# 143505   ... 
    Quantity = 1     Location = DOCK     (This is the TO Label - no indicator of From/To prints)
    =================================================================
    Edited by: Rose Goehring on Aug 10, 2010 11:54 PM
    Edited by: Rose Goehring on Aug 11, 2010 12:01 AM

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to determine the error code, returned from LDAP server

    I use the next code for connect to LDAP server:
            try{
                ctx = new InitialLdapContext(env, null);
                 //if connection successfull ...
            } catch (NamingException){
                 //if error occured ...
            }Is it possible to determine the numeric error code, returned from server?

    I was just working on using openldap, binding to it and checking for expired passwords and locked accounts and it looks like that an AuthenticationException is thrown in these circumstances and the ctx is null so it is not possible process connection response controls. But you can look at operation attributes if you have password policy enabled and you are looking for these type of errors

  • How to determine if user is autheticated (from non-secured resource in web)

    Is it possible to determine if a user is autheticated from a non-secured servlet in a web application?
    I have a servlet served to both public and autheticated users. This servlet performs different logic depending the user whether is autheticated or not.
    The getRemoteUser() is useless due to the servlet is not protected (for public users).
    My application is set to use declarative security and form based logon.

    Please try it out...getRemoteUser is the answer..
    For example, Lets consider the following scenario.
    S1 -- secured servlet
    S2 -- public servlet
    (assuming form-login already happened)
    Req1 -- S1 -- dispatches to -- S2 (getRemoteUser returns the user authenticated)
    Req1 -- S2 (getRemoteUser returns null)

Maybe you are looking for

  • More specific to two questions

    Hi, First of all, many thanks to Rottier, Daniel, Geoff. Your ideas are definitely useful. Regarding two questions I posted yesterday, I’d like to give you more background information so that it will make questions more specific. Now we have a lot of

  • Tilda and sort order in iTunes

    I used to put a tilda (~) in front of an album title to get it to move to the top of the alphabetized album list in iTunes browser view. Unfortunately, with the recent upgrade to v 7.3, the program no longer recognizes the tilda (it just ignores it a

  • Where can I find a java online manaul ?

    I want to find some documentions for java manual ,could you tell me where I can get it? Thank you very much.

  • Acrobat 9pro install

    Hello, I have my Acrobat Pro 9 disk and recently reinstalled to my laptop. When starting acrobat pro, just the word Acrobat comes up on top of the Mac, nothing else happens. When i try to open a document with the open with command, same thing happens

  • Is Tree node open or closed ?

    How do I check for this ? I`m using expandChildrenOf to expand all children of a clicked node (label). I would like it to reverse it (pass 'false' as second arg to expandAllChildren) if the node is already open. But how do I know its open ? Have look