A process is an instance of a computer program that is being executed.

learn more… | top users | synonyms (1)

4
votes
2answers
75 views

Hook action on process creation

Is it possible to hook a script execution on each process creation? Essentially the equivalent of inotifywait to monitor disk activity but applied to the process table. It would be to allow to do an ...
1
vote
2answers
28 views

What is the default memory allocation for shell process by linux

What is the default memory allocation for shell process by Linux , i mean is there any upper limit for shell process or any process.
1
vote
1answer
17 views

Possible to identify defunct process from pgrep

I am using pgrep for a bunch of things, however I can't get pgrep to list if the process is defunct. Running ps adds to the end of the item <defunct> but pgrep does not, is there anyway to do ...
1
vote
1answer
1k views

How can I kill child processes with start-stop-daemon?

I'm writing a simple web server using nc and bash. It looks like this: #!/bin/bash rm -f /var/run/streamman/out mkfifo /var/run/streamman/out trap "rm -f /var/run/streamman/out" EXIT while true do ...
1
vote
1answer
64 views

cpu usage is 100% but top doesn't show any process using it

First of all, I forgot to save the process list. I had to reboot the server so I can't give much information. I have a small VPS. The cpu usage was 100% in both top and in the control panel graphs, ...
4
votes
3answers
46 views

How do I get the first branch PID of an application in pstree command?

I want to get PPID of chromium browser. When I launch chromium-browser it launches many child processes with the same name. For example: $ pidof /usr/lib/chromium-browser/chromium-browser 8963 ...
30
votes
4answers
35k views

How to attach terminal to detached process?

I have detached a process from my terminal, like this: $ process & That terminal is now long closed, but process is still running and I want to send some commands to that process's stdin. Is ...
1
vote
0answers
21 views

Pipe output of process that's already running

I've got a process that spews out a lot of output, and it's going to be running for the next hour. I forgot to pipe its output through my awk script before I started running it. Now my terminal is ...
42
votes
3answers
99k views

Finding the PID of the process using a specific port?

I am installing hadoop on my Ubuntu system. When I start it, it reports that port 9000 is busy. I used netstat -nlp|grep 9000 to see if such a port exists and I got this: tcp 0 0 ...
0
votes
1answer
1k views

Linux ps -elf command output, what is Process Flag meaning?

In output of ps -elf command in linux, we can recognize that process flag of 4 and 1, and process flag of 5, (sum of 1 and 4), but what is meaning of process flag 0 ? unfortunately, man does not help ...
241
votes
12answers
209k views

What if 'kill -9' does not work?

I have a process I can't kill with kill -9 <pid>. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option.
88
votes
4answers
77k views

How to get the pid of the last executed command in shell script?

I want to have a shell script like this: my-app & echo $my-app-pid But I do not know how the get the pid of the just executed command. I know I can just use the jobs -p my-app command to grep ...
1
vote
2answers
52 views

How do I kill a process given its “command”?

I have a process called "P1", right now the way I kill the process is: $ ps aux | grep "P1" " Now it returns two processes related to "P1": one is the actual P1 process I want to kill, the other one ...
2
votes
1answer
6k views

What is the difference in CPU utilization between 'ps aux' and 'ps -ef'?

I use Ubuntu 12.04.1 Linux. I see a difference between %CPU and C output format of ps command for a process. It is not clearly noted in the ps man page. Man pages says: CODE HEADER ...
-5
votes
0answers
21 views

How can I avoid this line from getting printed? [closed]

I have this piece of code that I developed just to address a problem that I have in another large program that I am developing. My goal is simple, When the user enter quit. I will just display ...
0
votes
1answer
31 views

Kill command also kills other process

I have a very simple script, let's call it foo.sh. It's this: #!/bin/sh sxhkd & panel & where panel is a script (I won't post it here because it's very long and I don't think it would be ...
1
vote
3answers
66 views

Process scheduling data on linux

I am doing a project on OS and require the process scheduling data for an operating system. The data has to include the list of all processes in short-term-scheduler and long-term-scheduler along with ...
1
vote
2answers
49 views

How to “track” newly created processes?

I know that with ps I can see the list or tree of the current processes running in the system. But what I want to achieve is to "follow" the new processes that are created when using the computer. As ...
0
votes
2answers
26 views

How to prevent a process from hanging the computer?

A process can cause the computer to "freeze" for example when exhausting CPU or swap. Is there a way to prevent this from happening? For example by setting the max %CPU or IO MB/s that can be granted ...
-2
votes
1answer
9 views

linux on aix dont work pgrep -lf ora_pmon

pgrep -lf ora_pmon ksh: pgrep: not found. somebody know who to change the code without pgrep this is the result on another Os pgrep -lf ora_pmon 4104 ora_pmon_dbpicsr 5092 ora_pmon_dbpiss2r 14393 ...
1
vote
0answers
42 views

RAM not used by process? Then who uses it? [closed]

I don't understand who uses my RAM. I can see clearly that it's used, but I have no ideea who uses it. Do you have any ideea what could be wrong here? I'm experiencing random spikes of high memory ...
0
votes
1answer
42 views

Kill a running shell script, and kill all process running within it

I have a shell script running in the background, which runs 5 different jobs. When I run the shell script all 5 jobs start running in order. When I kill this shell, whichever process is running, will ...
1
vote
0answers
8 views

What is the equivalent of pstop on OSX?

Is there an equivalent of pstop in OSX? How is pstop different to kill?
4
votes
2answers
46 views

From bash, spawn two processes and exit both if either sibling exits

From bash, I am spawning two processes. These two processes depend on each other. I want both to exit if either one dies. What is the cleanest way to do that? Currently I have the following: # start ...
0
votes
0answers
25 views

What does disown do? [duplicate]

$ help disown disown: disown [-h] [-ar] [jobspec ...] Remove jobs from current shell. Does disown on a process change the parent process of the process? I.e. make the parent shell process ...
3
votes
3answers
2k views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
23
votes
1answer
4k views

How to set per process swapiness for linux?

/proc/sys/vm/swappiness is nice, but I want a knob that is per process like /proc/$PID/oom_adj. So that I can make certain processes less likely than others to have any of their pages swapped out. ...
1
vote
1answer
50 views

Weblogic process just killed suddenly on redhat linux

One of the process on my WAS killed at dawn. 6 process run on this server. But only one process just killed. I don't know how to fix it. This is Weblogic last log that before process killed. ...
4
votes
1answer
58 views

The sum of % in the CPU column doesn't match the total CPU % row [duplicate]

I don't understand why the sum of % in the cpu column in top doesn't match the total CPU % row: Text version with slightly different values: ubuntu@server:~$ top top - 23:20:21 up 5:18, 3 users, ...
0
votes
1answer
27 views

What happens to a process handle when the process has stopped?

If I have a handle of a process and that process has stopped, Do I need to close the handle? Can I use the handle to rerun the process? Can I use the handle to find out information about the ...
0
votes
3answers
38 views

Process in Unix

When I log into my unix terminal and just do ps: bash-4.3$ ps PID TTY TIME CMD 7 pts/0 00:00:00 sh 16 pts/0 00:00:00 bash 17 pts/0 00:00:00 ps I know bash process is ...
5
votes
1answer
44 views

Suspend process without killing it

So I've got a persistent program running in the background. Killing it just causes it to restart with a different PID. I'd like to suspend it (put it to sleep without actually killing it). Does kill ...
2
votes
1answer
26 views

When is a port considered being used?

I am getting port in use cannot bind on process restarts. I am trying to find out when a port is considered being used? Is it only when in LISTEN mode? Can it also be if a connection is open to the ...
1
vote
1answer
42 views

How do you tell what the return code of a process is when it exits and where is the value usually documented?

If a process runs and exits it returns a non-zero status (personnaly I prefer the term return code); or even a zero status I know that the value is there (mostly because I've done C++ programming and ...
0
votes
1answer
28 views

Downsides of processes with high virtual size but low RAM and GPU memory use

I have noticed that some of my processes take a lot of virtual size in my computer. I understand that the virtual size of a process is the sum of memory it is actually using, memory it has mapped into ...
13
votes
1answer
23k views

What does this process STAT indicates?

If you check the STAT column in above image you will see Ss S S< SN and R+ What does this indicates ? Process states. If yes,Then what is the significance of 'Ss S< SN and R+'?
1
vote
4answers
56 views

Why does killall command kill only one instance of the process?

Sometimes I need to kill Google Chrome (of which I have 2 windows/instances opened). Both instances are not in incognito mode. What I do is: (on Debian 8) killall chrome && killall chrome ...
5
votes
1answer
50 views

Is forcing an application to release some the allocated memory possible?

Ever since I came back to Firefox a year or so ago I have been facing the same issue over and over again - the browser just keeps eating up my memory. The problem arises from (maybe the incorrect ...
4
votes
2answers
193 views

How to completely detach a process

I want to spawn a process and run it at the top level so that when the shell exits, the process keeps running. I had mistakenly thought that nohup would do this, but when I exit from the shell (the ...
5
votes
1answer
962 views

Change the parent process of a process?

Is it possible to change the parent process of a process? If yes, how? For example, how does screen manage to attach a screen session and the processes running inside it to different shell ...
6
votes
1answer
102 views

Is it possible to add a process to the job list in bash (e.g. to reverse “disown”)?

If I disown a job in bash and change my mind, can I undo it somehow ? If so, taking it further, is it possible to bring an arbitrary process under job control (an acceptable restriction would be that ...
20
votes
4answers
5k views

What happens to the output of a process that has been disowned and lost its terminal?

If I close the virtual terminal, where some process was started, does the output just go straight to /dev/null, or can it pollute memory somehow? Can I anyhow grab the output to continue reading it at ...
0
votes
1answer
18 views

Get PID of scheduled job (using at)?

Say I want to schdule this job to be run at later time MYPROGRAM > output.out 2> error.err | at 02:00 PM Mon How can I attain its PID? surly using: echo $! will not work?
0
votes
1answer
880 views

'htop' process and threads cpu usage?

I'm observing a multi threaded process in htop in tree view. If I were to strip it just to the problematic part, it looks somewhat like this: CPU% bin/process 100 `- ...
4
votes
2answers
116 views

What happends when sending SIGKILL to a Zombie Process in Linux?

In Linux, when a child process terminates and it's parent has not yet waited on it, it becomes a zombie process. The child's exit code is stored in the pid descriptor. If a SIGKILL is sent to the ...
1
vote
1answer
58 views

How to run command in foreground then send to background

I need to run my application in foreground of linux terminal, send some commands to my program and then send program to background. I'm not really sure how to do that?
7
votes
3answers
2k views

How to stop a bunch of processes on unix fast?

How to stop a bunch of processes on unix fast. I can use ps/top, kill. If the number of processes is very large, I use shell script. Are there other ways, only one or two unix commands can do it ...
3
votes
1answer
54 views

sigint not being propagated to background child process

I need to send SIGINT to terminate a process gracefully but I can't. This is a sample, because the environment in which the execution occurs is 'unknown' (a bash script in travis.com) I managed to ...
0
votes
1answer
35 views

Schedule a job to run in the background ( one time task scheduling using at )

Is it possible to request for a job to be run at a later specifed time in the background? This is what I have so far, nohup nice MY_PROGRAM > foo.out 2> foo.err < /dev/null | at 05:23 PM ...
1
vote
1answer
27 views

what happens to remotely run process when remote host disconnects?

Say, I ssh into a remote host, initiate few processes on it and disconnect before the processes terminate. What happens to the processes? Do they continue?