Questions tagged [process]

A process is an instance of a computer program that is being executed.

Filter by
Sorted by
Tagged with
0 votes
2 answers
750 views

Send signal to process in tmux pane

Suppose that app X is running in the foreground in tmux pane. I'd like to send a given signal, e.g. SIGUSR1, to app X. Can I configure a tmux keybinding to send a signal to the currently-selected pane'...
  • 183
1 vote
1 answer
2k views

What is the webkitwebprocess in linux?

So the other day I was looking for a ultra light weight browser. Midori was the first option as per internet. But this was the RAM usage of it. RAM USAGE though midori took only around 100MB, the ...
1 vote
0 answers
27 views

Is it possible to redirect a paused process into a new pipe?

Suppose I have a process that takes some time and outputs some JSON. $: ./foo.py file { ... } And I have piped this output into jq: $: ./foo.py file | jq . And I say: oh no -- the output is long, ...
  • 791
0 votes
1 answer
627 views

How to calculate CPU utilization for an application in a multicore system

On 8-core server, 0-3 are configured as isolcpus and remaining cores (4-7) are available for system and user processes to run. My application has multiple processes which will run on any one of the ...
  • 126
0 votes
1 answer
144 views

how to avoid delete files that comes from gdm-session & cause of increasing used /var

from lsof we can see the following output lsof /var | grep delete rsyslogd 9664 root 4w REG 253,2 25589554694 67267903 /var/log/messages-20210513 (deleted) rsyslogd 9664 root ...
  • 12.1k
0 votes
1 answer
162 views

run daemon process and run next process

I have a shell script and it has 3 program: #!/bin/bash x y z each of above programs is binary and have to run in order. program y is a daemon. When bash run x, it's okey and when y is running, z can'...
  • 10.5k
0 votes
2 answers
413 views

How to find the number of jobs (created by gnu parallel) running in each CPU core at any given time?

I'm using gnu parallel that reads a text file containing curl commands. If I do ps -ef | grep -cw [c]url it shows total number of curl process at a moment. But I want to know number of gnu parallel ...
  • 119
1 vote
2 answers
201 views

killing multiple processes listed in a file

I'm trying to build a script where it will verify, from a file, if the listed processes are running and if they are, they should be killed. this file contains similar list to: process01:0 process02:0 ...
1 vote
1 answer
360 views

Are these threads in htop using any resources?

My node application spawns ffmpeg processes. In htop, there are a bunch of ffmpeg processes I would have expected to have ended but they are still shown in htop. The threads in green are the process ...
  • 113
0 votes
1 answer
98 views

Practically unfork process

I have an executable binary (no source) that clone()s. It doesn't print anything and I think the child is trying to, which I'd like it to do. It always returns successfully even when the child ...
  • 5
4 votes
2 answers
767 views

Why or how does killing the parent process clean the zombie child processes in linux?

Consider this example - #include<stdio.h> #include<stdlib.h> #include<unistd.h> int main() { pid_t pid = fork(); if (pid > 0) { printf("Child pid is %d\n", (...
0 votes
1 answer
152 views

Debug an instantly failing/never appearing child process

I have an executable binary (it's a device driver). It runs and instantly exits with a successful 0 return code. On one computer it creates the all important child process I can see with pgrep, but ...
  • 5
0 votes
1 answer
47 views

Xen: is possible to see processes of the domU on dom0?

I have installed on a Debian dom0 a paravirtualized domU(Opensuse) When I use lxc I can see the process with the "translated" uid for example, on a Slackware lxc "host" I can see ...
  • 11.7k
0 votes
2 answers
302 views

C language programs not workning on ubuntu

I wrote a simple code to find even and odd numbers in c. #include <stdio.h> int main() { int num; printf("Enter an integer: "); scanf(" %d", &num); (num % 2 =...
1 vote
2 answers
2k views

What are CGroup Slices Used For

Just been paying attention to systemctl status' branching structure. I realized I was making up stories to explain why it looked like that but had no clue of what it meant. I can't find much info on ...
2 votes
3 answers
2k views

How to list all processes by non-root users?

I want to see a list of processes similar to what ps aux outputs but not show any root processes.
1 vote
2 answers
1k views

How can I kill a specific process running inside a screen session, without killing that screen session?

I have run multiple ANN training processes under multiple screen sessions. When I enter a screen, I see a training process running. Now, I want to kill a specific process inside the screen without ...
2 votes
1 answer
41 views

Unexpected behavior when checking file size

I'm trying to write a 1 line bash script that will get all PIDs of processes that look like kernel processes, and check to see if they have contents in /proc/*/maps, which indicated kernel process ...
1 vote
1 answer
84 views

Is signal handling a property of a process or not?

From reading the standard, I understand that: signal handling is a property shared by all threads of a process; signal mask is a per-thread property. However, the standard list the following (In ...
  • 532
1 vote
2 answers
776 views

Kill process once it produces certain output

I'm running a program which executes (mostly) correctly, but then hangs. I'd like to run the program such that once it outputs a certain string, or stops producing output it gets killed. The output ...
-1 votes
1 answer
1k views

How to block the internet access but allow local host connection in a process

I have a python program with 2 process running in docker: my own server listening at 8080 an application listening at 8000 I am trying to block the internet access for the 2nd process. I was able to ...
  • 11
1 vote
1 answer
100 views

Subshell (subprocess/child process) with its own $BASHPID not listed by `ps`

I don't understand the following: mkfifo p; $ (>p ps -f | >>p echo $BASHPID) & [1] 983527 $ cat p 983529 PID PPID C STIME TTY TIME CMD 981815 165343 0 19:57 pts/27 00:...
  • 260
0 votes
2 answers
374 views

Example of subshell without child-shell process

I just recently learned that "subshell" is not the same as "child shell process" (see for example What is the exact difference between a "subshell" and a "child ...
  • 260
0 votes
2 answers
736 views

Creating an orphan process

Using Ubuntu, can I create an orphan process by killing the parent process of a background process of sleep 1000 command? Is it possible?
3 votes
1 answer
751 views

How to check if process with pid X is the one you expect

In our application, we start some background processes. The pid of these processes is saved to a file. pids values are re-used when the maximum is reached or when the system is rebooted. How can I ...
0 votes
0 answers
116 views

How to keep a timing dependent C process from context switching

We have a process that is responsible for polling hardware at time-dependent intervals. We would like to dedicate a CPU core to this process. E.g. we want this process to remain runnable at all times. ...
  • 1,030
0 votes
1 answer
492 views

To persist a namespace, create a bind mount point on which /proc/PID?

From https://man7.org/linux/man-pages/man1/n.1.html : By default, a new namespace remains in existence only as long as it has at least one member process. A namespace can be made persistent— that ...
-2 votes
3 answers
273 views

Filter processes by name and nice number

I'm trying to create a script to find the PID number with only the process name and nice number, but I'm not able to.
0 votes
0 answers
179 views

process not killed even we used kill -9 and process actually was belong to container that already removed

here is a strange behavior that show how to kill a process , but actually process not killed example ( from rhel 7.6 server ) ps -ef | grep kafka-exporter root 15340 19528 0 17:25 pts/0 00:00:...
  • 12.1k
0 votes
1 answer
429 views

SIGHUP strange behavior

Context: I am running a process from bash without & and any redirection i.e like ./foo. The process is running while(1) i.e it is running forever. Also, the process is ignoring SIGHUP i.e not ...
  • 9
1 vote
1 answer
232 views

Bash: command substitution with background job

I'm trying to fire and forget a process within a function in bash. I'd this function to return a status corresponding to the fact the process has indeed been fired and retrieve output of the function ...
  • 113
0 votes
0 answers
362 views

A process is running and I cannot find what is it and cannot kill that!

I've found a bash process in my Ubuntu server that is consuming all of my CPU I've try to kill this process by kill -9 and after kill the process run automatically How can find what is this process ...
0 votes
1 answer
199 views

Debugging ssh connection that prints incorrect characters to terminal what appears randomly after ssh logins

With random occurence for ssh logins into remote terminal ('agetty') there is immediate output of unrelated characters into that ssh session terminal. With periodical repetition these are "hh��...
-2 votes
2 answers
61 views

Documentation on the value of $$ in a background process

Is there a documentation on the value of $$ in a background process in bash? man claims that $$ in a subshell is the PID of the main process. According to the following documentation, a subshell is ...
  • 433
0 votes
0 answers
26 views

Bash $$ in backgrounded process [duplicate]

According to the man, $$: Expands to the process ID of the shell. In a () subshell, it expands to the process ID of the current shell, not the subshell. I did some testing: $ echo $$ 20823 $ echo $$...
  • 433
3 votes
1 answer
2k views

Why do threads have their own PID?

I'm using htop and looking at a process (rg) which launched multiple threads to search for text in files, here's the tree view in htop: PID Command 1019 |- rg 'search this' 1021 |- rg 'search ...
  • 334
0 votes
1 answer
78 views

How to redirect running process output from pipe to something else?

Is there any way to redirect stdout (1) from that "pipe" (I don't know exacly how I suppose interpret this, I will be glad if someone could explain how to treat this, or give me some read on ...
  • 103
0 votes
0 answers
48 views

Create a histogram in unix using simple bash commands [duplicate]

I have a huge file with almost 1M lines. I want to create a histogram based on the contents of the file. The values in the file would look something like this: 0.0488 -0.0342 0.0345 -0.0524 -0....
2 votes
0 answers
510 views

Why PID 1 send SIGTERM

I had this problem for a few days. A process, in this case qbittorrent, will stop after a few minutes. Looking at logs it seems that it just caught a SIGTERM. Alright so I used strace -p {PID} -e '...
0 votes
0 answers
122 views

Which process initiates outgoing connections?

Nearly every second an unkonwn process tries to establish a connection to one of my servers: 192.168.4.3.59582 > 192.168.3.42.49152: Flags [SEW], cksum 0x8bc5 (correct), seq 3191149618, win ...
  • 1
0 votes
1 answer
243 views

Skip loop iteration(s) interactively on keypress

I am looping over an array and for each iteration, run a long during process, like this: !#/bin/bash arr=({1..100}) for i in "${arr[@]}"; do echo "$i" sleep 10 done Now I ...
  • 21.8k
0 votes
1 answer
368 views

pid for child of child processes

i'm running a script that calls a child script that in turn calls other child scripts and processes. some of the child processes use a lot of disk io and cpu, and overheats the cpu, causing a crash or ...
0 votes
1 answer
538 views

How do I know what process is running for a systemd-timers service?

I'm trying to determine whether a process is running successfully for a service that's scheduled as a systemd-timers service. I have a service scheduled called certbot.service, which I can see using ...
0 votes
2 answers
395 views

Run foreground process until background process exited in shell

I'm running QEMU virtual machine in -daemonize mode and then spawn an arbitrary foreground (possibly interactive) process intended to interact with the QEMU instance. In general once foreground ...
  • 246
1 vote
1 answer
490 views

Get CPU usage for past n seconds or minutes

Is there a magic command in Linux for listing the processes active in the last past n seconds by CPU usage? To clarify: Process A is launched and it takes 5 seconds to complete, about 5 more seconds ...
  • 275
1 vote
1 answer
218 views

Does a process' kernel virtual memory contain process specific data?

I don't quite understand this picture from the CS:APP book. It shows how the kernel virtual memory of a process has a region different from other processes. Does this mean, that the kernel in the ...
  • 13
1 vote
1 answer
266 views

Why the value of PRI is different in ps and top?

nginx PID is 19910 The value is 19 in ps -eo pri ps -eo pid,ppid,ni,pri,psr,pcpu,stat,cmd |head -n1;ps -eo pid,ppid,ni,pri,psr,pcpu,stat,cmd |grep nginx PID PPID NI PRI PSR %CPU STAT CMD 19910 ...
  • 31
0 votes
1 answer
397 views

How does the page table of a process knows which page was swapped?

I'm refering to those links: Page table content when the physical page we are looking for is in swap area how does linux update page table after context switch How does the kernel address swapped ...
  • 9
1 vote
1 answer
44 views

Is it possible to make a device accessible exclusively by certain programs?

I have a device (a video card) that I need only two programs (expressed as paths, e.g. /usr/bin/myprogram) to access. The device has a /dev file (e.g. /dev/mydev1), but I can also use other references ...
  • 849
1 vote
0 answers
976 views

Is there a way to monitor L1, L2 and L3 cache usage with command line?

I'm looking for a way to know, using command line, how much CPU mem cache is using a running process... is there a way to do that? Thanks in advance
  • 11

1 2 3
4
5
52