Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lpd starting another lpd and syslog errors

Status
Not open for further replies.

jimktrains

IS-IT--Management
Jan 19, 2007
50
US
I have a customer running SCO unix 5.0.5 and I have just noticed recently these errors in their syslog file

lpd [#####]: fcntl: name: lock: Permission denied

where ##### is a process ID and name is a printer name. This shows an error for all printers they have, about 6, and it is constantly writing to the syslog file. I've checked all permissions against our system and they are all correct.

I noticed when running ps -ef | grep lpd there are two syslog processes running
root 374 1 Jan-09 ? 23:44:25 /usr/lib/lpd
root 23440 374 09:24:26 ? 00:00:00 /usr/lib/lpd

If I run ps -ef | grep lpd again, there are two lpd processes running but the second one has a new PID number and the parent is always the first lpd which never changes PID or PPID. Every once in a while when I run ps -ef | grep lpd, only one shows but that's probably because I did it between the second stopping and starting again.

Why would lpd be starting a second lpd? They have rebooted the system and it's still happening, and I don't know when this may have started. And is this causing the errors in syslog or something else? I found another thread about the syslog and it suggested removing and reinstalling printers but it doesn't say if that helped. I really don't want to do that as the system is constantly in use.

Thanks in advance.
Jim
 
It's normal to see multiple instances of the LPD process running. There should be one "parent" process, and multiple "child" processes (one for each printer configured with lpd).
Have you reviewed the contents of /usr/spool/lpd?
You should have a subdirectory for each configured printer, and in each should be a "lock" file.
Here are examples, but from a current release of SCO:
Code:
# ls -ld /usr/spool/lpd
drwxrwxr-x   24 root     daemon    2048 Jul  9  2008 /usr/spool/lpd
# ls -ld /usr/spool/lpd/w5
drwxrwxr-x    2 root     daemon      96 Dec 22 12:04 /usr/spool/lpd/w5
# ls -l /usr/spool/lpd/w5
total 4
-rw-r--r--    1 root     root         5 Dec 22 12:04 lock


"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
I understand there is a second lpd when a print job is processing, but during this time, there are no print jobs. It is constantly starting a second lpd. There are lock files in the /usr/spool/lpd/printername directory. And the errors in the syslog are almost continuously being written. I have to clear it all out once in a while or their disk would get completely used.

Is there somewhere the parent lpd is looking that would cause it to keep spawning a second lpd?

Jim
 
As a workaround you may try this:
chmod -R ugo+rw /var/spool/lpd/*

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Does your /etc/printcap file reflect the same printers as found in /usr/spool/lpd?

The secondary lpd processes would normally be running all the time, even if a job isn't being processed. In your case, the secondary lpd is failing and restarting constantly, filling up the log.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
Yes they are.

When I run the ps -ef command, the parent lpd process has 82 under the C column which is the cpu usage and under TIME is 04:12:24 which keeping growing. When I run it on our system, it's zero under C and 00:00:00 under TIME.

I can't seem to see the child process anymore, but it must be running as the syslog is still filling up with different process ID numbers.
 
How about the oft-recommended:

# /tcb/bin/integrity -e

If the output is lengthy, you can pipe it to "more". You might not want to fix all that it says is wrong, but it can often be quite helpful.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
I ran integrity and it only reported the mode of /usr/spool/lp was 777 and should be 775. This is most likely something I did to try and eliminate the permissions problem. I set it back to 775 but the errors are still occurring in the syslog. I ran integrity after and nothing else showed.
 
Do you have a /usr/lpd directory? If so, please compare its contents to these that I have (from another 5.0.5 box that's still breathing):
Code:
testbox # pwd
/usr/lpd
testbox # l local
total 838
---x--s--x   1 bin      lp         57472 Oct 31  2000 cancel
---x--s--x   1 bin      lp         91484 Oct 31  2000 lp
---x--s--x   1 bin      lp         64204 Oct 31  2000 lpmove
---x--s--x   1 bin      lp         91484 Oct 31  2000 lpr
---x--s--x   1 bin      lp        116120 Oct 31  2000 lpstat
testbox # l remote
total 280
-rws--s--x   1 root     daemon     27504 Sep 14  1999 cancel@
-rws--s--x   1 root     daemon     36680 Sep 14  1999 lp@
-rws--s--x   1 root     daemon     40952 Sep 14  1999 lpmove@
-rws--s--x   1 root     daemon     33184 Sep 14  1999 lpstat@

From what I could tell, these aren't included in the "integrity" utility, but their permissions and ownership are still important.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
motoslide - The directory is there and the listing of those two directories are identical to yours, except for the dates.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top