Hp JetDirect Page count...
Harlan Richard C
HarlanRichardC at JohnDeere.com
Tue Jun 24 17:53:59 CEST 2003
What I ended up doing was using SNMP walk to pull the page count from the
system, then passing that information back into Nagios. For the most part it
works but it is always off about 10 pages because of the way HP write this
information to the NVRAM.
-----Original Message-----
From: Federico De Marchi [mailto:fdemarchi at altapd.it]
Sent: Tuesday, June 24, 2003 8:48 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Hp JetDirect Page count...
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
-------------------------------------------------------
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