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

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
1answer
28 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
37 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
21 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
60 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
40 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
62 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
18 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
177 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
215 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 ...
0
votes
0answers
29 views

Identify Resource Usage of a Process: CPU, Memory and I/O [duplicate]

I need to request some AWS resources and in order to do so, I need to identify what are my requirements for: Number of CPU cores (maybe GPUs as well) (performs parallel processing) Amount of Memory ...
0
votes
1answer
220 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
121 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
149 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
60 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 ...
-1
votes
2answers
79 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
132 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
83 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
287 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
123 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
48 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
43 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
2k 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
87 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
213 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
97 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
410 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
75 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
2k 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. ...
0
votes
0answers
113 views

How to iterate tasks in a cgroup, one cpu at a time, holding runqueue's lock?

I want to achieve 3 goals. Iterate tasks through a task_group Aquire rq those tasks attached to. Group those tasks by rq, then lock the rq before iterating tasks (the reason for this: I want cfs_rq ...
1
vote
1answer
42 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
23 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
252 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
2k 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
21 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
92 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
29 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
30 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
358 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
428 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
325 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
254 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
278 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
513 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
171 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
599 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 ...
0
votes
2answers
163 views

Is there the possibility to set a parent process when creating a new process?

I'd like to set the parent of a newly started process, is that possible? Example, let us assume that we start a new desktop environment session via a login manager, so our process tree would look ...
0
votes
1answer
2k views

How to find difference between two epoch time stamps? [duplicate]

I am writing a script to kill a job which runs more than 30 minutes. My epoch time format is like 1503935475067 and I am using current_time_stamp=`date +%s%3N` How to find difference between two ...
1
vote
0answers
729 views

Kill running process

I own some old processes on a shared compute server. They consume a lot of CPU and according to htop they're in the running-state: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ ...