1 / 7

Printeraccounting

Printeraccounting. Werner Maes 16 december 2005. Wat doet het?. Bijhouden van aantal afgedrukte pagina’s van elke gebruiker die van samba & cups afprint. Het werkt via een perl script dat via snmp de printer gaat ondervragen

chars
Télécharger la présentation

Printeraccounting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Printeraccounting Werner Maes 16 december 2005

  2. Wat doet het? Bijhouden van aantal afgedrukte pagina’s van elke gebruiker die van samba & cups afprint. Het werkt via een perl script dat via snmp de printer gaat ondervragen • enkel voor printers die het common printer MIB ondersteunen (vb. HP met Jetdirect Card). Vereist: perl module Net-SNMP

  3. Hoe werkt het? Het perl script ondervraagt het aantal pagina’s afdrukt door de printer via SNMP vóór en na de printopdracht, maakt het verschil en slaat dit op in een tekstbestand per gebruiker. Het ondersteunt ook het blokkeren van gebruikers (en jobs). MIB = protocol om op een standaard manier via SNMP attributen van een printer te ondervragen.

  4. Aanpassing aan /etc/cups/printers.conf <Printer hplj5> Info HP Laserjet 5 Location pclab DeviceURI accsnmp://lpd://10.33.6.166 State Idle Accepting Yes </Printer>

  5. PrinterOID (oid = object identifier) snmpwalk -v 1 -c public 10.33.6.166 1.3.6.1.2.1.43.10 SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 = Counter32: 70919 SNMPv2-SMI::mib-2.43.10.2.1.5.1.1 = Counter32: 59 1.3.6.1.2.1.43.10.2.1.4.1.1 = totaal aantal afgedrukte pagina’s 1.3.6.1.2.1.43.10.2.1.5.1.1 = totaal aantal afgedrukte pagina’s sinds laatste herstart van printer.  Welke oids relevant zijn is het makkelijkst te vinden via trial and error

  6. Duplex printen In het perl script kan je kiezen om dubbelzijdige prints voor 1 ofwel voor 2 te laten meetellen. snmpwalk -v 1 -c public 10.33.6.196 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2 SNMPv2-SMI::enterprises.11.2.3.9.4.2.1.4.1.2.5.0 = INTEGER: 2321 SNMPv2-SMI::enterprises.11.2.3.9.4.2.1.4.1.2.22.0 = INTEGER: 1032 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.5.0 = totaal aantal pagina’s 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.2.22.0 = totaal aantal pagina’s dubbelzijdig

  7. Nog meer mogelijkheden Vb: HP Laserjet 4300dtn 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.1.1.12.1.0 = Aantal pagina’s afgedrukt met nieuwe toner in A4 1.3.6.1.4.1.11.2.3.9.4.2.1.4.1.10.5.1.1.0 = Resterend aantal pagina’s met toner

More Related