Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [process]

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

0
votes
0answers
17 views

How does the task list continously accept processes?

I'm a research student whose work involves processes, and I had a question about Linux's task list. From what I understand, as long as the computer has booted up, it is accepting processes. The ...
3
votes
1answer
62 views

Kill the child process in a child xterm but not xterm

I'm new to Linux. I have python scripts in different files, each one performing a desired function. foo1.py foo2.py foo3.py Each one of these scripts should do cleanup before being terminated. ...
1
vote
0answers
28 views

How to access a process descriptor that isn't the current one? [closed]

Is there any way to access a processes descriptor of a process that isn't currently running, preferably in C?
0
votes
1answer
26 views

Linux start screen and run a java program and detach it?

I have the following script that should do the following: Stop screen "server" if exists Start screen "server" Run a java program and detach screen. However, when I firstly run the script, the ...
-1
votes
0answers
27 views

Why does the fork-exec sequence clone the shell?

As I understand it, the fork-exec sequence sequence goes something like this: a shell finds and interprets a command. The shell then duplicates itself exactly, with a new process ID (the 'fork') and ...
0
votes
0answers
11 views

How is a wait queue organized? [migrated]

I'm reading Understanding the Linux Kernel, by Daniel P. Bovet and Marco Cesati, and I'm at the part where they discuss process wait queues. The problem is, this book is from 2000, and lots of things ...
1
vote
0answers
12 views

Why is this xclip process killed when I quit Vim?

If I start tmux with no config: $ tmux -Ltest -f/dev/null new then start Vim with no config: $ vim -Nu NONE then from Vim run xclip to write hello in the clipboard: :call system('xclip -selection ...
1
vote
2answers
19 views

Check processes of multiple servers in parallel with if statement

I have a bash function which checks if there are any process running on servers by reading their IPs from a text file one by one while read IP do if [ 1 -eq "$(echo "$(ssh -n ubuntu@$IP "top -...
0
votes
0answers
31 views

PID and process counts do not match from ps with grep output

Using: Red Hat Enterprise Linux Server release 6.10 (Santiago) Scenario: I am trying to automate a process that will capture running processes and put the PIDs and processes into their own arrays, ...
0
votes
0answers
17 views

Node processes keep restarting

I'm currently running a few node processes on PM2, but when I stop them with pm2, then run ps -ef | grep node, it shows the processes as still running. One of them is an express application that ...
1
vote
0answers
14 views

stderr changes behavior of python's Popen when closing the script [migrated]

I was using this script on python2 to launch an application and then immediately exit the python script without waiting for the child process to end. This was my code: kwargs = {} if platform.system()...
2
votes
1answer
35 views

Bash script to count number of executions instances does not work

I am writing a script that detects if there is any instance of it already running on my Linux machine and shows on screen the number of instances. The content of the "detect_itself.sh" script is: #!/...
3
votes
1answer
43 views

What does task status PA refer to?

I am looking into a crash dump for RHEL 7.4. It shows some of the task status as PA. for the command - crash> ps | grep sample - 31718 31717 3 ffff8806873a6eb0 **PA** 0.0 42260 8040 ...
0
votes
0answers
28 views

Can a process group exist without a process group leader

Saying that I have two bash scripts as below: #!/bin/bash # this is test.sh ./test2.sh and #!/bin/bash # this is test2.sh while : do sleep 2 done After executing the test.sh with the command ....
0
votes
0answers
14 views

Automatically java run if it stopped [duplicate]

Can i check java process using crontab (or other way) and if java process does not exist automatically perfom command: nohup java -jar /home/ec2-user/sringTestBoot-1.0-SNAPSHOT.jar
0
votes
1answer
42 views

Can't add a child process in the foreground process group

I am trying to add a child process in the foreground process group. After forking I am calling execve() to spawn a new process(In this case the unix echo program). Before calling execve() i am ...
0
votes
0answers
26 views

Do not allow detach for one bash

I would like to know if it's possible to forbid all detached-like things for a given shell. More precisely, I'd like to make sure that if a command runs in a specific shell, when the command stops, ...
2
votes
1answer
28 views

Why are my desktop applications children of PID1

I'm launching my graphical applications with i3bar. When I look at my system's process tree with pstree,I can see my graphical applications (Firefox, Chromium, Termite etc) are all children of systemd ...
1
vote
1answer
72 views

Splash in PID =1

I have just started learning about process in Linux. I have come around this command called - ps -ef (which will shows all the process running ) I get output like this UID PID PPID LWP ...
0
votes
1answer
27 views

criu: hello-world not working

I wanted to play around with criu, a project for checkpointing/restoring linux processes. For that I am playing around with the hello-world of criu, which is checkpointing and restoring a simple loop. ...
2
votes
1answer
37 views

Why is pidof not working?

In the output of ps aux, I can see the process just fine: # ps aux | grep diff root 7787 28.7 0.0 9368 4516 pts/3 D+ 13:56 20:33 diff -qr mnt/mnt/md/ mnt/mnt2/ root 13130 0.0 0.0 ...
0
votes
0answers
19 views

Perl DNI Script - getfreethread failed: No free PIDs found

I am running a perl DNI scripts on linux machines to SFTP files from my network to outsite Getting following error - Perl DNI Script - getfreethread failed: No free PIDs found
0
votes
0answers
26 views

Total memory vs memory per CPU vs memory per process

I have troubles understanding memory (RAM) specifications of CPUs. Just as an example, the Xeon Gold 6144 specs give a maximal memory size of 768GB. If I have a mainboard with two CPU sockets and 24 ...
3
votes
3answers
86 views

Who runs the interpreter for files that are execute-only?

If the current user only has execute (--x) permissions on a file, under which user does the interpreter (specified by #!/path/to/interpreter at the beginning of the file) run? It couldn't be the ...
0
votes
0answers
33 views

Can two threads in the same process belong to different namespaces?

The task_struct structure has an entry nsproxy which points to namespaces associated with the task_struct. My understanding is that task_struct can be used to represent both process and threads in ...
1
vote
2answers
43 views

How best to start my systemd service to run multiple apps

I have a one-shot service that calls a script in /usr/ Here my .service file: [Unit] Description = Start apps After = network.target [Service] Type=simple ExecStart=/usr/start_apps.sh [Install] ...
0
votes
0answers
33 views

Cmd to check pids used by particular cpu's

In our environment we have applications running in servers with 0-3( total 4 cpu's). While seeing 'top' command and choosing 1 option, able to see 4 cpu's ( example: a server has 4 cpu's). In this ...
0
votes
3answers
53 views

How do we write script to kill PID ( If else loop )? [closed]

I have a file which will contain multiple PID's as show below. #cat /scripts/pid_$DATE.txt 12345 23456 34567 45678 I have to write a script which will read the PID's from above file one by one and ...
0
votes
1answer
78 views

Make process not exit, when exiting from SSH terminal

I just run bitcoind in centOS server. I run the following command nohup ./bitcoind > out & disown Then I exit the SSH terminal, and the process is automatically closed. Is there any way to ...
0
votes
1answer
18 views

How to create a process that runs a script until another process ends

I want to monitor the power that my system needs when i run a Benchmark. When the Benchmark ends the monitoring process should be killed . The monitor script is written in python. How do i do that?
-2
votes
2answers
33 views

Identifying shell script's subshell number from within a script itself

I am accidentally caught in a desire to reveal the subshell number (BASH_SUBSHELL) from within the script itself, but i get subshell 0 Here is the script's line echo "Operated from subshell: $...
0
votes
0answers
16 views

Ignore child cpu when reaping (don't add to /proc/[pid]/stat cutime)

I have a program that runs 24/7 and collects resource information on a system. One of the requirements is to cause as little impact to the system as possible, so there are cpu checks to kill it if it ...
0
votes
1answer
55 views

How can you figure out which program/process is creating a file? [duplicate]

Suppose there's a file that keeps appearing in my home directory automatically even after I delete it. Knowing nothing more about it, is there a way to figure how what keeps putting that file there? ...
0
votes
0answers
24 views

Shell script to execute other script not spawning other scripts

I have a shell script running in a while loop. The script accepts a number as an argument so in ps you would see something like /path/to/script.sh 2. Every 180 seconds, it should be spawning a PHP ...
1
vote
1answer
60 views

How to start and disown a process in a single line?

I noticed that many times I need to start a process and disown it immediately. I trying to achieve this in a single line. Any ideas how to do it?
1
vote
2answers
76 views

apt is always locked in other duties when I want to update my system

Very often when I want to update one of my systems, apt is "locked" by other processes. It can happen more than once the same day. I have to run this command and kill the top process to get apt back,...
1
vote
2answers
136 views

What's inside the kernel part of virtual memory of 64 bit linux processes?

I came upon this question : What's the use of having a kernel part in the virtual memory space of Linux processes? and based on the answer and the comments on the answer : the kernel memory ...
0
votes
1answer
49 views

How can I list information about a thread/LWP by `ps`?

How can I list information about a thread/LWP by ps? Why can't I do that simply by: $ ps 10173 PID TTY STAT TIME COMMAND $ ps -L 10173 PID LWP TTY STAT TIME COMMAND The best I ...
0
votes
1answer
22 views

logname / who -u / how to get the pid of the current session

The command "logname" gives me the name of the login user irrespective of subsequent "su"-calls. E.g. in current mint, the command "logname" is broken und gives no logname. I want to get its ...
0
votes
0answers
33 views

Knowing what directory a process started in

I'd like to be able to know mid-working what directory a child process started in. Here I'm in a Bash session, I start a dash session and I'd like to know where did dash start (in the example it ...
2
votes
1answer
32 views

How does the kernel assign the nice value to a process after it has been executed?

The Linux kernel implements two separate priority ranges. The first is the nice value, a number from –20 to +19 with a default of 0. Nice values are the standard priority range used in all Unix ...
0
votes
1answer
38 views

Are processes within screen treated differently from foreground processes?

Assume I have a long running process, long_running_proc with a single TCP connection to host host.example.com. Is that process treated differently, by the OS or the shell, when it's run as a ...
1
vote
1answer
44 views

Show all running node.js scripts using bash

To find a python script, I use pgrep -af python. Is there a similar command to find node.js scripts?
0
votes
1answer
101 views

Accessing memory of parent process from child process

Say I login using bash and I define an alias. $ alias c=clear $ echo $0 bash Now I enter dash. $ dash $ echo $0 dash The alias defined in bash isn't available: $ alias $ How do I access it? ...
2
votes
2answers
41 views

Stopped process vs running service?

I stopped httpd processes on a centos 7.6 machine using kill -STOP command and the processes show up as stopped in top output. I tried to telnet the webserver's IP on port 80 and was able to do so ...
2
votes
1answer
50 views

Why is “A stop job is running” a good design choice?

In a typical modern Linux distribution, the user may experience this when trying to shut down the computer: "A stop job is running for Session c2 of user", or equivalent. Now, I understand the idea ...
0
votes
0answers
109 views

How to stop/kill thread in process

I see all of threads according process with ps -T Is there any way to kill/ stop specific thread(not all the process) by thread id/thread name? I prefer with shell script but if it impassable so in ...
3
votes
2answers
128 views

Changing capabilities of run process in Linux

is it possible in Linux to change capabilities of process that is run? Is it possible to change path to the opened files (for example to redirect output). If yes, how to?
0
votes
2answers
127 views

How to run a bash script in the same process as the calling script?

I have a bash script that calls/invokes a sub-script with command-line arguments. How can I force the sub-script to run under the same PID as the caller?
2
votes
2answers
44 views

Start systemd service before stopping it on restart

By default, when systemd is asked to restart service, it stops first process and then starts second, so timeline looks like this: PROCESS A --------[stopped] [started]-------- ...