Well I can't say for sure if this will help you much, but I wrote a simple
little perl script to query the pagecount info (grepping IFHP to find the
appropriate query commands). It may help to diagnose whats going on --
It works fine on my Laserjet 4050N. I actually use a much expanded
variant of this script to compile pagecount logs for all the printers in
my department.
Here it is FWIW-
#getPC.pl
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
use IO;
$ipaddress = $ARGV[0];
my $sock=IO::Socket::INET->new(PeerAddr => $ipaddress,
PeerPort => '9100',
Proto => 'tcp',
Type => SOCK_STREAM) || die "Sorry,
could not connect to $ipaddress, port 9100.\n!";
my $eol="\x0A"; # Hardcode the linefeed character for portability
my $esc="\x1B"; # Hardcode escape character
my $pagecount="$esc\%-12345X\@PJL JOB$eol"
. "\@PJL INFO PAGECOUNT$eol"
. "\@PJL EOJ$eol" . "$esc\%-12345X";
my $stuff;
$sock->send("$pagecount");
$sock->recv($stuff, 1024);
close $sock;
print "Output:\n$stuff\n";
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can also use the above method to change the printer display if you're
feeling experimentive with the following changes:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
use IO;
$ipaddress = $ARGV[0];
my $sock=IO::Socket::INET->new(PeerAddr => $ipaddress,
PeerPort => '9100',
Proto => 'tcp',
Type => SOCK_STREAM) || die "Sorry,
could not connect to $ipaddress, port 9100.\n!";
my $eol="\x0A"; # Hardcode the linefeed character for portability
my $esc="\x1B"; # Hardcode escape character
my $ChangeDisplay="$esc\%-12345X\@PJL JOB$eol"
. "\@PJL RDYMSG DISPLAY = \"Printer Low on Blood\"$eol"
. "\@PJL EOJ$eol" . "$esc\%-12345x";
my $stuff;
$sock->send("$ChangeDisplay");
$sock->recv($stuff, 1024);
close $sock;
print "Output:\n$stuff\n";
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Good luck
Steve Harper
Campus Student Computing
University of Utah
On Fri, 17 Aug 2001, Ryan Novosielski wrote:
> I mentioned before having problems with my LaserJet 4100N printer -- the
> only way to get page accounting "work" (and this is only at 95% accuracy) is
> to do a pagecount_poll=15 and pagecount_interval=1, or some similar values.
> I have since called HP about this, and they have replaced my firmware. This
> /still/ did not solve the problem. I then called JetDirect, and they
> suggested I swap cards with another printer. The problem followed the
> printer. I was then referred back to the LaserJet 4100 folks and they looked
> into the problem. They were unable to come up with a solution, and requested
> that they be able to know how the page counter was being queried in an
> effort to reproduce the problem. I do not know enough about ifhp to be able
> to tell them offhand what is exactly happening. I'd appreciate any help I
> could be given in advice for exactly how to go about diagnosing the real
> problem with HP and getting these printers fixed. I guess Patrick would be
> the one who would know the most about this, but I'd also like to ask again:
> is ANYONE using a LaserJet 4100N successfully with accounting (I now have 2
> that count funny), and does anyone know how I could help HP to reproduce
> this problem on their own?
>
> Thanks in advance!
>
> ---- _ _ _ _ ___ _ _ _
> |Y#| | | |\/| | \ |\ | | | Ryan Novosielski - Jr. UNIX Systems Admin
> |$&| |__| | | |__/ | \| _| | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
> \__/ Univ. of Med. and Dent. | IST/ACS - New Jersey Medical School - C630
>
>
>
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
>
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------