We had an interesting request from one of our partners yesterday, their client wanted an email with the page count of a printer. At first we were thinking it couldn’t be done, we would have to set up KNM to monitor the printer, and at best we could print a chart or something.
In researching solutions, we found a set of SNMP command line utilities on SourceForge. As we looked at it, we found we were able to use an “snmpget” command to grab the data from the printer. It seems as if the Total Page count is pretty universal at 126.96.36.199.188.8.131.52.184.108.40.206.1, and we tested it on a half dozen or so different printers and always got a good result.
We also ended up grabbing the Manufacturer and Module of the printer from 220.127.116.11.18.104.22.168.22.214.171.124.7.0. Once we had the raw data, the rest is Kyle’s vbScripting magic. We parse through those outputs and convert the page count to a number. Kyle then created a table that allows you to store ALL the scans, so you have a historical reference!
The first time it runs, you get an email saying “No history found…. “, and we give you the make/model, IP address, and page count.
Anyway, thought I would share this with you, the discovery of snmpget opens up a world of possibilities! The script is called “SNMP Printer page count” and is published on our ClubMSP site (membership required to download), or if you are one of our Hosted partners, listed under “_VA Script\Misc\” in the Kaseya Agent Procedures console.
Do you have any customers that might want a monthly summary of how many pages are being printed? Maybe simply run it anyway, and then include the data in your quarterly/annual reviews!
What are your ideas for other scripts using snmpget? Leave ideas in the comments below, or email us!