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
1
vote
1answer
77 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
1answer
33 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
17 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
50 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 ...
14
votes
4answers
17k views

Ctrl-C with two simultaneous commands in bash

I want to run two commands simultaneously in bash on a Linux machine. Therefore in my ./execute.sh bash script I put: command 1 & command 2 echo "done" However when I want to stop the bash ...
0
votes
0answers
15 views

Grouping processes in MINIX

I want to create a way of grouping user processes according to their PID - process belongs to group A when its PID is even (divisible by 2) and to group B otherwise. Basis on that I want to create a ...
21
votes
2answers
203k views

How can I see what processes are running?

I use Ubuntu Server 10.10 and I would like to see what processes are running. I know that PostgreSQL is running on my machine but I can not see it with the top or ps commands, so I assume that they ...
0
votes
0answers
33 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
4answers
6k 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 run by other users should be listed in the output. Or, is it possible to try pinning a process to a core ...
-3
votes
1answer
36 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.
1
vote
0answers
38 views

Scheduling CPU, between User space process/threads and kernel tasks/jobs [duplicate]

I was trying to understand the Linux process management and scheduling. I know that the scheduler schedules different processes based on priority/time slicing. But there are kernel tasks(I am not ...
3
votes
2answers
3k views

Set the affinity of a process from a shell script as it is being launched

I have a script (.sh) where I launch applications like this #!/bin/sh ./application1 configuration1.cfg param1 param2 param3 & sleep 2 ./application2 configuration2.cfg param1 param2 param3 &...
1
vote
1answer
675 views

isolcpus doesn't work on Ubuntu 14

I added isolcpus=0 to the end of the following line to the file /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=0" The idea, as I understand it, is to reserve core 0 from having ...
0
votes
0answers
15 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 ...
91
votes
3answers
15k views

How does Linux “kill” a process?

It often baffles me that, although I have been working professionally with computers for several decades and Linux for a decade, I actually treat most of the OS' functionality as a black box, not ...
1
vote
1answer
1k views

Very large values for utime and stime for foo. Is foo still running?

I am running a program foo It has been running for close to 30 days now (even more) Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
0
votes
1answer
23 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 ...
4
votes
1answer
945 views

Job queueing on a single machine

I have a shiny new server for running simulations on, with a pair of Tesla GPUs and 32 cores, running CentOS 7.2. I'd like for multiple users to be able to submit jobs to the server that get queued up ...
1
vote
4answers
7k 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. ...
2
votes
4answers
1k views

UNIX- Identify which processes are running more that 6hours

I need to know which processes are running more than 6 hours in UNIX. How can I find those out?
0
votes
0answers
53 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 ...
17
votes
5answers
47k views

What is the difference between ps and top command?

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?
0
votes
1answer
154 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
22 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 ...
3
votes
3answers
2k views

How can htop be used to suspend a process and all its child processes?

I use recoll to index files and it kicks in a inopportune times. When I use htop to change the view to a tree view using F5 and filter the process list I see a master process running and child ...
27
votes
2answers
57k views

How can I kill a <defunct> process whose parent is init?

Transmission is intermittently hanging on my NAS. If I send SIGTERM, it doesn't disappear from the process list and a <defunct> label appears next to it. If I send a SIGKILL, it still doesn't ...
1
vote
2answers
203 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 ...
25
votes
1answer
9k views

How to ensure exclusive CPU availability for a running process?

At first, the question seems to be a little bit silly/confusing as the OS does the job of managing process execution. However, I want to measure how much some processes are CPU/IO-bound and I feel ...
1
vote
3answers
1k views

How to kill only current process and continue with shell pipe-line?

I have 2 related Doubts about Bash. (Q1) Consider tail -f SomeFile | wc, a fictitious command-line, where tail is used to simulate a command (C1) which runs for a long time, with some output from ...
28
votes
7answers
10k views

Get chrome's total memory usage

Since google chrome/chromium spawn multiple processes it's harder to see how much total memory these processes use in total. Is there an easy way to see how much total memory a series of connected ...
0
votes
1answer
99 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
21 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: ...
10
votes
2answers
28k views

Run commands in parallel and wait for one group of commands to finish before starting the next

I have script including multiple commands. How can I group commands to run together ( I want to make several groups of commands. Within each group, the commands should run in parallel (at the same ...
8
votes
5answers
14k views

'kill java' doesn't kill java

I am running debian right now and sometimes I need to kill java manually from the terminal, but when I try kill #pid# or pkill java nothing happens. No console output (ok, that's normal) and java is ...
0
votes
1answer
41 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 ...
2
votes
2answers
56 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 ...
0
votes
1answer
67 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"); ...
10
votes
4answers
8k views

Simple queuing system?

Given a commodity PC, we would like to use it to execute some tasks in the background round the clock. Basically, we would like to have commands like: add-task *insert command here* list-tasks ...
38
votes
6answers
7k 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
203 views

linux + top command

I run the top command on my linux machine and I see that vim command take like 99.5% CPU PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
14
votes
3answers
12k views

Systemd and process spawning

Don't normally post here but I am ripping my hair out over this one. I have a Python script that forks when it launches, and is responsible for starting a bunch of other processes. This script used ...
0
votes
1answer
39 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
211 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"...
1
vote
2answers
822 views

How can i get the process with the biggest pid?

How can I get the process with the biggest pid using ps?
0
votes
0answers
29 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
155 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
76 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
775 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
56 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 ...
0
votes
1answer
197 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.