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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

0
votes
0answers
30 views

Wait command in Bash script not acting as expected [on hold]

I am making a script to play 4 different video feeds from 4 different camera DVRs via RTSP, and need them to be pretty much hands-free i.e. a dedicated mini pc running Debian that will, network ...
0
votes
1answer
35 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
20 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
35 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
29 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
61 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
67 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
42 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
137 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
21 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
306 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
320 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
291 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
176 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
159 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
64 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
103 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
232 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
91 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
313 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 ...
2
votes
1answer
158 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
52 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
51 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
26 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 ...
4
votes
2answers
3k 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
113 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
258 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
125 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
501 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
78 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
3k 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
45 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 ...
0
votes
0answers
24 views

Any way to suspend a job and clone it? [duplicate]

A naïve question from a Linux enthusiastic, is it possible to create a clone of existing process (in any state)? I have a long running simulation which takes about an hour to reach just the point at ...
0
votes
1answer
293 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
3k 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
23 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
104 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
30 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
396 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
529 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
350 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 <...
4
votes
1answer
281 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
317 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
2k 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 ...
0
votes
2answers
661 views

How do I know the killed process name by process ID

I killed a process by process ID accidentally, but now I need to know the process name.I checked the id number under folder /proc,but I got anything. how can I know the process name please.
1
vote
2answers
220 views

how disable use swap partition by processes , only if its really need

My embedded system has 2 GB RAM and 100 MB swap partition. I recognize, after continues monitoring that average memory usage of RAM is ~50 %. For some reason system start use SWAP memory and use ...
2
votes
1answer
665 views

Move application explicitly to swap

Is it possible in Linux/Unix systems, to move a process explicitly to the memory swap? I've investigated swap* tools and kill but they can't do anything I want. Example: Process FOO is currently ...