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
1answer
55 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
19 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
52 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
10 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
80 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 ...
0
votes
1answer
39 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 ...
0
votes
1answer
38 views

How can I view threads for a running process that is creating threads?

I made a very small program that creates two threads: #include <pthread.h> #include <stdio.h> #include <unistd.h> void *start() { printf("Am a new thread!\n"); ...
2
votes
2answers
46 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 ...
37
votes
6answers
6k views

Is there a way to pause a running process on Linux systems and resume later?

I have to copy files on a machine. And the data is immensely large. Now servers need to serve normally, and there are usually a particular range of busy hours on those. So is there a way to run such ...
0
votes
1answer
32 views

File manager instances not showing among running processes

I've over 10 windows of a file manager (Thunar, on Xubuntu Core 18.04) open, but ps aux|grep thunar shows nothing (except for the grepped string). Why? ps -e doesn't not show anything either. EDIT: ...
0
votes
1answer
157 views

How to avoid zombie process while working with named pipe?

We normally do the writing job to a FIFO file in background using a control operator &. Something like below. if [ ! -p "/tmp/mysqld.init" ]; then mkfifo /tmp/mysqld.init fi echo "something"...
0
votes
0answers
25 views

Get output of server crash from server re-spawning script

I currently have Homebridge set up on my raspberry pi. When the pi boots, it starts a script which attempts to keep homebridge alive. I originally took the script from this answer which walks you ...
2
votes
1answer
104 views

How to kill and rerun process in one command in Linux

Usually, I use the ps command on Linux to find the pid of the process, then I kill the process using this pid and after that I rerun the process with some specific command for this specific process. ...
2
votes
1answer
50 views

Coreutils timeout(1) plays badly with man/less

I want to set a timeout to the less(1) command on our company's production server. Everyday we produce large log files on it, and despite the nightly batch job to archive/remove them, we sometimes get ...
0
votes
2answers
404 views

Why should parent process wait (to terminate) until all of its child process terminates?

I know there is no enforcement for the parent process to wait until all its child process terminates. However it's a convention followed. Furthermore, I know that if parent process terminates before ...
1
vote
0answers
34 views

About `page_table_lock` in Linux process address space

I'm reading a tutorial about Linux page table, in the linked page Each process has its own page tables (threads share them). The pgd field of the memory descriptor points to the process's page ...
1
vote
1answer
622 views

Is there a way to prevent sigkill to reach a process?

I know that a process cannot prevent SIGKILL. But is there an external way to temporarily prevent SIGKILL to reach a (specific) process? (something like dropping packets by firewalls).
3
votes
4answers
854 views

Get list of processes that were forked off my currently running process?

I am writing a wrapper application to bash scripts and want the application to keep a track of which tools/processes have been launched from user scripts. I would like to know what is the best way to ...
1
vote
1answer
468 views

How can I kill all child processes of a certain process from the command line?

I run both regular Chrome and Chrome Canary (from now on, Canary). Sometimes I want to kill all subprocesses, Google Chrome Helper, of Canary. The problem is that they have the same name as the ...
1
vote
1answer
281 views

Daemon vs worker and when to use what?

(Note that, below, I am frequently using term "daemon or worker" just to indicate that I dont know which word to use as I dont know the exact difference between them in the context explained below.) ...
0
votes
0answers
175 views

can two running processes share the complete process image in physical memory, not just part of it?

can two running processes share the complete process image in physical memory, not just part of it? Here I am talking about the Linux operating systems(eg. Ubuntu). My thinking: I think it is ...
2
votes
1answer
71 views

Run process as if on a single-core machine to find a bug

I have a bug in my Linux app that is reproducable only on single-core CPUs. To debug it, I want to start the process from the command line so that it is limited to 1 CPU even on my multi-processor ...
0
votes
2answers
173 views

Background process (postgresql) receiving SIGINT from Ctrl-C in shell

I wrote a shell.nix file to build the development environment for one of my projects. I'm using a shellHook to ensure a postgresql server is started when you drop into the nix-shell. The shellHook is ...
0
votes
1answer
412 views

Is /proc folder and process details really exists on hard drive [duplicate]

I am a little bit confused about /proc directory. Each process frequently updating its state, memory info, progress etc in their process. My question is that the /proc directory keeps the memory or ...
0
votes
0answers
101 views

AIX kernel internal stats of nmon: fork vs exec

Why the values of fork and exec stats shown on the kernel internal stats of nmon utility in AIX systems (k option) are so different? Usually the shown fork value is greater than the exec value, ...
4
votes
1answer
352 views

Where are UID/GID of a process from, when not from the process's cred pointer?

Circumstances I'm having a lecture on "Cloud Security" at University, and am currently doing a project on virtual machine introspection. Goal of my exercise was to escalate privileges of some ...
3
votes
1answer
269 views

Can a Linux-process intercept signals sent to its child?

I have a shell-wrapper around a large executable. It does something like this: run/the/real/executable "$@" & PID=$! # perform # a few # minor things wait $PID # perform some # post-processing ...
0
votes
2answers
59 views

Shell Script to fetch linux processes and show the process count for individual user as “.” [closed]

Eg. Processes being run by various users are as below. root 5 xuser 3 yuser 1 Then the script should give the output as: root ..... xuser ... yuser .
1
vote
0answers
63 views

pm2 script variable when script path is not within executing folder

I have a pm2 json file that contains a script element. However on the box in question, the target is not within the pm2 script folder. the documentation says that the path needs to be relative to pm2 ...
2
votes
0answers
32 views

Permission errors when running program using supervisor, but not in the shell

I have a program which is supposed to always be running. This program listens for commands in a message broker, does a file system operation upon request, and publishes the result through the same ...
5
votes
2answers
5k views

Restarting Gnome Shell 3.28.1 on Fedora 28

Running newer versions of Gnome (on Wayland), you can't restart the shell with Alt+F2, entering r & then Enter - which used to restart the shell without logging the user out of the session. More ...
1
vote
0answers
163 views

htop: any way to see a sorted tree view from a sub level?

When using htop, I generally find that viewing process sorted by RES makes most sense when looking for performance and other issues in macOS. One problem I have is that Google Chrome (and other ...
0
votes
2answers
360 views

Supervisord removing a process after successfully running

I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated. Any kind of help is ...
0
votes
1answer
172 views

CRIU for non-root users

CRIU doesn't support in non-root user environment, to my knowledge. Does anyone have got a patch for this? -a Linux enthusiastic.
2
votes
1answer
653 views

How to kill a process that's not attached to any terminal

I'm on an OpenVZ VPS and I created a background process as a non-root user then disowned it i.e. user@server:~$node server.js & user@server:~$disown I SSH'ed out of the VPS and now I'm back in ...
-1
votes
1answer
132 views

How can a linux process's date and time be updated without restarting? [closed]

I have a requirement where date and timestamp of a server has to be changed frequently to desired value and associated processes (Weblogic server/Java Virtual Machine Process and a script) have to ...
1
vote
3answers
5k views

Stopping a script process with a Control + C or something

I am trying to make an AV bug raspberry pi for a class. I am using sox to record sound. Which is working fine. the issue is sox needs to be stopped by a control+C to stop and create the new file. ...
1
vote
1answer
52 views

Synchronize current folder in multiple terminals

Today I came across an interesting idea - is it possible to synchronize multiple terminals somehow, so when I change directory in one of them, it gets changed automatically in the others? I think it ...
1
vote
1answer
344 views

How to only show processes from single program in htop. Filter not working for VS code

I'm trying to filter the view in htop to only show the processes associated with Visual Studio Code. I launch VS code on a default install on Ubuntu with code . so that is the filter i'm using. In the ...
2
votes
3answers
4k views

Linux: how to know which processes are pinned to which core?

Is there a way to know which cores currently have a process pinned to them? Even processes ran by other users should be listed in the output. Or, is it possible to try pinning a process to a core ...
0
votes
1answer
24 views

Utility that can be configured to run two commands, and kill both when one finishes

Is there a common utility (Ubuntu, perhaps OSX) that can run a server serve ./public, then run some tests ./run-chrome-tests.sh, and once the tests are finished, kills the serve ./public. This can be ...
0
votes
1answer
138 views

Bash script if statement returning incorrect result while bash -x works

I have a simple bash script that checks if a program is running and actions accordingly. #!/bin/bash check_running=$(pgrep -x redshift) if [[ -n "$check_running" ]]; then echo "1" else ...
2
votes
0answers
32 views

May a process be assigned to another CPU before terminated?

I'm trying to monitor the action of CPU, and I've found something interesting. First I have a script named task.sh as below: #!/bin/sh for i in {1..999}; do sleep 2 echo $$ Then I execute ....
0
votes
0answers
31 views

Is there a way to log attempts to change a file in RHEL6?

We have a RHEL6 server that was built using an old homegrown build platform. The team that built the platform was disbanded, and all members have moved on. So, we are trying to figure out everything ...
0
votes
0answers
428 views

How to limit CPU usage for some specific processes

Saying that I have a program, which will fork three sub-processes, meaning that it will create four processes in total while running. My ubuntu server has 16 CPUs. Is it possible to assign the CPU ...
0
votes
1answer
794 views

Find out why a running process dies

I have a few processes that for some reason end when they shouldn't. How can I know from the process ID if it was killed automatically by the kernel or even by some other user?
1
vote
1answer
392 views

How to pause process with multiple child pid's (java)

I am attempting to "pause" a running java process. So I went ahead and ran the recommended: sudo kill -SIGSTOP <pid_of_java_proc> however, if I run strace on it: sudo strace -F -p <...
3
votes
1answer
317 views

Nested command groups do not produced nested process groups?

I am kind of new with bash and have been playing with it on and of for about a month. While trying to understand how nested command groups work, I tried the following command: ((ps j; ps j); ps j; ...
1
vote
1answer
410 views

What happens to a unix session when the session leader exits?

I'm trying to properly emulate POSIX signals handling and job control for my pet operating system, but it's not clear to me what should happen to a session after the session leader exits. I cannot ...
1
vote
1answer
3k views

Is there any way to kill or end a process in “disk sleep”

I am running Linux Mint 18.2 with KDE Plasma. Recently I noticed that most of the times I copy large files to removable drives the process hangs just before finish. I opened KSysGuard and saw that ...