Questions tagged [process]
A process is an instance of a computer program that is being executed.
2,517
questions
1
vote
2
answers
58
views
Killing multiple process by process name using shell script
I am having a shell script, which will start processes and kills the process. It is accepting the processes names as arguments. Need to find the pid and kill those.
Initially, it was like
for procname ...
3
votes
2
answers
169
views
How to get the "process IDs" which are logging output to stdout?
How do I get the PIDs of all the processes which are dumping output to stdout.
1
vote
1
answer
24
views
How to kill watchdog Daemon on Linux
I configured my watchdog.conf, and i want try if my computer restart when it crash. so, I wanted kill my Watchdog to try if my computer will restart.
But I try to killed it with the command "...
1
vote
1
answer
21
views
What is the equivalent of "task_struct" in linux's <linux/sched.h> for Mac OS?
I want to understand the Process Control block of Mac OS and Linux. For Lionux it was pretty strightforward, there was a post here asking about the same thing and someone replied to go take a look at &...
1
vote
1
answer
23
views
Meaning of the term "process", "thread" and "task_struct" in Linux
In my knowing, a thread is an execution flow of a process and all the threads of a process share some common structures. Furthermore, in modern PC the CPU executes only threads, not processes.
What I ...
0
votes
2
answers
22
views
how to Find the port number according to PID [duplicate]
The following command can be used to find out which process is listening on a particular port:
netstat -ltnp | grep -w ':8011'
How can we do the opposite, find the port number according to PID ...
1
vote
0
answers
20
views
Process makes other processes hang
At some point, a number of scripts seemed to hang for no apparent reason. Running them manually still worked. I narrowed it down to a ps -ef that hanged. After a number of processes, output just ...
-1
votes
2
answers
59
views
Is there a simple way to run multiple instances of the same C++ program on Linux?
I have a C++ program I'd like to run in parallel on a Linux machine, with each instance being a completely independent process that doesn't communicate with the others. Is there a straightforward way ...
3
votes
0
answers
32
views
Linux: Is there a limit for the number of fork() calls one process goup can issue? (Not per user!)
We have a strange problem on a SuSE Linux Enterprise Server 12.5 system (kernel 4.12.14-122.60), which is the only KVM guest in a simliar KVM host:
One service started by systemd starts one program -&...
0
votes
1
answer
42
views
Process status logic
How can a process have a status when only threads are being scheduled (Windows and Linux)?
Let’s say we create process P
Thread T1 is now allocated as well
T1 is now in runnable state
Scheduler picks ...
2
votes
0
answers
29
views
How to run a child process inside firejail sandbox?
Hello Linux folks i need help running with firejail with a java program that is in sandbox
firejail --private --trace java -jar program.jar
But this program can't spawn child process (chromium) due to ...
0
votes
2
answers
23
views
What is the colon in postgres' process command-lines?
For example Postgres process command-lines are like
postgres 794 1 0 Nov06 ? 00:00:03 /usr/pgsql-9.3/bin/postgres -D /var/lib/pgsql/9.3/data -p 5432
postgres 857 794 0 Nov06 ? ...
0
votes
1
answer
32
views
Can a process share unused memory with others?
I want to run about 200 processes with my experiments. Every of them really needs less than a GB:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24688 rinkman 20 0 ...
5
votes
0
answers
81
views
Why does ps not exit when listing full command line arguments?
Any time I attempt to run the ps command or another similar command in a way that would make it output the arguments for any process, the command runs and produces output, but then freezes, entering ...
1
vote
1
answer
103
views
What signal do bg and fg send?
I know that ctrl + z changes a process from foreground to background - as suspended - through SIGTSTP. I am able to re-run that background suspended process through either fg or bg as required.
...
0
votes
0
answers
21
views
jobs command: How report all the done/finished processes, but at anytime?
About background processes, for simplicity if for example are executed:
sleep 300 &
sleep 350 &
sleep 360 &
sleep 400 &
sleep 800 &
When is executed jobs -l, in the output is ...
0
votes
1
answer
32
views
Unable to get PID on a Listening port for Solaris
I'm using solaris
SunOS myhost4 5.11 11.4.42.117.3 sun4v sparc sun4v non-global-zone
I'm sure that port 7777 is in use as the telnet is successful as below:
$ telnet myhost4 7777
Trying 10.23.52.219.....
0
votes
1
answer
42
views
Understanding maps file in /proc directory for a process
In linux, when I access /proc for a particular program it shows memory mapping for the program in maps file.
Something like this:
address perms offset dev inode ...
1
vote
1
answer
48
views
service start automatically on debian 10
I have server with debian 10, previously on this server unbound service installed.
Today I noticed that the service is reset every minute.
I even deleted the file /lib/systemd/system/unbound.service ...
0
votes
0
answers
19
views
How does Linux create/manage processes assigned through pgid? [duplicate]
I am reading this post:
Using job control in the shells
About pgid and ppid it indicates:
PGID
Each process in a process group shares a process group ID (PGID),
which is the same as the PID ...
0
votes
0
answers
30
views
ShellScript: How to create manually a parent process and their children process? [duplicate]
I am reading this post:
Using job control in the shells
About ppid it indicates
PPID
A process that creates a new process is called a parent process;
the new process is called a child process.
The ...
-4
votes
1
answer
64
views
Reparenting a process
I create a Linux Kernel Module and I try to find a way to re-parent a given process or change a given process PID. Is there any way of doing that?
I found the following link but I could not make it ...
0
votes
0
answers
22
views
List down Linux parent processes having more than 5 Child Processes [duplicate]
I want to list all the parent processes on my machine which are having more than a number say(5) child process. Kindly suggest a command to achieve this.
1
vote
0
answers
39
views
Is the stack of a forked process shared with its parent? [duplicate]
Is the stack of a forked process shared with its parent?
If so, does this happen via shared copy-on-write pages?
0
votes
2
answers
58
views
Signals table in /proc/[PID]
I am trying to overwrite or change the Signals of a process. As I guess there is a table of signals in every process separately.
Is there anything like that in the /proc folder?
Thank you for your ...
1
vote
0
answers
36
views
How to get NSPid on kernel 3.10
In kernel 4.1 and above, /proc/[pid]/status contains these 4 lines:
NStgid: 1
NSpid: 1
NSpgid: 1
NSsid: 1
This allow a process in parent namespace to know about that process' PID in all namespaces. ...
-2
votes
1
answer
68
views
Where and how is the scheduler running? Can I "see" it? [duplicate]
The scheduler is not a thread but it's a kernel function, so there's no way to actually "see" what the scheduler is doing (I assume). These particular kernel parts are kind of invisible from ...
0
votes
0
answers
4
views
Tuning with latency_ns
I would like to test the effect of latency_ns parameter on the execution time of a program. The program is a 16-thread MM implementation and the CPU is Ryzen with 8/16 (cores/threads). I also have ...
0
votes
0
answers
7
views
Relation between SCHED_FIFO priority number and NI and PR
I use sudo chrt -f 1 ./run to set the lowest priority using the FIFO policy. While the application is running, I see the following PR and NICE values in top.
PID USER PR NI VIRT RES ...
-2
votes
1
answer
61
views
Where is the process scheduler running? Can I track it?
Is the process scheduler "visible" at user space? Can I see it with ps? Maybe is it one of the kernel threads? If yes, how is it called? How can I "see" it?
It doesn’t exist as a ...
0
votes
1
answer
24
views
Finding default process scheduler
Where in the Linux code, I can find the default process scheduler at the time of launching a process. For a running process, chrt shows SCHED_OTHER. On the hand, in various websites, I see that the ...
0
votes
0
answers
19
views
Unable to kill node process on RedHat Linux
This is my OS:
[root@efendibey_live nginx]$ uname -a
Linux efendibey_live 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@efendibey_live nginx]$ ...
2
votes
1
answer
69
views
System-wide scheduling modification
Is there a way to change the process scheduling policy of the whole system? For example, I want to change the default SCHED_OTHER to SCHED_RR for all processes. The command chrt operates on a process. ...
1
vote
2
answers
86
views
chrt has no effect on changing scheduling policy
I would like to change the scheduling policy of a process via chrt, however, as you can see below, it has no effect on the systemd process. This is an example and I tried other processes, too. It ...
0
votes
4
answers
80
views
How to prevent child process to interfere with bash prompt?
The application in question is DaVinci Resolve. I start it from terminal. And when I close it, the message "Socket Disconnected" from the app is written to the terminal output. Then the bash ...
0
votes
0
answers
72
views
Ubuntu closes all the applications when lid is closed or suspended
I have been facing this issue for a while now.
Every time I close my lid, my Ubuntu 21.10 closes all the applications that were open before I closed the lid.
0
votes
0
answers
18
views
Systemd ignores notify PID when similar service is running
I have two services that are almost identical, except for the paths. Each service runs a Minecraft server on tmux. Here's the generic unit file:
[Unit]
Description=<description>
After=network....
2
votes
1
answer
275
views
Resume killed job
I accidentally closed a terminal window where I had limited the cpu usage of a parallel job. Now, if I ps -e S in a new terminal window, I can see that job as:
311029 pts/0 TN+ 275:25 jobname
Is ...
23
votes
3
answers
4k
views
Has Linux always separated User and Kernel space?
I was thinking back to my introduction to programming recently and remembered writing a C++ program that deliberately read and wrote to memory addresses at random. I did this to see what would happen....
0
votes
1
answer
63
views
How is the execution state saved at context switch in x86-64 linux kernel?
Since the TSS does not store the values of the registers in x86-64, how are those saved when the context switch occurs?
0
votes
0
answers
21
views
How do I disable csd-wacom?
I would also like to know how to permanently disable csd-wacom since I don't have a Wacom tablet and csd-wacom is wasting resources and the question regarding how to disable it wasn't answered.
0
votes
1
answer
112
views
Apache server sometimes gets stuck for minutes with requests getting backlogged and waiting too much to be processed
I've got a production server with Apache 2.4.38 on Debian 10 and sometimes the web server doesn't function properly and doesn't immediately send a response to the HTTP requests it gets (All virtual ...
0
votes
0
answers
56
views
How do I capture binary output from a process different from the console output?
I'm currently able to launch a process from within Java's ProcessBuilder, which continually appends to a (binary) file output.WAV, and is continually dumping lines of console updates. That works ...
0
votes
1
answer
218
views
is it possible to get disk usage per process using top and ps command?
I am trying to find out if is possible to get disk usage using the above mentioned commands in terminal but no luck. Can anyone help? if there is not, then is there any other command that can I use to ...
6
votes
2
answers
281
views
How to get the PID of a program executed in a bash script with remote linux
I'm on a Mac computer accessing by ssh a linux machine to run simulations. I'm currently running multiple commands in parallel (I put them in background with &), when they finish I extract the ...
4
votes
1
answer
521
views
How does the fork system call work?
If we look at the example
#include <stdio.h>
#include <unistd.h>
void main(){
int pi_d ;
int pid ;
pi_d = fork();
if(pi_d == 0){
printf("Child Process B:\npid :%d\nppid:%...
0
votes
2
answers
123
views
if a device driver is called multiple times, does the kernel create multiple processes?
what happens if a device driver is called open("/dev/mydrievr") multiple times by multiple programs?
is a process created for each call?
is it possible to instantiate a thread instead of a ...
0
votes
0
answers
19
views
Minimal "setuid" demo not working as documented? [duplicate]
Context
The setuid utility, according to both Unix and FreeBSD documentation, allows a process to run with an effective permission level of the executable file, instead of the real permission of the ...
0
votes
1
answer
102
views
How do I find the PID of a specific shell script that is sleeping?
I understand I can use pgrep -fl example.sh to find the PID of the script example.sh, but this doesn't work if example.sh is something like the following:
(while true; do
sleep 5
done) &
...
1
vote
1
answer
47
views
Discover root cause of find command running
This morning I came in and noticed my hard drive light was solid on. This was unusual so I ran iotop and saw a find command was searching my filesystem.
I decided to run ps auxZ to dump the processes ...