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 1.3.6.1.2.1.43.10.2.1.4.1.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 1.3.6.1.4.1.11.2.3.9.1.1.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.
Subsequent emails (different printer shown) will also show the page change since the date it last ran, and we even calculate the average pages per day!
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!