1

Can you please tell me why "ps auxw" returned me the following error ?

/proc/15067: No such file or directory

The following is the process which was running at that time and was listed by PS.

ftpib 15067 0.0 0.0 3724 344 ? S 22:40 0:00 bin/qmail-inject

What are possible causes for such error?

Supratik
  • 2,154
  • 10
  • 51
  • 66

1 Answers1

2

I suspect that you've simply encountered a race condition, in which the process exits (a) after ps gets the list of process ids but (b) before it actually reads the files in /proc. Linux -- and I suspect this is true for other unix-like operating systems -- does not provide an atomic mechanism for obtaining information about running processes.

larsks
  • 43,623
  • 14
  • 121
  • 180
  • Interestingly, the process was listed by the ps output, but didn't exist in /proc... – Kyle Smith Jun 14 '11 at 14:33
  • I suspect it *did* exist in /proc, but went away while ps was running. I haven't looked at the code, but it's possible ps performs multiple reads of the /proc files for a process -- thus succeeding once and getting some data but failing a second time. – larsks Jun 14 '11 at 14:35
  • It listed the process as you can see in my above post. Do you think that while PS was reading more information from proc the process ended ? – Supratik Jun 14 '11 at 14:38
  • I got your answer, Sorry i didn't refresh the page. – Supratik Jun 14 '11 at 14:41