On Fri, 14 Jan 2005 Rony Bill wrote :
Dear Sameer,
This is interesting. :-) What is the technique with the serial cable? Assuming PC A is fully loaded and NFS linux dump folders are globally available, how does the other PC B which has an unformatted HDD and no floppy/cd get booted? How does PC A see the HDD of PC B through the serial cable? Normally HDDs have either hdan, hdbn, hdcn or hddn within the 2 IDE ports. What is the device name in PC A for the HDDs in PC B?
Thanks and Regards,
Rony.
We need a 'null modem' cable for a serial link. On one side we need to set up the ppd to accept connections via the null modem lead. So we need to creat a /etc/pp/option.ttyS0 We also need to add the following lines to that file ************ cable lock noauth asyncmap 0 crtscts local silent 192.168.1.1:192.168.1.2 #Your IP add server:client 115200 #Your line speed connect 'chat -v -f /etc/ppp/lin.chat' **********************************
Do chk out the the man page of pppd for details. Now for the clent we need to create a script called /etc/ppp/lin.chat with following contents *************************** TIMEOUT 3600 CLIENT CLIENTSERVER\C ****************************
We can configure the client in the similar manner and then launch the pppd on the client using $ pppd /dev/ttyS0
Do contact me offlist for more details.
Sameer
On Sunday 16 Jan 2005 3:07 pm, Sameer Niphadkar wrote:
Do contact me offlist for more details.
why offlist - is it a secret?
Hi !! all Is there any process to kill zombie process without restarting system . if any body know then please tell....
crisppyf
________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony
Hi !! all Is there any process to kill zombie process without restarting system . if any body know then please tell....
crisppyf
________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony
On Monday 17 Jan 2005 11:46 am, crisppy f wrote:
Hi !! all Is there any process to kill zombie process without restarting system . if any body know then please tell....
if it is a gui on screen, press ctrl-alt-esc, the cursor will become a skull. Click on the zombie and it will die. If not, you have to find where the pid is stored on disk and physically 'rm' it. For example if the process is kppp, do a search for kppp.pid and rm it
Sometime Today, Kenneth Gonsalves assembled some asciibets to say:
where the pid is stored on disk and physically 'rm' it. For example if the process is kppp, do a search for kppp.pid and rm it
eh? Pid files aren't created for all processes. It's up to the process to create its own pid file if it needs it for something. kill is the only way to kill a process. Deleting a pid file just makes that pid file not available anymore.
On Monday 17 Jan 2005 12:13 pm, Philip Tellis wrote:
Sometime Today, Kenneth Gonsalves assembled some asciibets to say:
where the pid is stored on disk and physically 'rm' it. For example if the process is kppp, do a search for kppp.pid and rm it
eh? Pid files aren't created for all processes. It's up to the process to create its own pid file if it needs it for something. kill is the only way to kill a process. Deleting a pid file just makes that pid file not available anymore.
true - doesnt kill the zombie, but allows you to run the process again. How *do* you kill a zombie?
On Mon, 17 Jan 2005 12:33:08 +0530, Kenneth Gonsalves lawgon@thenilgiris.com wrote:
true - doesnt kill the zombie, but allows you to run the process again. How *do* you kill a zombie?
It is not possible to kill a zombie. Because a zombie is already dead. It is only hanging around as the parent process has not called wait() or any of it's variants on it. So all the memory and flile descriptors are closed by the kernel but the process table entry remains.
:) cheers Vinayak
Vinayak Hegde wrote:
It is not possible to kill a zombie. Because a zombie is already dead. It is only hanging around as the parent process has not called wait() or any of it's variants on it. So all the memory and flile descriptors are closed by the kernel but the process table entry remains.
:) cheers Vinayak
You are absolutely spot on. Jargon.com defines a zombie as follows:
zombie n. 1. [Unix] A process that has died but has not yet relinquished its process table slot (because the parent process hasn't executed a `wait(2)' for it yet). These can be seen in `ps(1)' listings occasionally. Compare orphan.
This leaves us with two possibilities: either a) the original poster's question was self-contradictory and therefore meaningless or b) the original poster did not use the word in this precise technical sense but meant something like "runaway process" or "rogue process", in which case some of the answers given to him here may be relevant.
I am inclined towards b). In either case, it is an interesting problem of semantics!
Vinayak Hegde wrote:
It is not possible to kill a zombie. Because a
zombie is already dead.
This leaves us with two possibilities: either a) the original poster's question was self-contradictory and therefore meaningless or b) the original poster did not use the word in this precise technical sense but meant something like "runaway process" or "rogue process", in which case some of the answers given to him here may be relevant.
I am inclined towards b). In either case, it is an interesting problem of semantics!
hi once again i am clear abt my ques???? so i repeat...
i have to kill zombie process which is hanging around in process listing. but i am not able to kill it(means kill 9 23234 is not wrking). i need to do it becoz somewhere its not allowing me to start the same type of application again. and main thing i cannot restart the computer which can remove this process as i am working on main server which cant be stopped for sometime for this. and i think as Amish said (kill -l 1) will work logically. i'll tell you all after some time whether this worked or not.
________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony
On Mon, 17 Jan 2005 09:04:52 +0000 (GMT), crisppy f linuxbee2001@yahoo.co.in wrote: [snip]
hi once again i am clear abt my ques???? so i repeat... i have to kill zombie process which is hanging around in process listing. but i am not able to kill it(means kill 9 23234 is not wrking). i need to do it becoz somewhere its not allowing me to start the same type of application again.
In repeat my answer again. A zombie process is just a process table entry and a process which is dead quite some time ago. so $ kill -9 $pid will not work.
You need to fix the badly written application. Fix the disease and not the symptom.
:) cheers Vinayak H
On Monday 17 Jan 2005 3:18 pm, Vinayak Hegde wrote:
In repeat my answer again. A zombie process is just a process table entry and a process which is dead quite some time ago. so $ kill -9 $pid will not work.
i have faced this problem with apps like kppp. As known, kppp needs root access to run. When it dies (due to line fault or something) on a non-root desktop, it becomes a zombie. The zombie on the desktop can be killed with the skull. But trying to run kppp again will not work until i go to .kde/share/apps/kppp and rm kppp.pid.
On Mon, 17 Jan 2005 15:49:02 +0530, Kenneth Gonsalves lawgon@thenilgiris.com wrote:
On Monday 17 Jan 2005 3:18 pm, Vinayak Hegde wrote:
In repeat my answer again. A zombie process is just a process table entry and a process which is dead quite some time ago. so $ kill -9 $pid will not work.
i have faced this problem with apps like kppp. As known, kppp needs root access to run. When it dies (due to line fault or something) on a non-root desktop, it becomes a zombie. The zombie on the desktop can be killed with the skull. But trying to run kppp again will not work until i go to .kde/share/apps/kppp and rm kppp.pid.
Yeah you are right. Some apps use a "lock file". Before starting up and initialising all the data structures, they will look if this "lock file" is present. If it is present, it will exit. Some apps will print their pid in the "lock file" as well. KPPP is one such app.
Do an strace on the application while running it and see the output. That should tell you what file on disk it is trying to stat()/open().
:) cheers Vinayak
On Mon, Jan 17, 2005 at 04:21:19PM +0530, Vinayak Hegde wrote:
Do an strace on the application while running it and see the output. That should tell you what file on disk it is trying to stat()/open().
Well-behaved applications should tell you which pid files they are looking at when they stop because "pid file exists".
On Mon, 17 Jan 2005 07:56:14 -0500, Satya ilugbom@thesatya.com wrote:
On Mon, Jan 17, 2005 at 04:21:19PM +0530, Vinayak Hegde wrote:
Do an strace on the application while running it and see the output. That should tell you what file on disk it is trying to stat()/open().
Well-behaved applications should tell you which pid files they are looking at when they stop because "pid file exists".
Yeah they should but many don't. Most programs (even in the OSS world) do not have good error checking and also may not print intelligible messages.
:) cheers Vinayak
On Mon, Jan 17, 2005 at 06:38:11PM +0530, Vinayak Hegde wrote:
On Mon, 17 Jan 2005 07:56:14 -0500, Satya ilugbom@thesatya.com wrote:
Well-behaved applications should tell you which pid files they are looking at when they stop because "pid file exists".
Yeah they should but many don't. Most programs (even in the OSS world) do not have good error checking and also may not print intelligible messages.
Problem not limited to OSS world. I've seen too many Visual Basic programs go "Run time error [hex code]".
On Mon, 17 Jan 2005, Vinayak Hegde wrote:
On Mon, 17 Jan 2005 09:04:52 +0000 (GMT), crisppy f linuxbee2001@yahoo.co.in wrote: [snip]
hi once again i am clear abt my ques???? so i repeat... i have to kill zombie process which is hanging around in process listing. but i am not able to kill it(means kill 9 23234 is not wrking). i need to do it becoz somewhere its not allowing me to start the same type of application again.
In repeat my answer again. A zombie process is just a process table entry and a process which is dead quite some time ago. so $ kill -9 $pid will not work.
You need to fix the badly written application. Fix the disease and not the symptom.
I disagree with you. Its not that if an application is resulting in a zombie process, its a bad application. As far as I remember zombies are used for accounting purposes etc. Child process want parent to note down some information about the child before it dies, so it enters zombie state by leaving a record containing an exit code and some statistics for its parent to collect. The parent on the exit, notes down the info and send a signal to the init so that it will remove the zombie entry in the process table.
I think one of the ways to kill zombie is to kill the parent process.
PS: I do not know much about zombie and I didn't follow this thread. I had just gone through this mail.
Thanks & Regards, -- Rajendra Prasad Murakonda, ETU division, C-DAC Mumbai (erstWhile NCST). Off Phone : 91 22 27565303 extn : 302 Mobile(WLL) : 0 93235 83185 rajncst@yahoo.co.in , rajendra.prasad@gmail.com
On Mon, Jan 17, 2005 at 04:00:58PM +0530, Rajendra Prasad Murakonda wrote:
On Mon, 17 Jan 2005, Vinayak Hegde wrote:
You need to fix the badly written application. Fix the disease and not the symptom.
I disagree with you. Its not that if an application is resulting in a zombie process, its a bad application. As far as I remember zombies are used for accounting purposes etc. Child process want parent to note down some information about the child before it dies, so it enters zombie state by leaving a record containing an exit code and some statistics for its parent to collect. The parent on the exit, notes down the info and send a signal to the init so that it will remove the zombie entry in the process table.
The parent is supposed to use the wait() or waitpid() call. I'm not sure if there's another way to reap the child processes.
I think one of the ways to kill zombie is to kill the parent process.
And when the parent is init, as often happens?
(To original poster: use ps -axf to see if you can find the zombie's parent process. If it's init, you may have a problem. If it's something else, try killing that.)
On Mon, 17 Jan 2005, Satya wrote:
On Mon, Jan 17, 2005 at 04:00:58PM +0530, Rajendra Prasad Murakonda wrote:
On Mon, 17 Jan 2005, Vinayak Hegde wrote:
You need to fix the badly written application. Fix the disease and not the symptom.
I disagree with you. Its not that if an application is resulting in a zombie process, its a bad application. As far as I remember zombies are used for accounting purposes etc. Child process want parent to note down some information about the child before it dies, so it enters zombie state by leaving a record containing an exit code and some statistics for its parent to collect. The parent on the exit, notes down the info and send a signal to the init so that it will remove the zombie entry in the process table.
The parent is supposed to use the wait() or waitpid() call. I'm not sure if there's another way to reap the child processes.
A process goes to zombie state on its exit, when the parent is yet to call wait(2).
I think one of the ways to kill zombie is to kill the parent process.
And when the parent is init, as often happens?
Its not possible. There are two cases...
Logically all the processes that inherit from init should become zombies as all of them terminate before init. But init has a special mechanism to wait whenever one of its child exits.
Second case is what if a process is exiting and has some zombies and some other alive processes. The processes that are alive will become children of init and the zombie processes entries will be removed from the process table.
Technically almost all the processes in the unix environment comes to the zombie state on their exit. Zombie is not a bad thing, its the design, its there for a cause, I think.
Thanks & Regards, -- Rajendra Prasad Murakonda, ETU division, C-DAC Mumbai (erstWhile NCST). Off Phone : 91 22 27565303 extn : 302 Mobile(WLL) : 0 93235 83185 rajncst@yahoo.co.in , rajendra.prasad@gmail.com
crisppy f wrote:
i think as Amish said (kill -l 1) will work logically. i'll tell you all after some time whether this worked or not.
Forgot to mention, you might have to do this multiple times and it is not uncommon for it to actually repond after a few (4-5) minutes by terminating the process.
Amish.
On Mon, 17 Jan 2005, crisppy f wrote:
hi once again i am clear abt my ques???? so i repeat...
i have to kill zombie process which is hanging around in process listing. but i am not able to kill it(means kill 9 23234 is not wrking). i need to do it becoz somewhere its not allowing me to start the same type of application again. and main thing i cannot restart the computer which can remove this process as i am working on main server which cant be stopped for sometime for this. and i think as Amish said (kill -l 1) will work logically. i'll tell you all after some time whether this worked or not.
Do `ps -l` to find the parent of the Zombie and kill that process(parent).
Let me explain it more clearly about zombie, then you decide what you want to do with that...
Consider the following code...
<code> Creation of a Zombie process...
int main(void) { int pid; if((pid=fork())<0) puts("fork error"); else if(pid==0) // If the process getting executed is child exit(0); // I am terminating child.
sleep(5); // Parent still exists and sleeping system("ps -l"); // lists the child process as zombie exit(0); // Parent exits }
</code>
In the above code I am creating a zombie as I am terminating child before parent. At the end I am doing an explicit exit() of parent which will remove the zombie from the process table.
Now see the following code...
<code> A Zombie that will never get removed until you kill the parent or a system reboot.
int main(void) { int pid; if((pid=fork())<0) puts("fork error"); else if(pid==0) exit(0);
system("ps -l"); while(1); // The parent will never exit... }
</code>
Now the only way to remove the Zombie from the process table is to kill the parent of that. The above program is an example for badly written application.
Zombie is not a bad thing, its a normal process state. Zombie state is designed because most of the times parent can't wait for the child till child's completion, but parent want to know about child's details. If the child is not in Zombie state there is no way for the parent to know the timing details etc of the child.
In the earlier mail I said almost all the processes in the unix environment goes to Zombie state on exit because a process spawns lot of processes and can't wait for each and everyone. So on exit child goes to zombie state and sends a signal(SIGCHLD, I think) to the parent. If the parent can wait() at that point of time, the child is removed from the process table. If the parent is busy with something else and can't wait() at that point of time, the child will be in the process table entry as a Zombie till parent waits on it. In some implementations when the parent ignores the death of a child signal(SIGCHLD), the kernel directly removes the process entry of the zombie instead of waiting for parent's wait.
So the only way to kill... err... terminate a process in the Zombie state is by killing the parent. Normally you don't have to do that as on the exit of the parent the zombies get cleared but if an application is badly written then you might have to do it.
Thanks & Regards, -- Rajendra Prasad Murakonda, ETU division, C-DAC Mumbai (erstWhile NCST). Off Phone : 91 22 27565303 extn : 302 Mobile(WLL) : 0 93235 83185 rajncst@yahoo.co.in , rajendra.prasad@gmail.com
Philip Tellis wrote:
eh? Pid files aren't created for all processes. It's up to the process to create its own pid file if it needs it for something. kill is the only way to kill a process. Deleting a pid file just makes that pid file not available anymore.
Philip is of course right. As root do # ps aux. This will give you a list of running processes with their PID. Identify the PID of the process you want to kill - say it is 1234. Then do # kill 1234.
On Monday 17 Jan 2005 12:42 pm, Sujeet Bhatt wrote:
Philip Tellis wrote:
eh? Pid files aren't created for all processes. It's up to the process to create its own pid file if it needs it for something. kill is the only way to kill a process. Deleting a pid file just makes that pid file not available anymore.
Philip is of course right. As root do # ps aux. This will give you a list of running processes with their PID. Identify the PID of the process you want to kill - say it is 1234. Then do # kill 1234.
if it is a zombie it wont work
crisppy f wrote:
Hi !! all Is there any process to kill zombie process without restarting system . if any body know then please tell....
Only if you trust me, kill -1 1
****Do not forget the -1****
Amish.