Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lpstat issue

30 views
Skip to first unread message

Imad

unread,
Aug 24, 2009, 9:38:28 AM8/24/09
to
Hi,
I tried to migrate a server, I installed AIX on a new server and I
want to configure the printer queues. I copied all of files from the
old server where the printer queues are working fine. I followed these
steps:

1. copy the /etc/qconfig (make a copy of the original before)
2. Copy the following files:
/var/spool/lpd/pio/@local/custom/*
/var/spool/lpd/pio/@local/dev/*
/var/spool/lpd/pio/@local/ddi/*
3. change the permissions on the copied files to 664
chmod 664 filename
chgrp printq filename
4. cycle the printer subsystem
stopsrc -s qdaemon
startsrc -s qdaemon

When I check the services, I get this result:

#lssrc -s qdaemon
Subsystem Group PID Status
qdaemon spooler 494536 active

#lpstat
Queue Dev Status
------- ----- ---------
trav1 hp@lp UNKNOWN


WHen I check in this directory "ls /var/spool/lpd/stat/", I got this
result:
"s.trav1."

It should be "s.trav1.hp@lptrav", the device name is missing.

Here is the part of the configuration in /etc/qconfig:

trav1:
device = hp@lptrav
hp@lptrav:
file = /var/spool/lpd/pio/@local/dev/
hp@lptrav#hpJetDirect#9100
header = never
trailer = never
access = both
backend = /usr/lib/lpd/pio/etc/piojetd lptrav 9100


I can ping lptrav printer. I have this issue for all queues.

How can I resolve this issue to be able to associate the queue name to
the device name and how can I get the READY status instead UNKNOWN
status in lpstat command?

Thanks,

Haydar

steven_nospam at Yahoo! Canada

unread,
Aug 24, 2009, 10:56:03 AM8/24/09
to

You may be missing a few steps. Here are the routines I use to copy
printers between servers:

Copy the following files from the old server to the new server:

/etc/qconfig
/var/spool/lpd/pio/@local/custom/*
/var/spool/lpd/pio/@local/dev/*

After you have done this, execute the following script on the new
server:

cd /var/spool/lpd/pio/@local/custom
for QUEUE in $(ls)
do
/usr/lib/lpd/pio/etc/piodigest $QUEUE
done

steven_nospam at Yahoo! Canada

unread,
Aug 24, 2009, 10:58:01 AM8/24/09
to
On Aug 24, 10:56 am, "steven_nospam at Yahoo! Canada"
> done- Hide quoted text -
>
> - Show quoted text -

keep in mind that all the drivers have to be available and installed,
and if you are using any Digi Realport drivers or such, those may not
get created correctly.

Imad

unread,
Aug 24, 2009, 11:08:36 AM8/24/09
to
On 24 août, 10:56, "steven_nospam at Yahoo! Canada"
> done- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

Hi Steven,

I installed all of printer drivers.

I already copied the following files:

/etc/qconfig
/var/spool/lpd/pio/@local/custom/*
/var/spool/lpd/pio/@local/dev/*

I tried this script, it runs without errors but the files keep their
old date.

cd /var/spool/lpd/pio/@local/custom
for QUEUE in $(ls)
do
/usr/lib/lpd/pio/etc/piodigest $QUEUE
done

Is another thing that I should check?

Thanks,

Imad

laix...@laixsoft.com

unread,
Aug 24, 2009, 11:29:37 AM8/24/09
to
You really don't need to copy over the stat files in /var/spool/lpd/stat.
They will be rebuilt. Definitely run the script to rebuild the smit screens
and such.

Best regards,
Paul

> After you have done this, execute the following script on the new
> server:
>
> cd /var/spool/lpd/pio/@local/custom
> for QUEUE in $(ls)
> do
> /usr/lib/lpd/pio/etc/piodigest $QUEUE

> done- Masquer le texte des messages pr�c�dents -
>
> - Afficher le texte des messages pr�c�dents -

Imad

unread,
Aug 24, 2009, 11:33:14 AM8/24/09
to
On 24 août, 11:29, <laixs...@laixsoft.com> wrote:
> You really don't need to copy over the stat files in /var/spool/lpd/stat.
> They will be rebuilt.  Definitely run the script to rebuild the smit screens
> and such.
>
> Best regards,
> Paul
>
> > After you have done this, execute the following script on the new
> > server:
>
> > cd /var/spool/lpd/pio/@local/custom
> > for QUEUE in $(ls)
> > do
> > /usr/lib/lpd/pio/etc/piodigest $QUEUE
> > done- Masquer le texte des messages précédents -
>
> > - Afficher le texte des messages précédents -

>
> Hi Steven,
>
> I installed all of printer drivers.
>
> I already copied the following files:
>
> /etc/qconfig
> /var/spool/lpd/pio/@local/custom/*
> /var/spool/lpd/pio/@local/dev/*
>
> I tried  this script, it runs without errors but the files keep their
> old date.
>
> cd /var/spool/lpd/pio/@local/custom
> for QUEUE in $(ls)
> do
>   /usr/lib/lpd/pio/etc/piodigest $QUEUE
> done
>
> Is another thing that I should check?
>
> Thanks,
>
> Imad

Hi Paul,

Can you give me the commands that I have to run?

Thanks,

laix...@laixsoft.com

unread,
Aug 24, 2009, 6:55:02 PM8/24/09
to

"Imad" <hayda...@hotmail.com> wrote in message
news:4bdbc30d-ce51-41e3...@c2g2000yqi.googlegroups.com...

On 24 ao�t, 11:29, <laixs...@laixsoft.com> wrote:
> You really don't need to copy over the stat files in /var/spool/lpd/stat.
> They will be rebuilt. Definitely run the script to rebuild the smit
> screens
> and such.

Hi Paul,

Can you give me the commands that I have to run?


How about:
stopsrc -cs qdaemon
rm /var/spool/lpd/stat/*
startsrc -s qdaemon

cd /var/spool/lpd/pio/@local/custom
for QUEUE in `ls`
do
/usr/lib/lpd/pio/etc/piodigest $QUEUE


Imad

unread,
Aug 25, 2009, 8:23:57 AM8/25/09
to
On 24 août, 18:55, <laixs...@laixsoft.com> wrote:
> "Imad" <haydar2...@hotmail.com> wrote in message
>
> news:4bdbc30d-ce51-41e3...@c2g2000yqi.googlegroups.com...

> On 24 août, 11:29, <laixs...@laixsoft.com> wrote:
>
> > You really don't need to copy over the stat files in /var/spool/lpd/stat.
> > They will be rebuilt. Definitely run the script to rebuild the smit
> > screens
> > and such.
>
> Hi Paul,
>
> Can you give me the commands that I have to run?
>
> How about:
> stopsrc -cs qdaemon
> rm /var/spool/lpd/stat/*
> startsrc -s qdaemon
>
>  cd /var/spool/lpd/pio/@local/custom
>  for QUEUE in `ls`
>  do
>  /usr/lib/lpd/pio/etc/piodigest $QUEUE

Hi,

I tried these commands and I got thye same issue.
By the way, I tried this command and I get these messages:

#lppchk -c
lppchk: 0504-208 Size of /usr/lib/lpd/digest is 44634,
expected value was 44874.
lppchk: 0504-208 Size of /usr/lib/lpd/qstatus is 60220,
expected value was 60236.
lppchk: 0504-212 The checksum for file /usr/lib/lpd/rembak is 44075,
expected value is 49331.
lppchk: 0504-208 Size of /usr/lib/lpd/pio/etc/piodigest is 126236,
.....

There are a lot of lines located in /usr/lib/lpd
What do you think about this messages?could it be the cause?

Thanks

Henry

unread,
Aug 25, 2009, 4:42:43 PM8/25/09
to

what lead you to run lppchk ?

steven_nospam at Yahoo! Canada

unread,
Aug 26, 2009, 10:42:18 AM8/26/09
to
On Aug 25, 8:23 am, Imad <haydar2...@hotmail.com> wrote:
> I tried these commands and I got thye same issue.
> By the way, I tried this command and I get these messages:
>
> #lppchk -c
> lppchk: 0504-208 Size of /usr/lib/lpd/digest is 44634,
> expected value was 44874.
> lppchk: 0504-208 Size of /usr/lib/lpd/qstatus is 60220,
> expected value was 60236.
> lppchk: 0504-212 The checksum for file /usr/lib/lpd/rembak is 44075,
> expected value is 49331.
> lppchk: 0504-208 Size of /usr/lib/lpd/pio/etc/piodigest is 126236,

If you suspect that the installation has failed or the recreation of
queues did not work properly, my rule of thumb is to go back to the
beginning and start over. My advice would be the following:

1) Restore from a mksysb (you should ALWAYS create one before messing
with O/S files, hope you have one)

2) Make sure that the queues are back the way they were before you
started all this work

3) Copy the files I indicated in my original mail, then run the
for..do loop to "piodigest" the queue info.

If you continue to have problems, you may want to publish the last
30-50 lines of your /etc/qconfig so we can see examples of how the
printer queues are configured, and a listing of the /var/spool/lpd/pio/
@local/custom showing filenames and ownerships/permissions. If you
have hundreds of queues, perhaps just show the last 10-20 files in
this area so we get an idea of these files.

SteveN

Imad

unread,
Aug 28, 2009, 1:18:25 PM8/28/09
to
On 26 août, 10:42, "steven_nospam at Yahoo! Canada"

Hi,

I resolved the issues, I installed the good version of the files from
another server. Now it works fine.

Thanks guys

0 new messages