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

learn more… | top users | synonyms (1)

0
votes
1answer
44 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
118 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
96 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 ...
1
vote
2answers
62 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 ...
1
vote
0answers
58 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 ...
1
vote
1answer
116 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 ...
4
votes
2answers
138 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 ...
1
vote
1answer
206 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. /app/...
4
votes
1answer
128 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
42 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
59 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 ...
2
votes
1answer
56 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
76 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
65 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 ...
17
votes
1answer
28k 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
101 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
79 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 ...
6
votes
1answer
2k 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
134 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
6k 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
33 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?
1
vote
1answer
1k 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
286 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
85 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?
3
votes
1answer
102 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
75 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
41 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?
35
votes
7answers
111k views

Is there a way to see details of all the threads that a process has in Linux?

For Windows, I think Process Explorer shows you all the threads under a process. Is there a similar command line utility for Linux that can show me details about all the threads a particular process ...
2
votes
3answers
180 views

How to wait for all spawned and backgrounded processes to finish in bash script

I've looked and looked and can't find a working solution to a bash script I'm trying to create to shut a process down and wait for it and spawned processes to finish. I'm still learning a lot of Linux....
4
votes
2answers
596 views

How to wait for the copying process (cp) to finish?

I want my RPi 2 (with MiniBian (a minimal version of Debian-based Raspbian OS) as its OS) to execute a script when it detects a USB flash memory is inserted. So this is what I have done: I created /...
0
votes
1answer
41 views

Linux applications, user and system

I was wondering if there was any CLI command that would allow me to see what applications are being run by the current user, but ones that are not system commands. for example if I run lsof it will ...
1
vote
0answers
32 views

Real-time monitoring of changes in swap use (per process)

I'm looking for a way to observe which processes in my system are consuming an increasing amount of swap over time. The following function generates a list of swap user per process : sbp(){ grep ...
0
votes
2answers
65 views

Sleep system call and its time parameter

Let's say that we are writing a C program that calls the sleep() function. For instance, by calling sleep(7), the calling thread would be put to sleep for 7 seconds. My question is: Will the thread ...
3
votes
1answer
117 views

How to sort ps output to find processes realtime priority and identify processess currently occupied running queue

How to properly identify real-time processes currently occupied CPU queue and count them using ps? I know there is a bunch of fileds like prio,rtprio,pri,nice but do not know correct to use. It seems ...
4
votes
1answer
138 views

Pulling all of a process's swapped memory out of swap

How would one go about quickly pulling all of a process's swapped memory out of swap without writing to disk? The context on this issue is trivial, as the systemic issue necessitating the question ...
3
votes
2answers
49 views

wait and recycling of PID

I have a concern whereby in a script, I will be calling parallel versions of a function to run in the background and then issuing a wait. a () { sleep $1 } a 10 & PIDs="$PIDs $!" a 50000 & ...
5
votes
1answer
61 views

Can I set a resource limit for the current process tree?

Let's say I'm running on a resource-constrained system, and I want to ensure that the applications I run open no more than 10 files total. If I try to do it using setrlimit, something like: if (fork(...
1
vote
1answer
230 views

Why does running sudo cp show two processes

I am trying to copy some files and folders on a Centos machine. I do it like so: sudo cp source destination & to run it in the background. I see there are three cp processes now when I run ps ...
3
votes
2answers
132 views

How does the Linux scheduler determine if a process is I/O bound or CPU bound

Adding to this question, how does the scheduler determine if a process is I/O bound or CPU bound? Mr. Love in this article, says "schedulers often employ complex algorithms to determine the most ...
1
vote
0answers
62 views

Background processes in ksh script are disappearing after they are kicked off

I'm having an issue with a KSH script that is supposed to kick off four processes in parallel in the background and then poll their status. Put simply, running the four processes sequentially would ...
9
votes
1answer
14k views

when does the system send a SIGTERM to a process?

My server program received a SIGTERM and stopped (with exit code 0). I am surprised by this, as I am pretty sure that there was plenty of memory for it. Under what conditions does linux (busybox) send ...
0
votes
1answer
373 views

Process tree using fork() [closed]

I am given the task of creating this process tree in C using fork, if and else: |_____1___ |___2__ | |_4_ | |_3_ | | | | | Or as a pstree like drawing: p(0)─┬─p(1)───p(3) ├─p(2) ...
112
votes
5answers
130k views

How to check how long a process has been running?

I would like to avoid doing this by launching the process from a monitoring app.
6
votes
4answers
706 views

list graphical processes from terminal

Do no confuse the question here with how to list processes graphically, that is not what I am asking. In the Terminal, how can i see which processes have a GUI? as in things like firefox, vlc, geany,...
4
votes
2answers
119 views

How can I kill my backticked yes process?

I was playing around in my terminal, which runs zsh. I typed the following: $ ` bquote> yes bquote> ` And then, yes started to run in the background, I think. Neither Ctrl + C nor Ctrl + \ ...
2
votes
2answers
117 views

How to set an indentifier for multiple background processes?

I'm creating a custom game server and I have a .jar file to run it. I need to launch multiple game servers on a single virtual machine(like 15). I found, that I could just run them like this: java -...
3
votes
2answers
42 views

How to find what processes run by the user right now?

Once again, I'm a beginner and I can't find the right command. I want to view the processes that I'm currently running.
3
votes
1answer
66 views

`EINTR`: is there a rationale behind it?

Small talk as background EINTR is the error which so-called interruptible system calls may return. If a signal occurs while a system call is running, that signal is not ignored and a signal handler ...
1
vote
1answer
32 views

Retrieve data from mem cache

Newbie to Linux. My application writes to a log file and for some reason it stopped writing to that file suddenly. We have restarted the application to fix this glitch. Is it possible to retrieve the ...
7
votes
10answers
29k views

Bash way to check if a process is already running in the background (and skip re-execution based on that)?

Can I make a bash command line that only runs a certain command if the process is not already running (in the background)? How do I check*, if a command is already running? (so I can add the next ...