Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
22 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
36 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
26 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
35 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
36 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
0answers
21 views

What obstacles are there to “move” a program to Tmux?

Suppose there is a program mc ran by bash in terminal iTerm. The /dev/tty is exposed by iTerm, the three file descriptors 0, 1, 2 are connected to that device (I know that Bash opens /dev/tty, while a ...
-1
votes
2answers
21 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
33 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
23 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
146 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
66 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
44 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
12 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 ...
1
vote
0answers
21 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 ...
3
votes
2answers
790 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
42 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
83 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
0answers
57 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
267 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
66 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 ...
0
votes
3answers
305 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
78 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
33 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
130 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
2answers
644 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
19 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
75 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
28 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
27 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
287 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
260 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
248 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 <...
0
votes
0answers
64 views

Start and stop a process at specific times “robustly”

I have a raspbian box which I turned into an Icecast2 client with 2 different "parallel" Darkice instances. Everything ok so far, I can start the two Darkice instances with different configuration ...
4
votes
1answer
191 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
149 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 ...
0
votes
1answer
1k 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
260 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.
0
votes
0answers
62 views

htop couldn't kill [duplicate]

I have a completely unresponsive PyCharm window on my system. I'm trying to kill it using sudo htop - first I filter processes to display only the ones that contain 'pycharm' in them, then I try to ...
1
vote
2answers
95 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 ...
0
votes
0answers
40 views

Convoy effect in SJF and Priority based scheduling

In books, I have read that FCFS suffers from convoy effect. I think that even SJF and priority(both preemptive and non preemptive) can suffer from convoy effect. In SJF, if a process with large burst ...
1
vote
1answer
413 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
111 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
1k 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
547 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+ ...
4
votes
2answers
868 views

How to run groups of commands in parallel?

I am trying to run groups of commands in parallel. There are 10 groups and each group has 3 commands. I want sequential execution within each group and parallel execution of the 10 groups. I am trying ...
2
votes
0answers
108 views

Strange behaviour of “ps aux” in the CPU time column

I am periodically running "ps aux" that outputs values in a following format: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND If I understand TIME is a cumulative CPU time, ...
0
votes
1answer
275 views

How do I kill all instances of /opt/php56/bin/php-cgi if number of running processes exceeds 20?

I need this because my shared hosting plan has a process limit of 25. Whenever there is above 25 process limit, my site gives an error 500. What I want to do is build a script that would kill all ...
1
vote
2answers
63 views

Doing something when a process finishes

Sometimes when I wanted to do something like: long_running_command; second_command I forget the ; second_command part. If I don't want to interrupt and restart the long_running_command (sometimes it'...
0
votes
1answer
34 views

List of processes allowed to run

Is there a program in Linux to control which processes are allowed to run with some kind of control list? So that, when you will try to run a process that is not in the list you will be notified ...