<?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 Re: Printer Queue Management - recording usage stats in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504498#M217136</link>
    <description>Are there any "gotchas" I should be aware of with mrtg with HP-UX 11.i?</description>
    <pubDate>Tue, 20 Sep 2005 18:41:33 GMT</pubDate>
    <dc:creator>TheJuiceman</dc:creator>
    <dc:date>2005-09-20T18:41:33Z</dc:date>
    <item>
      <title>Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504489#M217127</link>
      <description>Hi everyone!!!&lt;BR /&gt;&lt;BR /&gt;I was just wondering if anyone has any suggestions for monitoring printer activity (such as recording the number of print jobs, recording user activity on a printer, recording byte count, etc).  I know there are a lot of packaged software available to manage queues, but I would rather keep it simple (and cheap LOL).  Has anyone written any scripts they would be willing to share?  Any thoughts?  &lt;BR /&gt;&lt;BR /&gt;As always, thank you all for the help!!!&lt;BR /&gt;&lt;BR /&gt;Bobby</description>
      <pubDate>Mon, 14 Mar 2005 23:03:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504489#M217127</guid>
      <dc:creator>TheJuiceman</dc:creator>
      <dc:date>2005-03-14T23:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504490#M217128</link>
      <description>It should be rather simple to add a line or two to every interface file in /var/spool/lp/interface. Byte coults are easy when the lp command is given a regular file but you will also have to detect when lp is fed from a pipe and basically cat to a temp file and then do a byte count of the temp file and send the temp file to the printer. I'm glad you didn't mention pages because with modern printers (eg Laserjets) page breaks only have meaning to the print device. &lt;BR /&gt;&lt;BR /&gt;Plan B. If these are all Laserjets, you might instead query the printers themselves for statistics periodically rather than relying upon the lp subsystem.</description>
      <pubDate>Mon, 14 Mar 2005 23:50:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504490#M217128</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-03-14T23:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504491#M217129</link>
      <description>Following up on Clay's suggestions:&lt;BR /&gt;&lt;BR /&gt;In my browser, I have bookmarked my hp2600 inkjet network printer. At the end of the year and after each ink cartridge and printhead replacement, I print a usage report. I also get the same reports from a lj4m printer but I have to go to the printer to get it since the information is not available on the network.&lt;BR /&gt;&lt;BR /&gt;You do not get user information this way but you can keep up with the printer pretty well.</description>
      <pubDate>Wed, 16 Mar 2005 09:39:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504491#M217129</guid>
      <dc:creator>Sam McKnight</dc:creator>
      <dc:date>2005-03-16T09:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504492#M217130</link>
      <description>Use mrtg...&lt;BR /&gt;&lt;BR /&gt;Fron cron I run:&lt;BR /&gt;&lt;BR /&gt;# mrtg&lt;BR /&gt;3,8,13,18,23,28,33,38,43,48,53,58 * * * * [ -d /var/adm/lp/XEBEC ] &amp;amp;&amp;amp; /usr/local/bin/mrtg-stats &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /usr/local/bin/mrtg-stats&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# generate mrtg file for stats&lt;BR /&gt;SERVER=`uname -n`&lt;BR /&gt;MRTGLP=/tmp/iprprt.lp.stats.mrtg&lt;BR /&gt;mv /tmp/LPSTATCUR /tmp/LPSTATOLD&lt;BR /&gt;LPSTATOLD=`cat /tmp/LPSTATOLD`&lt;BR /&gt;LPSTATCUR=`/usr/bin/grep End /var/adm/lp/log |wc |awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;echo $LPSTATCUR&amp;gt;/tmp/LPSTATCUR&lt;BR /&gt;&lt;BR /&gt;LPSTATNEW=`expr $LPSTATCUR - $LPSTATOLD`&lt;BR /&gt;&lt;BR /&gt;echo $LPSTATNEW &amp;gt; $MRTGLP&lt;BR /&gt;echo 0 &amp;gt;&amp;gt; $MRTGLP&lt;BR /&gt;uptime | awk '{print $3,$4,$5}' |sed s/,//g &amp;gt;&amp;gt;$MRTGLP&lt;BR /&gt;echo $SERVER &amp;gt;&amp;gt;$MRTGLP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;MRTGFTP=/tmp/prodbci.ftp.stats.mrtg&lt;BR /&gt;mv /tmp/FTPSTATCUR /tmp/FTPSTATOLD&lt;BR /&gt;FTPSTATOLD=`cat /tmp/FTPSTATOLD`&lt;BR /&gt;FTPSTATCUR=`/usr/bin/grep FTP /var/adm/syslog/syslog.log |wc |awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;echo $FTPSTATCUR&amp;gt;/tmp/FTPSTATCUR&lt;BR /&gt;&lt;BR /&gt;FTPSTATNEW=`expr $FTPSTATCUR - $FTPSTATOLD`&lt;BR /&gt;&lt;BR /&gt;echo $FTPSTATNEW &amp;gt; $MRTGFTP&lt;BR /&gt;echo 0 &amp;gt;&amp;gt; $MRTGFTP&lt;BR /&gt;uptime | awk '{print $3,$4,$5}' |sed s/,//g &amp;gt;&amp;gt;$MRTGFTP&lt;BR /&gt;echo $SERVER &amp;gt;&amp;gt;$MRTGFTP&lt;BR /&gt;&lt;BR /&gt;Then, from the server where mrtg is running, grab those files...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 16 Mar 2005 09:57:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504492#M217130</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2005-03-16T09:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504493#M217131</link>
      <description>Clay, Thanks for the input (as always!!!).  Since I have 200 printers to keep up with, going around to each one is really something I don't want to do if I can help it.  We are also wanting to get data on a "per server" usage.  Any thoughts?&lt;BR /&gt;&lt;BR /&gt;Sam, thanks for the suggestion, but checking printers is really something I want to avoid.&lt;BR /&gt;&lt;BR /&gt;Geoff, interesting script.  However, could you decipher some of it for me?  For example I don't understand the mrtg file where the first line is a list of numbers.  I am also assuming that XEBEC is your printer.  Sorry if I seem a bit dumb with this, but unfortunately scripting is not my strength.  &lt;BR /&gt;&lt;BR /&gt;Thanks everyone for the help.</description>
      <pubDate>Fri, 16 Sep 2005 21:27:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504493#M217131</guid>
      <dc:creator>TheJuiceman</dc:creator>
      <dc:date>2005-09-16T21:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504494#M217132</link>
      <description>The "[ -d /var/adm/lp/XEBEC ] &amp;amp;&amp;amp; " in cron just checks to see if the directory /var/adm/lp/XEBEC exists - I do that cause my print spool is in a MC/SG cluster....so you can drop that part...&lt;BR /&gt;&lt;BR /&gt;The mrtg file - the first line is the number of print requests the last 5 minutes...&lt;BR /&gt;&lt;BR /&gt;The 0 is a place holder (required by mrtg)...&lt;BR /&gt;&lt;BR /&gt;I'm not at work right now - but if you want  - I can post my mrtg.cfg file...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Sat, 17 Sep 2005 21:39:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504494#M217132</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2005-09-17T21:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504495#M217133</link>
      <description>I never suggested that you visit each printer to gather statistics. My idea would be to use a Web scraper to gather the data from each printer. Note that HP printers (the newer ones at least) have built in web servers and actually gather the statistics you are interested in.</description>
      <pubDate>Sun, 18 Sep 2005 21:22:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504495#M217133</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-09-18T21:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504496#M217134</link>
      <description>Geoff,&lt;BR /&gt;&lt;BR /&gt;Any info you can give on how you have this set up I greatly appreciate!!!&lt;BR /&gt;&lt;BR /&gt;Clay,&lt;BR /&gt;&lt;BR /&gt;Unfortunately we have a ton of old printers here.  Like I said we work on a shoe-string budget with printing.  I need a way to incorporate older printers too.&lt;BR /&gt;&lt;BR /&gt;Thanks you guys for the help!!!</description>
      <pubDate>Mon, 19 Sep 2005 09:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504496#M217134</guid>
      <dc:creator>TheJuiceman</dc:creator>
      <dc:date>2005-09-19T09:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504497#M217135</link>
      <description>Well, after you install mrtg, add this to you mrtg.cfg file:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Target[iprprt.lp]: `cat /tmp/iprprt.lp.stats.mrtg`&lt;BR /&gt;Options[iprprt.lp]: nopercent,growright,perhour&lt;BR /&gt;Title[iprprt.lp]: LP: Spool Requests per hour on IPRPRT&lt;BR /&gt;PageTop[iprprt.lp]: &lt;H1&gt;LP: Spool Requests per hour on IPRPRT&lt;/H1&gt;&lt;BR /&gt;MaxBytes[iprprt.lp]: 1000000000&lt;BR /&gt;YLegend[iprprt.lp]: reqs/hour&lt;BR /&gt;ShortLegend[iprprt.lp]: per hour&lt;BR /&gt;LegendI[iprprt.lp]: &amp;nbsp;Requests:&lt;BR /&gt;Legend1[iprprt.lp]: Requests per hour&lt;BR /&gt;LegendO[iprprt.lp]:&lt;BR /&gt;&lt;BR /&gt;#------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Target[iprdbci.ftp]: `cat /tmp/iprdbci.ftp.stats.mrtg`&lt;BR /&gt;Options[iprdbci.ftp]: nopercent,growright,perhour&lt;BR /&gt;Title[iprdbci.ftp]: FTP: Requests per hour on IPR&lt;BR /&gt;PageTop[iprdbci.ftp]: &lt;H1&gt;FTP: Requests per hour on IPR&lt;/H1&gt;&lt;BR /&gt;MaxBytes[iprdbci.ftp]: 1000000000&lt;BR /&gt;YLegend[iprdbci.ftp]: reqs/hour&lt;BR /&gt;ShortLegend[iprdbci.ftp]: per hour&lt;BR /&gt;LegendI[iprdbci.ftp]: &amp;nbsp;Requests:&lt;BR /&gt;Legend1[iprdbci.ftp]: Requests per hour&lt;BR /&gt;LegendO[iprdbci.ftp]:&lt;BR /&gt;&lt;BR /&gt;#------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I run from cron like so (AIX):&lt;BR /&gt;&lt;BR /&gt;0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/mrtg-2/bin/mrtg /htdocs/mambo/mrtg/mrtg.cfg --logging /var/adm/mrtg.log &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;On my test server (HP) I run it like so:&lt;BR /&gt;&lt;BR /&gt;#0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/mrtg /opt/hpws/apache/mrtg/mrtg.cfg --logging /var/adm/mrtg.log &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;All depends where mrtg is installed...&lt;BR /&gt;&lt;BR /&gt;More info on MRTG:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://people.ee.ethz.ch/~oetiker/webtools/mrtg/" target="_blank"&gt;http://people.ee.ethz.ch/~oetiker/webtools/mrtg/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Latest package for MRTG on HP-UX:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Networking/Admin/mrtg-2.12.2/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Networking/Admin/mrtg-2.12.2/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Extra: How to monitor HP-UX via snmp and MRTG - add to your mrtg.cfg file:&lt;BR /&gt;&lt;BR /&gt;######################################################################&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Target[sha1.myinternaldomain.comcpup]:.1.3.6.1.4.1.11.2.3.1.1.15.0&amp;amp;.1.3.6.1.4.1.11.2.3.1.1.13.0:mycommunityname@sha1.&lt;BR /&gt;myinternaldomain.com + .1.3.6.1.4.1.11.2.3.1.1.16.0&amp;amp;.1.3.6.1.4.1.11.2.3.1.1.14.0:mycommunityname@sha1.myinternaldomain.com&lt;BR /&gt;Title[sha1.myinternaldomain.comcpup]: CPU Load on sha1.myinternaldomain.com&lt;BR /&gt;MaxBytes[sha1.myinternaldomain.comcpup]: 100&lt;BR /&gt;Ylegend[sha1.myinternaldomain.comcpup]: CPU Load&lt;BR /&gt;ShortLegend[sha1.myinternaldomain.comcpup]: %&lt;BR /&gt;PageTop[sha1.myinternaldomain.comcpup]: &lt;H1&gt;CPU Load on sha1.myinternaldomain.com&lt;/H1&gt;&lt;BR /&gt;Options[sha1.myinternaldomain.comcpup]: integer, growright, nopercent&lt;BR /&gt;WithPeak[sha1.myinternaldomain.comcpup]: wmy&lt;BR /&gt;LegendO[sha1.myinternaldomain.comcpup]: User/System: &amp;nbsp;&lt;BR /&gt;LegendI[sha1.myinternaldomain.comcpup]: Idle/Nice: &amp;nbsp;&lt;BR /&gt;Legend1[sha1.myinternaldomain.comcpup]: Idle/Nice CPU Time&lt;BR /&gt;Legend2[sha1.myinternaldomain.comcpup]: User/System CPU Time&lt;BR /&gt;Legend3[sha1.myinternaldomain.comcpup]: Maximal Idle/Nice CPU Time&lt;BR /&gt;Legend4[sha1.myinternaldomain.comcpup]: Maximal User/System CPU Time&lt;BR /&gt;&lt;BR /&gt;######################################################################&lt;BR /&gt;&lt;BR /&gt;Target[sha1.myinternaldomain.commem]: .1.3.6.1.4.1.11.2.3.1.1.7.0&amp;amp;.1.3.6.1.4.1.11.2.3.1.1.8.0:mycommunityname@sha1.pc&lt;BR /&gt;acorp.net&lt;BR /&gt;Title[sha1.myinternaldomain.commem]: Memory on sha1.myinternaldomain.com&lt;BR /&gt;MaxBytes[sha1.myinternaldomain.commem]: 100000000&lt;BR /&gt;Ylegend[sha1.myinternaldomain.commem]: Memory Usage&lt;BR /&gt;ShortLegend[sha1.myinternaldomain.commem]: &amp;nbsp;&lt;BR /&gt;PageTop[sha1.myinternaldomain.commem]: &lt;H1&gt;Memory on sha1.myinternaldomain.com&lt;/H1&gt;&lt;BR /&gt;Options[sha1.myinternaldomain.commem]: integer, gauge, growright, nopercent&lt;BR /&gt;kilo[sha1.myinternaldomain.commem]: 1024&lt;BR /&gt;WithPeak[sha1.myinternaldomain.commem]: wmy&lt;BR /&gt;LegendO[sha1.myinternaldomain.commem]: Total: &amp;nbsp;&lt;BR /&gt;LegendI[sha1.myinternaldomain.commem]: Free: &amp;nbsp;&lt;BR /&gt;Legend1[sha1.myinternaldomain.commem]: Free System Memory&lt;BR /&gt;Legend2[sha1.myinternaldomain.commem]: Total Available System Memory&lt;BR /&gt;Legend3[sha1.myinternaldomain.commem]: Maximal Available System Memory&lt;BR /&gt;Legend4[sha1.myinternaldomain.commem]: Maximal Free System Memory&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Sep 2005 10:43:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504497#M217135</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2005-09-19T10:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504498#M217136</link>
      <description>Are there any "gotchas" I should be aware of with mrtg with HP-UX 11.i?</description>
      <pubDate>Tue, 20 Sep 2005 18:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504498#M217136</guid>
      <dc:creator>TheJuiceman</dc:creator>
      <dc:date>2005-09-20T18:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504499#M217137</link>
      <description>Also, I see that it requires libpng, zlib, and gd.  Do you know of any HP ready versions of these?  Thanks.</description>
      <pubDate>Wed, 21 Sep 2005 17:02:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504499#M217137</guid>
      <dc:creator>TheJuiceman</dc:creator>
      <dc:date>2005-09-21T17:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Printer Queue Management - recording usage stats</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504500#M217138</link>
      <description>No gotchas - should be able to get thos depots on the Porting Centre...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 21 Sep 2005 19:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/printer-queue-management-recording-usage-stats/m-p/3504500#M217138</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2005-09-21T19:53:13Z</dc:date>
    </item>
  </channel>
</rss>

