Questions tagged [process]
A process is an instance of a computer program that is being executed.
2,365
questions
-1
votes
1answer
257 views
Port 3000 is always being hogged by grafana-server
I need port 3000 free for my dev work. But it's being used by grafana-server, that I don't remember ever installing. We do use it within our company so perhaps at some point it has been added to ...
0
votes
0answers
25 views
SIGSTOP anything I haven't interacted with in 10 minutes?
For working on multiple projects, I may open several applications in separate workspaces.
It's possible that while I'm working on one thing, the other set of applications are open but not in use. I ...
0
votes
1answer
74 views
How to bring sleeping process back to foreground?
I used ssh to connect to a server, and run a process in docker.
docker exec -ti docker_name /bin/bash
However, the ssh connection broke at some point, when I went back, command top shows
PID USER ...
0
votes
0answers
34 views
Using coprocess to write a name referenced variable in BASH
I currently try to start background process with coproc and update a name reference variable.
My not working code:
function updateVariable(){
local -n myVar="${1}"
#i=0;
while :
do
...
0
votes
1answer
36 views
What happens to a bg process after a shell is exited?
What happens to a &ed process after the parent shell is exited?
some-daemon &
killall "$SHELL"
is the daemon killed? what signal is sent to kill it then?
1
vote
0answers
41 views
Change the GID of an existing process [duplicate]
Is it possible - for a privileged process - to change the GID of another process. I know that there is the setgroups() system call that allows a process to change it's own GID. However, I want to do ...
2
votes
1answer
3k views
kdevtmpfsi process is using 100% CPU, restarting on kill
I have amzon linux instance with docker, rabbitmq and ejabberd installed.
One process is starting and using cpu 100% I'm trying to kill that process but after sometimes it is starting
Top command ...
2
votes
3answers
423 views
How do I force-close all active ssh sessions that were started by a specific sshd daemon?
I have a system that runs multiple sshd daemons. Each daemon listens to a separate port.
How can I terminate all sessions started by a specific daemon without affecting other ssh sessions?
1
vote
1answer
50 views
How to prevent the program from accessing files?
I want to run some proprietary software on my Linux machine, skype for example. But I do not trust this program and I want to block for this program access to some folders in my home dir.
I tried to ...
0
votes
1answer
23 views
Why does a user session have to be completely closed when groups change? [duplicate]
Adding a user to new groups in linux is easy -- you just need the following command:
# adduser user group
But this doesn't really do anything till you log off and then log in anew. When you have a ...
0
votes
1answer
48 views
How to get this list? Don't miss any [PID] (running & ended)
How to get this list (table)?
From turn on the computer until now.
Don't miss any [PID] (still running [PID], already ended [PID]).
List field: PPID, PID, Threads, USER, Start-time, Change-time, End-...
1
vote
1answer
33 views
Is it possible to read a .sh that was deleted from file system but is being executed? [duplicate]
I've received a project that some dude did and it's on production stage. But that guy had some issues with project managers and other team members (bad attitude, being an ass.. etc). Intentionally he ...
1
vote
1answer
83 views
How can I perform a partial matching of the command name using `ps -C`?
I find the ps -C <cmd> option very useful, since it lets me limit the output of ps to only those processes started with command name <cmd>.
Compared to performing a grep, I also get the ...
2
votes
3answers
136 views
Pause and resume application
I can pause and resume a process by sending it the SIGSTOP and SIGCONT signals.
Taking Firefox as an example:
pkill --signal SIGSTOP firefox
pkill --signal SIGCONT firefox
The thing is that Firefox ...
0
votes
1answer
63 views
Terminate anonymous pipe when “output” process exits
So let's say I have something like this in a shell script
command1 | command2
Now how can I make it so that command2 terminates when command1 exits?
Edit:
That usually happens by default when ...
0
votes
0answers
31 views
How to deal with a MacOS process in the W state?
htop man says W for paging. I see a process with this state. Is there a way to get it out of that state and back into the running state?
0
votes
2answers
79 views
Two processes are running for VNC Service in RHEL 8.2
I have a user account 'virendar' where I have configured vnc. And I noticed, even two processes. I have tried killing two processes and within few seconds, I see one process is getting started ...
-1
votes
1answer
36 views
Why does the shell not terminate by kill -s TERM?
#!/bin/sh
trap 'trap - EXIT; echo exit' EXIT
trap 'echo term; exit' TERM
sleep 100
If I run kill for the PID of the shell process of the script, it does not terminate.
If I remove the TERM trap, ...
0
votes
1answer
71 views
Get process running list in CSV
Below there sample of process running list present. From that list How can we get list process running in a csv file?
root 94701 8609 0 Jul02 ? 00:00:01 containerd-shim -namespace ...
2
votes
2answers
50 views
monitor IO of a running user's executable file read/write
How to monitor IO of file read/write by a running user executable's, just like Windows Process monitor when being set to file-related monitoring only ?
0
votes
0answers
88 views
Discrepancy between process affinity and actual core used
I try to use cpuset shield to give one CPU core to specific process. The shield is created like this:
# cset shield --cpu=11
cset: --> activating shielding:
cset: moving 1545 tasks from root into ...
0
votes
1answer
260 views
Python consume too much SWAP
Please take a look on output of command lsof -p PID where PID is python process.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 1459 root cwd DIR 253,...
0
votes
1answer
31 views
Why do certain processes keep jumping to higher PIDs?
Sometimes when my vscode hangs up, and I have to force-quit it, it is as though it will not start back up again until I restart my computer. Before shutting the computer down I tried looking for its ...
1
vote
0answers
95 views
How do I kill a process in the “Uninterruptible Sleep” state? [duplicate]
OS is Debian 10. Using thunar as my file manager.
I'm assuming some sort of error occurred trying to read a cheap SD card, and now thunar is not responding.
I tried kill -9, no such luck.
ps shows the ...
1
vote
2answers
254 views
Can a program output to STDERR and still return a zero exit status? [closed]
I'm working on refactoring some Python scripts intended to be run from the command line. The scripts use logging, which makes some messages being written to STDERR (among other things). I wonder if it'...
0
votes
0answers
75 views
How dangerous is it to allow a “sandboxed” program to write anywhere in virtual memory?
This is a question about the interaction between a process and the linux kernel. This is in the context of a formal proof, so the setting may seem a bit weird. Suppose I have a program, loaded from an ...
0
votes
0answers
48 views
How can I check the status of a pytest process?
I was thinking of putting this question in StackOverflow since it deals with Pytest, but it is actually more of a linux question so I put it here.
I am running pytest tests on linux (ubuntu),with ...
2
votes
1answer
73 views
Is it possible to append `-o` options to `ps -Af` to display e.g. UID/GID as part of the output?
I find ps -f very useful, since it provides a robust default set of output columns.
However, I also often want to display the UID/GID etc as part of the output. Is it possible to append output columns ...
1
vote
2answers
75 views
Detailed information on a single process in a greppable format
Utilities such as ps and top are good for looking at many processes side-by-side. However, they are inconvenient for examining many fields of a single process and are not amenable to using grep. For ...
1
vote
2answers
422 views
'ss' shows multiple listening pids for same port
We have sh scripts using 'netstat' in our production code. We use command 'netstat -lntup' to retrieve all the pids which are listening to some port. I replaced the command with 'ss -lntup. Now, for ...
2
votes
1answer
66 views
Getting PID of shell script using $! does not give the correct (final) PID
I'm trying to get the PID of a shell script so I can kill it at a later date.
bash "home/lewis/builds/arduino/arduino-1.8.12/arduino" & disown
echo "$!"
The above runs and ...
0
votes
0answers
8 views
Locate output file of a process (i.e. secureErase freespace)
I am currently running "diskutil secureErase freespace 1 /Volumes/Macintosh\ HD". I know that part of the programme's execution procedure involves the creation of a large temporary file. I ...
1
vote
3answers
18 views
Monitor how far the SEQuence has got
I have the following script which has been running for over 3 days:
seq -w 1 1000000 | while read i; do (./myscript.pl $i >> output.txt); done
Is it possible to find out how far it has got with ...
0
votes
1answer
68 views
Suspicious pgrep run as root user on debian bullseye
I experience quite a bit of fan activity on my laptop, even the machine should be idle. When I take a look at my processes with top I have a pgrep process appear once in a while, taking some CPU. It ...
0
votes
2answers
72 views
Unable to resume execution of a background process
I tried to install git through the command line,
sudo apt install git.
I put that process into the background by pressing Ctrl-Z. This also stops the process's execution so I tried to resume with
...
1
vote
2answers
47 views
How to get expected process name from executable path in .desktop file
I'm reading through the .desktop files found in /usr/share/applications and it appears SOME don't share the same process name as the executable file (most do).
Is there a way to find that the process ...
5
votes
2answers
1k views
How to shift process from GPU to CPU usage
My nvidia-smi output is as follows
COVID19_002_6LU7_Protease_Top_3/ni_fda130/fda130_fix$ nvidia-smi
Sun Jun 7 15:00:30 2020
+-------------------------------------------------------------------...
0
votes
0answers
60 views
Unable to get environment variables from proc filesystem
I have following script.
$ cat foo.sh
NAME=bar
while true
do
echo "My name is $NAME"
done
As per my understanding, /proc/pid/environ contains environment variables used by the process.
But when I ...
0
votes
1answer
27 views
Using Tail on a process causes character input delay & disruption [duplicate]
I was referring to this question to see if it is possible to spy on another running process' stdout. One answer suggests using tail -f /proc/<PID>/fd/1 to do so. So I opened two terminal ...
3
votes
2answers
111 views
How to propagate an error code outside a terminal?
From inside a bash script I try to retrieve the error code of a program launched in a new terminal window. It can be reduced to this:
#!/bin/bash
urxvt -e bash -c "exit 4"
echo $?
output: 0
I would ...
0
votes
1answer
262 views
pidstat %CPU vs htop %CPU of a process
I'm using the pidstat to monitor the cpu usage of a process and it shows 100%. For the same process the htop or top shows 200% for the same process.
The system has 16 cores, and the process i am ...
0
votes
1answer
97 views
How to kill process ran by parent process when parent process is killed?
I am running multiple docker containers via python script. I already handled to kill all dockers when gracefully (cltr+c) shutdown the python script but when it's forced killed, the docker remains ...
0
votes
1answer
38 views
sort seems to crash without indication
Correct me if I'm wrong, but I think this applies more to Unix generally than to Apache Jena or to the Windows Subsystem for Linux - after all, it's the sort utility that seems to vanish without a log....
1
vote
1answer
39 views
udevadm doesn't die if parent process experiences an error
I need to redirect output from udevadm monitor to a named pipe. For that end I use the following command:
sudo socat -u SYSTEM:"udevadm monitor" PIPE:/tmp/test &
It works until a process reading ...
2
votes
1answer
352 views
How do I restore files removed from /usr/bin?
TL;DR at the bottom.
Background:
The following occured on my CentOS 6.10 production server. I was using a browser based terminal program to run the program Midnight Commander which is a console-...
2
votes
2answers
2k views
Get PID of ongoing Python process started via script via systemd
I am using systemd to run a shell script at boot, start.sh, that eventually starts main.py, my program’s main Python script.
I would like to record the PID of main.py so it can be programmatically ...
0
votes
0answers
661 views
What is 'dmd' in macOS activity monitor?
I have noticed A dmd process running in activity monitor. On further inspection I have found it located in /usr/libexec/dmd. launchd is listed as the parent process. Is this a normal Mac process or ...
0
votes
0answers
57 views
ps ax showing process or not [duplicate]
When I execute ps ax command with grep, it' showing a single entry of test.py
test.py was just single print statement submitted like this:
nohup python test.py &
So I'm assuming it didn't ...
0
votes
0answers
149 views
pm2 daemon killed and resurrected with no child processes
I am investigating a production issue where a few ec2 instances' pm2 daemon are seemingly killed and resurrected without any of the child processes running.
It happened a few times over the past ...
-2
votes
2answers
82 views
Why are process management files on Linux stored under /var/run?
Why are process management files on Linux stored under /var/run?
For example:
$ ls -ltr /var/run/ | grep pid
-rw-r--r-- 1 root root 4 Mar 26 14:12 lvmetad.pid
-rw-r--r-- 1 ...