<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic check status for printer in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163513#M456643</link>
    <description>i have few hpux box which are using network perinter,&lt;BR /&gt;i want to write a small script which will check the printer status and if status is disable it will enable and send me email.&lt;BR /&gt;</description>
    <pubDate>Sun, 15 Mar 2009 07:44:38 GMT</pubDate>
    <dc:creator>pratapvfr</dc:creator>
    <dc:date>2009-03-15T07:44:38Z</dc:date>
    <item>
      <title>check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163513#M456643</link>
      <description>i have few hpux box which are using network perinter,&lt;BR /&gt;i want to write a small script which will check the printer status and if status is disable it will enable and send me email.&lt;BR /&gt;</description>
      <pubDate>Sun, 15 Mar 2009 07:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163513#M456643</guid>
      <dc:creator>pratapvfr</dc:creator>
      <dc:date>2009-03-15T07:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163514#M456644</link>
      <description>for enable and disable printer you need to use below commands.&lt;BR /&gt;&lt;BR /&gt;enable &lt;PRINTER name=""&gt;&lt;BR /&gt;disable &lt;PRINTER name=""&gt;&lt;BR /&gt;&lt;BR /&gt;if you want to get email you should have install sendmail in your hpux box.&lt;BR /&gt;&lt;BR /&gt;for writting script i believe you can try with sell script in hpux, logic should be declair printer alias, and with if condition check the status for printer, at present i dont have any script but should try something this.&lt;BR /&gt;this may help.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;/PRINTER&gt;&lt;/PRINTER&gt;</description>
      <pubDate>Mon, 16 Mar 2009 04:07:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163514#M456644</guid>
      <dc:creator>avizen9</dc:creator>
      <dc:date>2009-03-16T04:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163515#M456645</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use lpstat -t&lt;BR /&gt;&lt;BR /&gt;The "lpstat" command with the "-t" option gives you total information about the printer status. This option is generally the most useful, but the printout can be lengthy if you have a large number for printers configured.&lt;BR /&gt;&lt;BR /&gt;From the output of the above command you can write a script as per your requirment.&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Mon, 16 Mar 2009 04:31:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163515#M456645</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-03-16T04:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163516#M456646</link>
      <description>okey,&lt;BR /&gt;commands looks ok, but if will get some script then will be good,</description>
      <pubDate>Mon, 16 Mar 2009 05:14:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163516#M456646</guid>
      <dc:creator>pratapvfr</dc:creator>
      <dc:date>2009-03-16T05:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163517#M456647</link>
      <description>HI,&lt;BR /&gt;you may try something below, if its work ok then add sendmail to get email, let us know how it goes, thanks,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;printer=hplaserjet&lt;BR /&gt;printerstatus=`lpstat -p\`echo $printer\`|awk {'print $5'}`&lt;BR /&gt;&lt;BR /&gt;if [ $printerstatus!= "enabled" ]&lt;BR /&gt;        then&lt;BR /&gt;          enable $printer&lt;BR /&gt;         fi</description>
      <pubDate>Tue, 17 Mar 2009 15:03:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163517#M456647</guid>
      <dc:creator>avizen9</dc:creator>
      <dc:date>2009-03-17T15:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163518#M456648</link>
      <description>ok, i have tried with it, looks fine, but not complete solusion which i require,&lt;BR /&gt;&lt;BR /&gt;its shows printer satatus and also able to enable it.&lt;BR /&gt;&lt;BR /&gt;how to get email when it enable? i am trying with sendmail, anyone can guide me for this.</description>
      <pubDate>Thu, 19 Mar 2009 02:28:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163518#M456648</guid>
      <dc:creator>pratapvfr</dc:creator>
      <dc:date>2009-03-19T02:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163519#M456649</link>
      <description>&lt;!--!*#--&gt;&amp;gt;how to get email when it enable?&lt;BR /&gt;&lt;BR /&gt;Just change it to:&lt;BR /&gt;if [ $printerstatus != "enabled" ]; then&lt;BR /&gt;   enable $printer&lt;BR /&gt;   echo "printer enabled" | mailx -s "Enabling printer: $printer" mail@foo.com&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Mar 2009 03:56:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163519#M456649</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-19T03:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163520#M456650</link>
      <description>also you can try with this&lt;BR /&gt;&lt;BR /&gt;sendmail -F printername abcd@domain.com /etc/message.txt&lt;BR /&gt;&lt;BR /&gt;here message.txt is the message which you want to send when printer will enable.&lt;BR /&gt;&lt;BR /&gt;so here this sendmail line you need to write for each and every printer, hope this will help, let us know, thanks,</description>
      <pubDate>Thu, 19 Mar 2009 04:46:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163520#M456650</guid>
      <dc:creator>avizen9</dc:creator>
      <dc:date>2009-03-19T04:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: check status for printer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163521#M456651</link>
      <description>thanks for all your efford here, its work fine.</description>
      <pubDate>Thu, 19 Mar 2009 04:54:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-status-for-printer/m-p/5163521#M456651</guid>
      <dc:creator>pratapvfr</dc:creator>
      <dc:date>2009-03-19T04:54:01Z</dc:date>
    </item>
  </channel>
</rss>

