Questions tagged [process]
A process is an instance of a computer program that is being executed.
2,513
questions
0
votes
0
answers
8
views
How to get disk I/O activity by files and processes?
On Red Hat 8 I sometimes get huge disk I/O operations.
I can see disk I/O activities by using sudo iotop -oP command.
Output is:
PID | USER | DISK READ | DISK WRITE
---- ------ ----------- -----------
...
41
votes
3
answers
5k
views
How is a signal "delivered" in Linux?
I am confused by the terminology used to describe Linux signal delivery. Most texts say things like "the signal is delivered to the process" or "the signal is delivered to the thread&...
0
votes
0
answers
31
views
Is it safe to kill the /usr/libexec processes?
I am running Ubuntu 22.04 and the laptop fans are not happy. I am just running 1 firefox window with YouTube in 1 tab, and a couple static pages in the others. No other applications are running. Specs ...
3
votes
1
answer
117
views
Set affinity of a process using TASKSET or sched_setaffinity() to a processor core isolated using CPUSET
First, let me give a background of what I am trying to achieve. I know how to isolate a particular CPU using boot param (isolcpu and nohz_full; the housekeeping subsystem setup).
But as per my ...
0
votes
0
answers
29
views
rcu_sched vs rcu_preempt CPU stalls
I have basic query regarding the RCU CPU stalls, sometimes there is message like INFO: rcu_sched self-detected stall on CPU, and sometimes it's INFO: rcu_preempt detected stall on CPUs/task, what is ...
1
vote
1
answer
43
views
How does linux prevent whole system from freezing when a process crashes
I know about how the kernel slices the CPU time to its processes, but how does it actually hand over control and take it back and what happens to taking control back when the process crashes?
1
vote
2
answers
112
views
How is the process programmatically connected to an interrupt?
I know that an interrupt is a signal sent to a kernel asking for handling. In some cases we have a physical device like a keyboard with a driver that connects a process with an interrupt(key pressed). ...
0
votes
1
answer
38
views
Why is /bin/bash /entrypoint.sh /run.sh always running?
From the moment I turn on my laptop (Ubuntu) and run htop to observe running processes, there are always these four that seem to spawn from the following command: /bin/bash /entrypoint.sh /run.sh
I ...
0
votes
0
answers
23
views
How to view the output of a running process in another bash session on mac?
I have a process running and I would like to know what it prints to stdout and stderr. On linux I would do
tail -f /proc/<pid>/fd/1
See here
How do I do this on macOS?
0
votes
0
answers
22
views
Use screen to tap into process using PID? [duplicate]
I have a command running, but I don't know how to gain access to it. I closed the terminal after starting it, but it's still running. If I stop it, much progress the command has made will be lost. I ...
0
votes
1
answer
35
views
Capture process signal "Terminated" message output in shell pipeline
When a process is ended by a signal, a message is output like Terminated or Killed depending on the signal used. Is it possible to capture that message ?
Take this example pipeline:
while true; do ...
0
votes
1
answer
15
views
Run a command in background and independent of terminal and run alternative if fails
Goal: To run a command independent of the terminal and return immediately. And if the command fails run an alternative commands independent of the terminal and return immediately.
I did the following. ...
0
votes
1
answer
39
views
How to view quickly spawned/killed processes on a Fedora Linux machine?
On Windows, there is a program available for download which is part of what's called the sysinternals suite of tools. This program is called Process Explorer 64 aka ProcExp64. The program is useful ...
4
votes
2
answers
116
views
What does it mean for a binary to "run as root" and how can I determine it for processes?
I've heard that vulnerabilities specifically in Linux programs (binaries in this case) that "are running as root" are dangerous because for example, if some network/web server is "...
1
vote
2
answers
40
views
How to run the follow sample in own process or processes?
The Environment is a Linux like Debian or Ubuntu.
I have two examples; one is working fine, the other is not. How can I fix the non working one?
First example:
Here, I run commands in a terminal to ...
1
vote
2
answers
39
views
how to print PID along with the process dump
I wish to combine both the below commands:
ps -ef| grep -v grep|grep java | awk ' {print "PID is:" $2}';
PID is:515
PID is:22145
PID is:32703
ps -ef| grep -v grep|grep java
wladmin 515 ...
0
votes
0
answers
7
views
Name of service/process for when copying data from mac to iphone
I mean when you copy something from your mac to the files app on iphone, not sync.
Google gets confused by this question and all the results are 'how to transfer data from mac to iphone' etc.
I want ...
0
votes
1
answer
38
views
Start only a socat process when integrating with systemd
I want to run a "socat" command to replicate the information coming on port 162 to another machine and on the same port.
I added a systemd to do this process:
[Unit]
Description=Socat SNMP ...
1
vote
1
answer
20
views
Redirect spawned process to tempfile with the pid in its filename
Suppose myprogram is spawned through the terminal (bash) and gets pid of 1234 (different everytime).
I want to redirect, both stdout and stderr, to a tempfile named abc-$PID (if the PID is 1234, use ...
0
votes
1
answer
112
views
What is the meaning of `kill -0 <pid>`? [duplicate]
I found in a script a call to kill -0 <pid>.
It looks like a way to check if process exists.
I don't know the exact meaning of kill -0 so I looked for its
definition but I didn't find any ...
0
votes
2
answers
40
views
Loop over space delimited PIDs, get number of open file handles
How may I loop over a set of PIDs delimited by spaces? I think I remember the first step is like making each element its own row?
For my Firefox sessions they are quite a few PIDs:
$ pidof firefox
...
0
votes
1
answer
38
views
How to determine which processes are running on outdated packages and needs restarting?
So, I know that it is possible to view or recover deleted files that are currently being used by a process. I've found out that this also applies to packages that were updated. So, let's say we update ...
0
votes
1
answer
71
views
Jail/Sandbox process on an overlay root and track changes
What I am trying to achieve
I want to run a process as an unprivileged user, but all files that are changed by this process should be only changed in a shadow folder. Furthermore, I want to disable ...
0
votes
0
answers
10
views
Suspend/terminate a shell script running in background and called from another shell script
If I run the shell script below :
#!/bin/bash
/bin/bash loop.sh &
that calls this one (loop.sh) :
#!/bin/bash
while true
do
echo "Hello"
done
I can't suspend it (ctrl + z) or ...
3
votes
1
answer
135
views
What is the "kaluad" process on Linux?
I have been browsing running processes on my PC, and I found a process with a name "kaluad", at the time with PID 196 running under root with priority -20. I can't find it in any ...
0
votes
1
answer
18
views
History process
Is there a command line to retrieve all information like pid tid of threads in Linux? For instance if one process has dead before the command ps runs. The command does not find the process
2
votes
1
answer
169
views
How does round-robin scheduling and context switching work from a low-level?
Using round-robin scheduling, the kernel provides time slices for different processes / tasks.
It seems that the kernel will initialize a timer, and when the timer times out, this will cause the ...
0
votes
1
answer
48
views
Why is "struct pid" member `numbers` defined as an array of size 1?
I noticed that, in struct pid in
pid.h,
the member numbers is defined as an array of size 1.
struct pid
{
refcount_t count;
unsigned int level;
spinlock_t lock;
/* lists of tasks that ...
2
votes
1
answer
145
views
Bash to instruct parent process to exit by certain PID's kill
How is the correct bash command/instruction to exit parent process by certain signal or PID's kill when being in child process?
0
votes
0
answers
34
views
How to know which process interacts with input events
How to monitor which process interacts with /dev/input/eventX. In this case, keyboard input events. Is there a way to know which process entered a specific input and watch for that event? Is that even ...
2
votes
1
answer
82
views
ps: show only processes owned by root, without showing kernel threads
I know how to hide kernel threads from ps:
/bin/ps --pid 2 --ppid 2 --deselect -o user:10,pid,stat,pcpu,pmem,tty,start_time,cmd
and I know how to show only processes owned by root:
/bin/ps -U root -o ...
0
votes
0
answers
34
views
Compare two Memo lines and delete unmatched lines from both Memo Delphi
I am new for Delphi 10.02
I have two Memo, Memo1 and Memo2 , both filled with lines
How can I compare Memo1 lines with Memo2 lines and delete the uncompared lines from Memo2
Thanks in advance
0
votes
1
answer
46
views
Finding the PORT NUMBER of the process using a specific PID?
I have a specific PID and my question is how can I know which port belongs to that PID.
Any tips on how to know the port of a service that has a specific PID?
Thanks a lot.
2
votes
0
answers
61
views
Large process id on rocky linux 8.5
I started using rocky linux 8.5, I have added cron to reboot this server everyday. server reboots everyday.
When I start some application on this server the process id I get is very large.
It don't ...
1
vote
3
answers
277
views
Can context switch happen without interrupts?
In my OS textbook it is written:
Interrupts cause the operating system to change a CPU core from its current task and to run a kernel routine. Switching the CPU core to another process requires ...
1
vote
1
answer
66
views
Processes in tmp folder
I have an application that has a process on the /tmp folder, and the process creates another file or folder. If the original process gets ended by the application, will all the files created by it get ...
0
votes
1
answer
65
views
how to check CPU usage at linux system startup?
I am stuck on finding a way to test CPU usage for a linux system at startup, usuing top or htop is too late for me to see the real usage at startup; is there an efficient way to it ?
0
votes
2
answers
63
views
How to see process ID of TCP?
When I want to see the process ID for an application I do ps -aux | grep <application>. For example, when I do ps -aux | grep ssh I see the process ID for SSH.
But when I do ps -aux | grep tcp ...
1
vote
1
answer
61
views
How can I look for a process that wake my machine up from suspend to RAM?
My Linux distribution is Debian 10. When the computer has been asleep (suspend to RAM), it may wake itself in random period of time. I want to figure out what causes this behavior.
0
votes
1
answer
25
views
Is a file still use by php process
I have a 3.2G file in /tmp called phpvXcoZn and I need to remove it.
Therefore I'd like to know if it is still in use but the commands I typed returned nothing :
/tmp$ bigfile=phpvXcoZn
/tmp$ ll -h $...
0
votes
4
answers
115
views
lsof: print custom fields on one line
Using the -F option for lsof, I can specify which fields are printed:
lsof -w -F pcfn
However, the output is split on multiple lines, ie one line per field:
p23022
csleep
fcwd
n/home/testuser
frtd
n/
...
0
votes
1
answer
40
views
Loading shared object to specific processes in Linux
I want to load a shared object to certain processes, there are certain conditions that are required
loading to only specific processes and not all of them
it has to be done before the process code ...
1
vote
0
answers
20
views
macOS: ps's columns "nswap nvcsw majflt minflt" are always empty, values are correct in top
Is there a system setting to enable reporting "nswap nvcsw majflt minflt" for ps on macOS? These fields are listed in the manual installed on macOS, but their column is always empty (shows -)...
0
votes
0
answers
177
views
Distinguish between kernel stack , kernel heap , process kernel stack
I read about these topics but I have some questions remained unanswered and some points I wish to verify.
Kernel:
1.1. Verify:
1.1.1. The kernel is not a task nor an execution unit in the sense we ...
-2
votes
2
answers
109
views
Using the command "sudo chrt -r 99" for a video encoding benchmark I always get bigger (worse) times
I am using a video encoding benchmarking application. The strange thing to me is that when I am using the command sudo chrt -r 99 VideoEncoding cfg I always get bigger time (worse results) instead of ...
0
votes
1
answer
98
views
How do I get process metadata for an exited process?
I'd like to read the process metadata for a process that has already exited.
Say I ran a command some-bash-command and it exited. A few hours later, in another shell, I'd like to get the metadata for ...
0
votes
1
answer
40
views
Error with Systemd in LFS
LFS version: 11.0-systemd
Host: Ubuntu20.04
Chapter in which the problem occurred: 9.5
Commands executed: timedatectl set-local-rtc 1
Error log:
System has not been booted with systemd as init system (...
0
votes
0
answers
201
views
Get Window ID from PID [Wayland and X]
I saw this post here and wanted to know if there's any way to also implement the same idea - getting Window ID from PID in Wayland (or preferably, something that is protocol agnostic). X has xdotool ...
1
vote
3
answers
47
views
How to detect when a terminal emulator closes from an orphaned process
I have a command line utility that spawns a daemon process which then becomes orphaned. How can I make the daemon exit along with the terminal emulator?
2
votes
1
answer
166
views
What is the proper way to exit the current process from a kernel module?
I'm writing a livepatch module to hook a function and replace it with one that causes the process to terminate. I can't call abort() because that calls BUG() and my kernel will panic on oops.
...