Hp JetDirect Page count...

Federico De Marchi fdemarchi at altapd.it
Tue Jun 24 15:47:59 CEST 2003


Anyone have maked a plugin for have the count
of the pages?
i have found this code, but i'm unable to pilot the code....
---------begin perl code----------------------
#!/usr/bin/perl
# vi: set sw=4 ts=4:
#
use IO;
$ipaddress = $ARGV[0];
my $sock = IO::Socket::INET->new(
                                PeerAddr => $ipaddress,
                                PeerPort => 9100,
                                Proto    => 'tcp'
                                )
        || die "Impossibile connettersi a $ipaddress, porta 9100: $!\n";
 
my $eol="\x0A"; # LF
my $esc="\x1B"; # ESC
my $pagecount="$esc\%-12345X\@PJL JOB$eol"
                    . "\@PJL INFO PAGECOUNT$eol"
                    . "\@PJL EOJ$eol"
                    . "$esc\%-12345X";
my $dati;
$sock->send("$pagecount");
$sock->recv($dati, 1024);
close $sock;
print "Output:\n$dati\n";
-------------end perl code----------------



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list