04-04-2006
here...
First, make sure that process does consume too much of CPU by using “top” command. Second, make sure (as far as it is possible) that process is independent; it means that it has no parent process that will relaunch it again by “pstree” command or by following the parent process from “ps -ef” or “ps -aux” (depending on UNIX clone).
As you decided to kill process try first not to use “-9” because much of junk will remain in memory and it may make “zombie” from other processes that may depend on this one. Better use SIGSTOP signal. In Linux SIGSTOP is number 19 so “kill -19 PID”, you can check what it is in your system by “kill -l” command , it will print the complete list of signals your UNIX can handle. With SIGSTOP, the process will stop gracefully as system has requested it to be stopped. You can use “-9” in a case the process is broken, its structures are corrupted and it does not response to the signals. “-9” option will remove process brutally with no concerns of data it possibly may have in memory or child processes it may have. Take “UNIX Essentials and UNIX Core” DVD if you have questions like that.
10 More Discussions You Might Find Interesting
1. AIX
How can i find the processes that is consuming most memory? I tried TOPAS and SVMON and this didn't gave me the desired result. (1 Reply)
Discussion started by: shabu
1 Replies
2. Programming
hello everybody!!
i want ur help! it is urgent!!
...
pid=fork();
if(pid==0)
{
execl(a program);
exit(1);}
else if (pid>0)
{
timer(5); //(command 1)timer is a function that count up to 5sec
if(kill(pid,0)==0)kill(pid,9);//(command 2)
wait(&status);
....
}
else
perror("error");... (3 Replies)
Discussion started by: nicos
3 Replies
3. HP-UX
Hi
How do i check which thread is consuming much time ?
In my process it is tacking much %CPU so i want to check whick thread tacking much time?
Any suggestion highly appriciated.
I am using HP-UX B.11.31 U ia64
Regards,
Ashok (5 Replies)
Discussion started by: ashokd001
5 Replies
4. AIX
HI All,
Can anyone send me a command to find TOP 5 Memory consuming process.
It would be lelpful if I get output something like below
processname - pid - memory(in MB) - command
I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies
5. Solaris
Hi all,
We have a server having much processes running. It is very difficuilt to trace the exact consuming more memory. Howerver, it shows CPU usage in sequence but how memory?
Tried working with TOP command.
Please let me know if something not clear.
Thanks,
Deepak (5 Replies)
Discussion started by: naw_deepak
5 Replies
6. Shell Programming and Scripting
Hi,
I need some simple but time-consuming script, I would like to compare run time in different shells. I thought about factorial or exponentiation in many loop, but I don't know it's a good idea.
Do you know some simple, time-consuming (arithmetic) script ??
I would be thankful for every... (8 Replies)
Discussion started by: Physix
8 Replies
7. AIX
Hi All
what is the command to check process ids , which are running from long time and which are consuming more cpu?
Also how to check, what a particular PID is running what
For Ex:
i have a pid :3223722 which is running since from long time,
if i want to check what is this... (1 Reply)
Discussion started by: sidharthmellam
1 Replies
8. UNIX for Advanced & Expert Users
I would like to kill a process after a certain amount of time. Can I please get some ideas on how to do this? (9 Replies)
Discussion started by: cokedude
9 Replies
9. Shell Programming and Scripting
Hi,
Do anybody experience to write a bash script in order to kill a specific process (java) after certain time of running?
eg.
java java.jar task_run.txt
I will run a java program (java.jar) which will run a long list of process (task_run.txt) one by one.
I plan to terminate the java... (5 Replies)
Discussion started by: perl_beginner
5 Replies
10. AIX
Hello
There are options / commands to check which process is consuming maximum memory
However is there any command/mechanism which will tell us which process was consuming maximum memory in specific time interval in the past?
I heard nmon report can help in this regard.
is there any... (5 Replies)
Discussion started by: Chetanz
5 Replies