lpstat issues

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,
Imad

We do almost the exact same steps that you do but have a little script called qmigrate.sh that we run (see below) which also does a chvirprt command (see below):

#!/bin/ksh

cp /usr/lpp/printers.rte/inst_root/var/spool/lpd/pio/@local/smit/* \
/var/spool/lpd/pio/@local/smit

cd /var/spool/lpd/pio/@local/custom
chmod 775 /var/spool/lpd/pio/@local/custom
for file in `ls`
do
chmod 664 $file
QNAME=`echo $file | cut -d':' -f1`
DEVICE=`echo $file | cut -d':' -f2`
chvirprt -q $QNAME -d $DEVICE
done

Hi

I tried your suggestions and it does not work. Any other suggestions?

Thanks

Try doing 'enq -d' on the new system (as root of course).

I tried enq -d as root and I get the same result UNKNOWN.

Is that the only print queue with the problem?

no all of them.

Well I think I'd delete all of the files/queues and then start over.

Here are the steps I do when I have to migrate print queues from one machine to another. I don't recall ever having an issue after doing these steps.

  1. Copy /etc/qconfig file over to new system

  2. Refresh the qconfig file by typing, "enq -d"

  3. Copy /var/spool/lpd/pio/@local/custom files to new system

  4. Copy /var/spool/lpd/pio/@local/dev files to new system

  5. Copy /var/spool/lpd/pio/@local/ddi files to new system

  6. Copy /etc/hosts file to new system

  7. vi qmigrate.sh and paste in the following

    #!/bin/ksh

    cp /usr/lpp/printers.rte/inst_root/var/spool/lpd/pio/@local/smit/* \
    /var/spool/lpd/pio/@local/smit

    cd /var/spool/lpd/pio/@local/custom
    chmod 775 /var/spool/lpd/pio/@local/custom
    for file in `ls`
    do
    chmod 664 $file
    QNAME=`echo $file | cut -d':' -f1`
    DEVICE=`echo $file | cut -d':' -f2`
    chvirprt -q $QNAME -d $DEVICE
    done

  8. chmod 700 qmigrate.sh

  9. ./qmigrate.sh

  10. Test print queue(s)

Hi,

I tried it and it does not work.

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 is a lot of lines located in /usr/lib/lpd

Hi,

I haven't worked with printers on AIX since ages but generally:
please do a lslpp -L | grep printer and check the output.
You should have 2 filesets ... they should be in state committed or at least applied.
Run lppchk -v and lppchk -c on these files. If they are indeed corrupted, you can do a forced overwrite from the current patchset or install a newer patch level of the filesets...

A nice help page about printing on AIX can be found here http://www.angelfire.com/il2/sgillen/printers.html ... a bit old but some things never really change :slight_smile:

Kind regards
zxmaus

Hi,

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

Thanks guys