- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Printer Queue Management - recording usage stats
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
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
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
03-14-2005 03:03 PM
03-14-2005 03:03 PM
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?
As always, thank you all for the help!!!
Bobby
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 03:50 PM
03-14-2005 03:50 PM
Re: Printer Queue Management - recording usage stats
Plan B. If these are all Laserjets, you might instead query the printers themselves for statistics periodically rather than relying upon the lp subsystem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2005 01:39 AM
03-16-2005 01:39 AM
Re: Printer Queue Management - recording usage stats
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.
You do not get user information this way but you can keep up with the printer pretty well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2005 01:57 AM
03-16-2005 01:57 AM
Re: Printer Queue Management - recording usage stats
Fron cron I run:
# mrtg
3,8,13,18,23,28,33,38,43,48,53,58 * * * * [ -d /var/adm/lp/XEBEC ] && /usr/local/bin/mrtg-stats >/dev/null 2>&1
# cat /usr/local/bin/mrtg-stats
#!/bin/sh
# generate mrtg file for stats
SERVER=`uname -n`
MRTGLP=/tmp/iprprt.lp.stats.mrtg
mv /tmp/LPSTATCUR /tmp/LPSTATOLD
LPSTATOLD=`cat /tmp/LPSTATOLD`
LPSTATCUR=`/usr/bin/grep End /var/adm/lp/log |wc |awk '{print $1}'`
echo $LPSTATCUR>/tmp/LPSTATCUR
LPSTATNEW=`expr $LPSTATCUR - $LPSTATOLD`
echo $LPSTATNEW > $MRTGLP
echo 0 >> $MRTGLP
uptime | awk '{print $3,$4,$5}' |sed s/,//g >>$MRTGLP
echo $SERVER >>$MRTGLP
MRTGFTP=/tmp/prodbci.ftp.stats.mrtg
mv /tmp/FTPSTATCUR /tmp/FTPSTATOLD
FTPSTATOLD=`cat /tmp/FTPSTATOLD`
FTPSTATCUR=`/usr/bin/grep FTP /var/adm/syslog/syslog.log |wc |awk '{print $1}'`
echo $FTPSTATCUR>/tmp/FTPSTATCUR
FTPSTATNEW=`expr $FTPSTATCUR - $FTPSTATOLD`
echo $FTPSTATNEW > $MRTGFTP
echo 0 >> $MRTGFTP
uptime | awk '{print $3,$4,$5}' |sed s/,//g >>$MRTGFTP
echo $SERVER >>$MRTGFTP
Then, from the server where mrtg is running, grab those files...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2005 02:27 PM
09-16-2005 02:27 PM
Re: Printer Queue Management - recording usage stats
Sam, thanks for the suggestion, but checking printers is really something I want to avoid.
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.
Thanks everyone for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2005 02:39 PM
09-17-2005 02:39 PM
SolutionThe mrtg file - the first line is the number of print requests the last 5 minutes...
The 0 is a place holder (required by mrtg)...
I'm not at work right now - but if you want - I can post my mrtg.cfg file...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2005 02:22 PM
09-18-2005 02:22 PM
Re: Printer Queue Management - recording usage stats
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2005 02:50 AM
09-19-2005 02:50 AM
Re: Printer Queue Management - recording usage stats
Any info you can give on how you have this set up I greatly appreciate!!!
Clay,
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.
Thanks you guys for the help!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2005 03:43 AM
09-19-2005 03:43 AM
Re: Printer Queue Management - recording usage stats
#------------------------------------------
Target[iprprt.lp]: `cat /tmp/iprprt.lp.stats.mrtg`
Options[iprprt.lp]: nopercent,growright,perhour
Title[iprprt.lp]: LP: Spool Requests per hour on IPRPRT
PageTop[iprprt.lp]:
LP: Spool Requests per hour on IPRPRT
MaxBytes[iprprt.lp]: 1000000000
YLegend[iprprt.lp]: reqs/hour
ShortLegend[iprprt.lp]: per hour
LegendI[iprprt.lp]: Requests:
Legend1[iprprt.lp]: Requests per hour
LegendO[iprprt.lp]:
#------------------------------------------
Target[iprdbci.ftp]: `cat /tmp/iprdbci.ftp.stats.mrtg`
Options[iprdbci.ftp]: nopercent,growright,perhour
Title[iprdbci.ftp]: FTP: Requests per hour on IPR
PageTop[iprdbci.ftp]:
FTP: Requests per hour on IPR
MaxBytes[iprdbci.ftp]: 1000000000
YLegend[iprdbci.ftp]: reqs/hour
ShortLegend[iprdbci.ftp]: per hour
LegendI[iprdbci.ftp]: Requests:
Legend1[iprdbci.ftp]: Requests per hour
LegendO[iprdbci.ftp]:
#------------------------------------------
I run from cron like so (AIX):
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 >/dev/null 2>&1
On my test server (HP) I run it like so:
#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 >/dev/null 2>&1
All depends where mrtg is installed...
More info on MRTG:
http://people.ee.ethz.ch/~oetiker/webtools/mrtg/
Latest package for MRTG on HP-UX:
http://hpux.ee.ualberta.ca/hppd/hpux/Networking/Admin/mrtg-2.12.2/
Extra: How to monitor HP-UX via snmp and MRTG - add to your mrtg.cfg file:
######################################################################
Target[sha1.myinternaldomain.comcpup]:.1.3.6.1.4.1.11.2.3.1.1.15.0&.1.3.6.1.4.1.11.2.3.1.1.13.0:mycommunityname@sha1.
myinternaldomain.com + .1.3.6.1.4.1.11.2.3.1.1.16.0&.1.3.6.1.4.1.11.2.3.1.1.14.0:mycommunityname@sha1.myinternaldomain.com
Title[sha1.myinternaldomain.comcpup]: CPU Load on sha1.myinternaldomain.com
MaxBytes[sha1.myinternaldomain.comcpup]: 100
Ylegend[sha1.myinternaldomain.comcpup]: CPU Load
ShortLegend[sha1.myinternaldomain.comcpup]: %
PageTop[sha1.myinternaldomain.comcpup]:
CPU Load on sha1.myinternaldomain.com
Options[sha1.myinternaldomain.comcpup]: integer, growright, nopercent
WithPeak[sha1.myinternaldomain.comcpup]: wmy
LegendO[sha1.myinternaldomain.comcpup]: User/System:
LegendI[sha1.myinternaldomain.comcpup]: Idle/Nice:
Legend1[sha1.myinternaldomain.comcpup]: Idle/Nice CPU Time
Legend2[sha1.myinternaldomain.comcpup]: User/System CPU Time
Legend3[sha1.myinternaldomain.comcpup]: Maximal Idle/Nice CPU Time
Legend4[sha1.myinternaldomain.comcpup]: Maximal User/System CPU Time
######################################################################
Target[sha1.myinternaldomain.commem]: .1.3.6.1.4.1.11.2.3.1.1.7.0&.1.3.6.1.4.1.11.2.3.1.1.8.0:mycommunityname@sha1.pc
acorp.net
Title[sha1.myinternaldomain.commem]: Memory on sha1.myinternaldomain.com
MaxBytes[sha1.myinternaldomain.commem]: 100000000
Ylegend[sha1.myinternaldomain.commem]: Memory Usage
ShortLegend[sha1.myinternaldomain.commem]:
PageTop[sha1.myinternaldomain.commem]:
Memory on sha1.myinternaldomain.com
Options[sha1.myinternaldomain.commem]: integer, gauge, growright, nopercent
kilo[sha1.myinternaldomain.commem]: 1024
WithPeak[sha1.myinternaldomain.commem]: wmy
LegendO[sha1.myinternaldomain.commem]: Total:
LegendI[sha1.myinternaldomain.commem]: Free:
Legend1[sha1.myinternaldomain.commem]: Free System Memory
Legend2[sha1.myinternaldomain.commem]: Total Available System Memory
Legend3[sha1.myinternaldomain.commem]: Maximal Available System Memory
Legend4[sha1.myinternaldomain.commem]: Maximal Free System Memory
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2005 11:41 AM
09-20-2005 11:41 AM
Re: Printer Queue Management - recording usage stats
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 10:02 AM
09-21-2005 10:02 AM
Re: Printer Queue Management - recording usage stats
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 12:53 PM
09-21-2005 12:53 PM
Re: Printer Queue Management - recording usage stats
Rgds...Geoff