PID - Getting the processname of terminated/old Process


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers PID - Getting the processname of terminated/old Process
# 1  
Old 08-27-2008
PID - Getting the processname of terminated/old Process

Hi all!

I'm using CentOS 5.2 with KDE.

Is it possible to get a processname/cmd of a terminated process (= PID not present with PS-command) ?

Are the processnames/scriptnames logged somewhere? (I did not find them in /var/log/messages)

Last edited by JohnMurdoch; 08-27-2008 at 05:24 AM..
# 2  
Old 08-27-2008
There is not normally any way to recover the PID of a process after it's removed from the process table. Some process-accounting add-ons such as sar might be able to provide you with this information.
# 3  
Old 08-27-2008
thank you for information! I will look at sar

One last little question,
is there a general table for exit codes in linux or has every process its own exit codes?
(e.g. exit codes from /var/log/messages)
# 4  
Old 08-27-2008
There is some standardization but no generally applicable convention, other than that 0 means success and other values are failure codes. Examine the exit codes for grep as a good example (they are explained in its manual page); many of them are rather specific to the application.
# 5  
Old 08-27-2008
As era said there is some standardization. These are documentated in /usr/include/errno.h and on the man pages for each command, utility or interface.
# 6  
Old 08-27-2008
Actually on Linux /usr/include/errno.h is just a morass of conditional #includes and no real documentation. /usr/include/asm-generic/errno-base.h is closer to what used historically to be in the generic top-level errno.h; see also asm-generic/errno.h
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Redhat Virtualization EN error : InitLogger main process terminated with status 1

My server has /var/log/messages with 'init: initLogger main process (608798) terminated with status 1' errors. I researched about the error and also followed the steps from stackexchange : 157059/error-init-ttys0-dev-ttys0-main-process-1612-terminated-with-status-1]linux - ERROR: init: ttyS0... (0 Replies)
Discussion started by: Paras Pandey
0 Replies

2. AIX

How to get process name from PID?

HI, i used ps -ef | grep 3539052 | grep -v grep and i got a output like ths root 3539052 3407918 0 May 07 - 709:31 /usr/sbin/syslogd but what i need is instead of full path /usr/sbin/syslogd i want only the process name that is 'syslogd' here. (3 Replies)
Discussion started by: sumanthupar
3 Replies

3. UNIX for Dummies Questions & Answers

Process getting terminated after sleep iterations

Hello All, I have a script which has a functionality to sleep for 300 seconds after it does some processing, so in the logs if i check after the 3 iteration of sleep it didn't write saying "sleeping for 300 seconds". I suspect putty would automatically terminate session as i cannot access it any... (1 Reply)
Discussion started by: Ariean
1 Replies

4. Shell Programming and Scripting

Get an PID of particular process

Hi I have written a shell script to find and kill the particular process. Here in shell script i have written the code like cnt = $(ps -ef | grep Shree) echo $cnt I am getting the output root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies

5. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

6. Solaris

getting pid of process

hi all, Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have. a) kick start the executable b) get the pid c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies

7. UNIX for Advanced & Expert Users

start time of a terminated process

Hi, I have a shell script which i am running. I want it's starting time (the time when the execution of the shell script started) in another shell script. Note that the process has already terminated when i need it's starting time.... else i could have used ps -f | cut -d" " -f5... But that's... (2 Replies)
Discussion started by: k_chaaya
2 Replies

8. AIX

Process got terminated automatically

Hi, I am elango. I am working with UNIX AIX version 5. I am facing tow problem whenever I am trying to run a script. 1. The moment I run the script 3 more jobs are getting started automatically. I used PS -ef command to check the running Jobs, I found totally 4 jobs are running for... (4 Replies)
Discussion started by: Elango
4 Replies

9. Shell Programming and Scripting

Process PID

Hi Friends :p I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run... (3 Replies)
Discussion started by: vanand420
3 Replies

10. UNIX for Advanced & Expert Users

How to supress a "Killed" message when a process is terminated?

Does anyone know how I can supress the "Killed" message that's produced when I kill a process? I've got a script that performs a "tail -f" on a database error log and pipes the output into an awk script which looks for certain error messages and forwards any that qualify to my pager. The problem... (2 Replies)
Discussion started by: kenwolff
2 Replies
Login or Register to Ask a Question