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
0
votes
0answers
19 views

Anomalous behaviour of tty

The above is the terminal running heroku run bash I am unable to understand how all of the above are possible at once? ps shows that controlling terminal is not present, tty shows that stdin is not a ...
1
vote
1answer
41 views
+50

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:...
0
votes
1answer
15 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 # ...
1
vote
0answers
30 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 ...
1
vote
1answer
24 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 ...
-1
votes
1answer
31 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 ...
0
votes
0answers
16 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/...
0
votes
1answer
52 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 ...
3
votes
1answer
29 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. ...
0
votes
1answer
30 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 ...
3
votes
1answer
82 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/...
1
vote
1answer
31 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 ...
4
votes
0answers
41 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 ...
0
votes
0answers
20 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 ...
-1
votes
1answer
37 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 ...
1
vote
1answer
100 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?
0
votes
0answers
72 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
0answers
109 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 ...
2
votes
1answer
75 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 ...
0
votes
0answers
37 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 ...
1
vote
2answers
133 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 ...
1
vote
1answer
112 views

Process table limit

I was wondering if the Process Table in linux OS has a limit. Can it get full? And if so, what would I do to make space (maybe try deleting entries for zombie processes) ?
0
votes
0answers
13 views

How to create a process like Redis that can not be killed [duplicate]

I just intalled Redis on my Ubuntu. After starting it, I get a process below: me@X86-Xenial-2:~/edgex-go/bin$ ps aux | grep redis redis 7366 0.0 0.0 38852 8832 ? Ssl 10:53 0:00 /usr/...
0
votes
0answers
7 views

Which output column of the top utility corresponds to the “physical memory” consumption stated by the Windows 10 task manager?

In top, I've got the VIRT and RES columns denoting RAM consumption: top - 21:43:27 up 38 min, 2 users, load average: 0,97, 0,72, 0,48 Tasks: 120 total, 1 running, 65 sleeping, 0 stopped, 0 ...
1
vote
1answer
84 views

Are there any tools to view a process' thread control blocks?

Process Control Blocks expose the /proc file system which allows PCBs to be read by users. Is there a similar file system for Thread Control Blocks? If not, is there a tool to read their contents (...
17
votes
1answer
2k views

How does Linux accomplish pre-emptive scheduling?

I am reading up on Linux processes from The Linux Documentation Project: https://www.tldp.org/LDP/tlk/kernel/processes.html Processes are always making system calls and so may often need to wait. ...
0
votes
0answers
26 views

Automatically renice on process start

I have few steam games. Right now I renice them manually. sudo renice -n -20 -p $(pgrep csgo_linux64) Is there a way I can automatically do that (using systemd rules or something)?
0
votes
1answer
89 views

File descriptor from `signalfd(2)` is never ready to read

I have a fairly big application under care. As part of its job it spawns some child processes and needs to monitor their state (running, crashed). Child process deaths were detected by setting signal ...
0
votes
0answers
8 views

Changing the CPU affinity for all process from a user

I understand I can use taskset to change the CPU affinity of one process, but what if I want to change the CPU affinity of all processes run by a user at once?
0
votes
0answers
66 views

How to capture what happens to the child processes when a (parent) SSH session is killed?

I've been trying to understand what causes child processes to die when the parent dies. In the below test, once I killed sshd, the child processes got killed, and did not get re-parented to systemd ...
0
votes
0answers
52 views

How can I determine if these perl processes are malicious?

Our Suse Linux web server has been running quite sluggish of late and rebooting relieves the issue temporarily. After some further checks, I found that the firewall is blocking some outbound traffic ...
1
vote
0answers
39 views

Preventing xterm from killing its children

I wanted to use a window-manager key binding to open fzf in xterm and then open the chosen file. So I bound a key to spawn xterm -e fzf-open, and put this in fzf-open: #!/usr/bin/bash # fzf-...
0
votes
1answer
37 views

Determine the shell from which screen reattach was called

I'm trying to determine whether a command I'm running is within an SSH session. Usually this works fine by checking for $SSH_CONNECTION or walking the process tree and looking for sshd. However, if I ...
-1
votes
1answer
156 views

Why systemd stopping immediatly after spawning?

I am facing issue while loading vpp.service in systemd. I have written following service. [Unit] Description=Vector Packet Processing Process After=syslog.target network.target auditd.service [...
0
votes
1answer
27 views

How do I troubleshoot a process that kills GNOME Shell?

Whenever I killall evolution and occasionally when I use the GUI to quit, I am kicked out of my GNOME Shell session and have to log in again. I obviously want to determine the cause but I don't know ...
2
votes
1answer
65 views

Why when a parent dies the child's parent gets set to systemd?

I have been reading the book "Understanding the Linux Kernel" and it has a chapter in it that claims if the parent process dies before the child process, the child's parent will be set to the init ...
1
vote
1answer
37 views

How to optimally stop a find which pipes to a bash script

I'm using the following to convert a video library from x264 to x265. But I can't stop it without doing a Ctrl-C on the bash script whilst it's working. find /mnt/local/int001/media/TV/ \ \( -name ...
0
votes
0answers
29 views

How to sort processes JUST by cached memory usage?

I am taking care of a K8s cluster for our team and some of our components are caching huge amounts of memory. Usually, this is not a problem because the cached memory is accessible but kubelet ...
0
votes
2answers
79 views

Terminate process upon specific output

How can I terminate a process upon specific output from that process? For example, running a Java program with java -jar xyz.jar, I want to terminate the process once the line "Started server on port ...
0
votes
1answer
587 views

Where on disk is the config file of pm2-logrotate module?

Simple question. I'm trying to find the config file of pm2's logrotate module to edit it manually. Unfortunately this information is not provided in the Github repo's README. So where is this file? ...
-3
votes
1answer
139 views

Reasons that may cause a running process to voluntarily or involuntarily give-up the CPU?

What are the reasons that may cause a running process to voluntarily or involuntarily give-up the CPU? As only one process can be running in the CPU/Core at any one time.
0
votes
0answers
22 views

Return to waiting terminal after finished with GUI app (for external mergetool)

When using an external GUI app for git mergetool, the shell sits in the background waiting patiently. When I save and close the GUI window, the shell returns to the foreground and git is main app ...
0
votes
1answer
72 views

Identify idle or minimized process

I'm trying to know if some GUI process is idle o minimized in Linux, using Net-SNMP. I've been doing research and as far as I know, SNMP seems to be designed for monitoring services, not processes ...
1
vote
1answer
257 views

Why below code is not able to unblock SIGINT signal

I am trying my hand on Linux Signals. Where I have created a scenario mentioned below: Initially block all SIGINT signals using sigprocmask(). If sender send SIGUSR1 signal then unblock SIGINT for ...
1
vote
0answers
91 views

What Happens In Linux During Context Switching

During process execution in Linux, which action causes the context switching after process time slice? Is it uses of timer interrupt causing or making the CPU Scheduler Context switching or is it ...
2
votes
1answer
668 views

Kill a stuck process in running state

I am trying to kill a du -mh command that has been stuck running for 18 hours. I have tried many kill signals kill -15, kill -2, kill -9 as root but with no luck. Are there any other techniques to ...
1
vote
0answers
31 views

Why one application is shown several times in htop? [duplicate]

I run a simple Python script in a docker container (single process, no multiprocessing or multithreading). When looking at it with ps (one instance): root@srv ~# ps -ef | grep homemonitor root ...
1
vote
2answers
1k views

Is there any danger in using kill -11 instead of kill -9?

I've realised recently that the kill utility can send any signal I want, so when I need to SIGKILL a process (when it's hanging or something), I send a SIGSEGV instead for a bit of a laugh (kill -11 ...
0
votes
1answer
29 views

prlimit causes error 'Argument list too long' with some resource limits

my issue is this: prlimit -t5 echo foo works fine (cpu limit) but prlimit -s5 echo foo (stack size limit) prlimit -v5000 echo foo (address space limit) both return: prlimit: failed to execute echo: ...
0
votes
1answer
305 views

How to hide script from process list in Linux?

I have a script in linux: #!/bin/bash export DISPLAY=:1 value=$(</home/pace/Desktop/BODVersion.txt) cd $value gnome-terminal \ --tab -t "CTCLManager" -e " sh -c 'sleep 1s; ./startapp ...

1
2 3 4 5
7