[Semibug] determining exit status

Dr. Robert Meier list1c30fe42 at bellsouth.net
Tue May 23 19:05:35 EDT 2017


I believe you are asking about "Process Accounting".
	See acct(2), acct(5), ps(1),
	Linux Process Accounting HOWTO
I have not personally used process accounting.

To log process end time and end system state,
  you need package acct (or similar) installed and enabled with
  acct(2) or equivalent.
openSuSE-13.2 and Raspbian-2017-03-02 do not install package acct
  by default.

In my limited experience, problematic processes usually spend several
  score minutes before being reaped, so the process state information
  below has usually been sufficient for problem process diagnosis.
	ps -ef | grep 7777	# POSIX arguments
  See ps(1) for details.
	... (header "STAT" or "S") ...
               D    uninterruptible sleep (usually IO)
               R    running or runnable (on run queue)
               S    interruptible sleep (waiting for an event
			to complete)
               T    stopped, either by a job control signal
			or because it is being traced
               W    paging (not valid since the 2.6.xx kernel)
               X    dead (should never be seen)
               Z    defunct ("zombie") process, terminated
			but not reaped by its parent

If the process id has already been reclaimed (reaped),
  normal linux configuration retains no information.

Hopefully helpful,


On 05/22/2017 04:19 PM, Mark Moellering wrote:
> I have a question for the group, as this is a little out of my
> territory;  If I am running a php application and it spawns a new
> process (for example, pid : 7777)  Is there a way I can determine when
> that process ended and if it exited cleanly or if it exited on an
> error?
> I am trying to go through stackoverflow but I was wondering is someone
> here couldn't pint me in a good direction.  Right now, most of the
> answers involve some sort of bash script.  Didn't know if someone had
> other ideas
> Thanks
> Mark
> _______________________________________________
> Semibug mailing list
> Semibug at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/semibug

More information about the Semibug mailing list