sleeping processes in the following output , are they doing anything , but consuming lot of sources, should I need to kill them , how to know , , what they are doing
and the output says out of 260 processes only 9 are running , and 251 are sleeping , what does the sleeping means, can we terminate them,
It might help to understand what a "sleeping" process is, so here it goes:
Suppose a process starts: it gets loaded into memory, so some memory has to be allocated to it. It also gets some processor time, otherwise it would lurk just there, unable to run. Now it starts and probably it will need some additional memory to hold runtime data, it might need other OS resources, like files to be opened, network connections to be established, etc., etc..
All these requests involve the OS, which may or may not be able to fulfill these immediately. If it is, the process gets what it requests, but if not it will be put to sleep until the OS can provide. That it is put to sleep does not mean it has nothing to do or that it could be stopped. This is just a way for the OS to do something else until it can provide everything necessary to run the process.
Another possiblity is that the process waits for a certain event: suppose the process services a certain network event: it will listen to the network and until a certain signal comes it has nothing to do - therefore it is going to sleep. When the signal comes, it wakes up, does whatever it is supposed to do, then goes back to sleep again. If you stop the process because it sleeps it will not be able to wake up once the signal comes.
Thank you bakunin for the response , it is very much clear
one of the process has the following details , TIME+ means Total time of activity of this process, for process 29230 , is this active for 667 hours , means 27 days ,but the server itself did not exist 20 days ago, it is a fresh installation started 10 days ago, how to understand 29230 process
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29230 oraSLV 20 0 8997m 4.4g 4.4g S 0 14.0 667:10.44 oracle
According to your first top this server has been up and running for 36 days:
Your server is pegged by those processed that I have highlighted in red. They are using most of the cpu cycles. %id in red indicates the cpu available (idle) and you have almost nothing. %us indicate what percentage of the cpu usage is being utilized by user space instead of system space (kernel) which it is indicated with %sy
process 29230 oraSLV is related to Oracle for the instance SLV , and the oracle installation happened 10 days ago,
how come the red marked processes , which are all related to oracle, showing running from 708 hours (least one)
that is from 29 days approximately ,I am really confused here.
The oracle Instance SLV came into existence 10 days ago, but the related process is showing of 29 days old ,how to investigate on this