Questions tagged [process-management]

Use this tag when the topic is about system process management. Commands used for this are like ps and kill -9 xxxx and service xyz start|stop|restart and htop, for example. Often used in conjunction with memory management.

Filter by
Sorted by
Tagged with
5 votes
0 answers
67 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 ...
user avatar
0 votes
0 answers
20 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 ...
user avatar
0 votes
1 answer
53 views

No sched_min_granularity_ns in kernel parameters

According to this post, there are three kernel parameters for controlling process scheduler: kernel.sched_min_granularity_ns kernel.sched_latency_ns kernel.sched_wakeup_granularity_ns However, on my ...
user avatar
  • 995
0 votes
0 answers
39 views

Hundereds of instances of a process are spawning per second. How can I find out why?

I have a situation where hundreds instances of the lsof process are spawning briefly, and I'm trying to find a way to trace why. Here is an example of capturing the whole tree of one of the short ...
user avatar
2 votes
2 answers
107 views

killall firefox does not kill firefox

When I had loads of firefox windows open and wanted to close them quickly I did killall firefox using killall from the psmisc package in Ubuntu. Nothing happened. I looked in the list of my processes ...
user avatar
1 vote
2 answers
151 views

Autokey - Focus App Window If Running, Launch App If Not

I'm trying to obtain the processID of pcmanfm like this: pgrep -f "pcmanfm" When pcmanfm is not running, the command above returns nothing (as I expect). However, when I run the command ...
user avatar
  • 4,313
0 votes
2 answers
34 views

List Running Commands of All Windows

You can list the process ID of each widow with this command: wmctrl -lp Does there exist a command that shows the running command of each window (kind of like htop has a column for "Command"...
user avatar
  • 4,313
0 votes
1 answer
39 views

Why do my orphaned grandchildren die only if they produce output?

I am tending to a program "master" which manages a set of concurrently running sub-processes "slaves". Sub-processes are launched and killed as needed. Many of these sub-processes ...
user avatar
  • 4,826
1 vote
1 answer
69 views

Kill all of my processes that were started within the past hour?

How do I kill all processes with my username that were started within (past hour, past day) etc?
user avatar
  • 137
3 votes
0 answers
88 views

Running process (not a zombie) that's impossible to kill

Yes, I know this question has been asked tens if not hundreds of times before. Still, I went through all similar questions and tried everything listed on them, to no avail. After compiling some code ...
user avatar
  • 131
0 votes
2 answers
70 views

How can I make cdrecord have UNINTERRUPTED use of system resources?

I'd like to burn thirty mp3 songs to a CD-R, using say cdrecord. But I'd like to use my laptop for other things at the same time (such as using the Kate editor and the Internet). However, I've read ...
user avatar
  • 29
0 votes
0 answers
34 views

Should I start applications started via xmonad as background tasks?

Tiling Window managers can start programs such as web browsers and terminal emulators from keybondings, or during startup. When started, these applications become child processes of the window-manager ...
user avatar
0 votes
1 answer
60 views

How to stop a process permanently for every session?

I have a laptop with minimal resources and this process, "gnome-software", takes up huge space in RAM. I have to kill it every time. Is there permanent way to stop this process?
user avatar
0 votes
0 answers
102 views

How Reliable is unhide?

I setup a new debian system and benchmarked data from multiple security applications before ever connecting the device to my network. If I run unhide brute on this new system I get nearly 20 results ...
user avatar
0 votes
0 answers
30 views

Why do most of my Ubuntu apps eventually fall into State D (uninteruptable sleep)?

I have a fresh install of Ubuntu (21.04). The only apps installed are Signal, Spotify, Firefox, docker, barrier. Eventually after leaving the computer on for 1-2 days... most of the apps, most ...
user avatar
  • 111
1 vote
1 answer
59 views

how to detect and stop a script which calls itself in background and exits

i was working on writing a wrapper script for a tool. the wrapper script should prepare the environment and then call the tool in background then exit. it looks something like this: #!/bin/bash export ...
user avatar
  • 25.2k
1 vote
0 answers
54 views

What could account for a very, very large change in pid's in a short amount of time?

On an Ubuntu 20.x server, we are having some OOM Killer issues, where it kills a Java process. We have been unable to find any memory leaks. But this morning, we got a rare gift, which is two oom-...
user avatar
1 vote
0 answers
59 views

How to kill a process completely that can re-run automatically [duplicate]

A process occupies a lot of CPU, and when I kill it by kill -9, it just re-runs with another name. How can I find it out, kill and delete it?. Its parent pid is 1, started by root user, and on the ...
user avatar
1 vote
1 answer
35 views

what is the right way to know all script PIDS that runs under folder

Under the folder /home/testing/scripts on a Linux machine, we have 234 different scripts that do sanity and testing as /home/testing/scripts/test.network.py /home/testing/scripts/test.hw.py /home/...
user avatar
  • 10.9k
0 votes
1 answer
33 views

Start process and access the "shell" at a later time

I have a remote testing machine which is experiencing some failures. What I would like to do is trigger a gdb process upon failure on the remote machine, and then ssh into the remote machine and ...
user avatar
  • 305
1 vote
2 answers
133 views

Run commands in parallel and wait for one group of commands to start before starting the next

I have created a script to run two threads in parallel using for loops. for i in 1 2 do echo "for loop in shell script iteration begins.." & done As expected it runs in parallel, but I ...
user avatar
18 votes
1 answer
2k views

Process states in OS theory vs in Linux

I'm trying to map Linux process state codes (as in ps) to states in the OS state diagram but I can't seem to map them. Is it because Linux process states don't necessarily match the theoretical OS ...
user avatar
3 votes
0 answers
71 views

2>&1 causes process to block

I am trying to debug what I have done wrong in GNU Parallel (>=20190122). This runs as expected: ( echo 1 | parallel-20190122 --pipe -j0 --tee dummy {} ::: {1..1000}; echo Parallel is done here:...
user avatar
  • 29.6k
2 votes
0 answers
339 views

QEMU on macOS: the background process gradually freezes if the QEMU window is not visible

I have a similar setup on a Windows 10 machine that doesn't have any such issues. This tread about macOS version 10.15.2. If the QEMU window is not visible (hidden, minimized or another application is ...
user avatar
0 votes
0 answers
74 views

CPU utilization = 101? [duplicate]

I don't understand how can the CPU utilization of my Linux system be 101 for a process on Linux system. What does the %CPU actually indicate if it is not percentage utilization? USER PID %CPU %...
user avatar
  • 101
1 vote
1 answer
84 views

FIFO number of processes, sustained growth

I have a FIFO question: Why the fifo thread_num limit 2, but number of processes, sustained growth when one process ends, two processes start, and then got 3 processes. sustained growth 2n-1 #!bin/...
user avatar
2 votes
3 answers
157 views

tools to start many background processes and close cleanly on sigint

I have an ad-hoc case where I as a user want to start a handful of service processes and also be able to interrupt them all together for clean and easy start-stops. The behavior of "docker-...
user avatar
  • 3,844
3 votes
1 answer
302 views

Where does one find the total number of context switches performed since bootup?

I figured out that the number of context switches performed by a process can be found in /proc/$$/status. I have been trying to look for the total number of context switches performed since bootup. I ...
user avatar
  • 131
6 votes
2 answers
843 views

pause youtube-dl when network is disconnected and resume when it is connected again

I am using Linux Mint 20. I am using a vpn with a kill switch (protonvpn-cli ks --on). So, if the vpn connection drops for some reason, the network get disconnected. When the network get disconnected, ...
user avatar
  • 1,201
1 vote
1 answer
170 views

Block/allow specific subprocesses being launched by a process

I block all Internet traffic for my kids' Linux accounts using iptables. Sometimes I want to allow them to use one program or another. In such cases I enable them to run that program as another(...
user avatar
0 votes
0 answers
184 views

killall and kill doesnt work

I scanned using ClamAV and found these files: [root@ip-172-31-23-37 ~]# sudo clamscan --infected --recursive --exclude-dir="^/sys" / /tmp/.X25-unix/dota3.tar.gz: Multios.Coinminer.Miner-...
user avatar
1 vote
1 answer
536 views

What is the process state when pthread_mutex() is executed

Following are the Linux Process states; R: running or runnable, it is just waiting for the CPU to process it S: Interruptible sleep, waiting for an event to complete, such as input from the terminal D:...
user avatar
  • 113
-1 votes
1 answer
161 views

Show processes and threads as tree view

I would like to see a forest display (tree) of all processes and threads. Like ps axfwu but which does not allow to add threads # ps axfwum | less error: thread display conflicts with forest display # ...
user avatar
  • 741
1 vote
0 answers
93 views

Wrapper to rename a temporary file on successful process completion

I'm looking for a means to complete the following: Run some command that is intended to produce foo.out The solution substitutes in foo.out.tmp for foo.out so the target command actually operates on ...
user avatar
  • 111
1 vote
1 answer
380 views

Using cgroups and nice with respect to the same process - does the order matter? What is the correct syntax?

I created a CGROUP on my desktop called background. The purpose of this group is to run all my sysadmin scripts within its CPU limit of 10%. The group is created on every reboot with the following ...
user avatar
-1 votes
1 answer
231 views

how does copy-on-write work in private area? [closed]

I was reading a textbook about how Linux manages private object as picture below shows: the picture shows a case where two processes have mapped a private object into different areas of their virtual ...
user avatar
  • 211
0 votes
0 answers
20 views

autorestart daemons

I use debian, same service /usr/bin/something starts same daemon with different config file: #!/bin/sh # veriables service1=on service9=on service45=on [...] /usr/bin/something /home/user/conf1/...
user avatar
  • 1,822
0 votes
1 answer
450 views

What is the modern equivalent to netstat -peanut

I heavily rely on viewing output of netstat as in sudo netstat -peanut Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State ...
user avatar
3 votes
1 answer
39 views

How can I monitor for processes that take up 80%> of the cpu for more than a minute?

Sometimes I encounter a process that should have been killed, but instead has been using 100% of the cpu for a while (more than a minute). I'd like some way to notify myself if this situation occurs. ...
user avatar
0 votes
1 answer
146 views

Why is a process being shown while using "jobs" command after killing the process manually?

Why is the parole(just a media palyer) still listed in the "JOBS" command output even after killing maually and why is not listed in the "PS" command output ? Does this mean the ...
user avatar
3 votes
1 answer
433 views

Scheduling policy of a POSIX thread Vs kernel's Completely Fair Scheduler when the thread is actually executing

I have some doubts about setting the policy of a thread and how that policy is going to be followed while it is executing. Pthread allows setting the scheduling policy of a thread to SCHED_FIFO/...
user avatar
  • 113
1 vote
1 answer
73 views

Return to a particular job in the jobs list

If I have the following jobs running in a shell -> % jobs -l [1] 83664 suspended nvim [2] 84330 suspended python [3] 84344 suspended python [4] 84376 suspended nvim [5] - 84701 ...
user avatar
  • 224
4 votes
0 answers
103 views

Is there a command like `time` that monitors the network traffic of commands?

I can use the time command to measure the time some command takes: time node -e "" node -e "" 0.06s user 0.01s system 92% cpu 0.076 total Is there a similar way to measure a ...
user avatar
  • 1,287
0 votes
0 answers
60 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 ...
user avatar
-1 votes
1 answer
65 views

Detaching and reattaching a process to a process in linux command line and return exit code of a defunct child process to its parent

I have a script that has many sequential steps to perform, some of which are written into some child scripts. The child scripts run in sequence only. Is there a way to halt an already running parent ...
user avatar
  • 99
2 votes
1 answer
276 views

tmux: Find all sessions that only have dead panes

I want to find the sessions which only have dead panes, to then kill them. How do I do this?
user avatar
  • 1,287
1 vote
1 answer
2k views

What is `gsd-media-keys`?

Partial results from ps on a Linux box is shown below: PPID PID PGID SID TTY TPGID STAT COMMAND 1 1138 1138 1138 ? -1 Ss /lib/systemd/systemd --user ...
user avatar
  • 467
2 votes
1 answer
87 views

How can I prevent Ctrl+C from "going outwards"?

I want to run an interactive tool that can either exit by itself (when the tasks are done) or by me hitting Ctrl+C. In this example, the tool consists of an echo and a sleep (thus it is not really ...
user avatar
  • 177
0 votes
0 answers
119 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 ...
user avatar
  • 531
2 votes
2 answers
518 views

How to set the CHILD_SUBREAPER flag for the Bash process running a script?

I'd like to set the PR_SET_CHILD_SUBREAPER process flag for the Bash process running my script, so that I can reap the tree of child processes that gets created (and can get killed in a non-orderly ...
user avatar

1
2 3 4 5
7