Questions tagged [process]
A process is an instance of a computer program that is being executed.
2,588
questions
32
votes
9
answers
25k
views
Elegantly get list of descendant processes
I would like to get a list of all the processes that descend (e.g. children, grand-children, etc) from $pid. This is the simplest way I've come up with:
pstree -p $pid | tr "\n" " " |sed "s/[^0-9]/ /...
155
votes
3
answers
429k
views
How to see process created by specific user in Unix/linux
I want to see list of process created by specific user or group of user in Linux
Can I do it using ps command or is there any other command to achieve this?
665
votes
7
answers
1.4m
views
Finding the PID of the process using a specific port?
I am installing hadoop on my Ubuntu system. When I start it, it reports that port 9000 is busy.
I used:
netstat -nlp|grep 9000
to see if such a port exists and I got this:
tcp 0 0 ...
0
votes
3
answers
2k
views
How to get the pid of a process that is run through ssh
Lets say I have two servers, server1 & server2
In server 1, i do ssh root@server2 "some_command"
How do I find the pid of this some_command from server1?
2
votes
1
answer
1k
views
Background processes in ksh script are disappearing after they are kicked off
I'm having an issue with a KSH script that is supposed to kick off four processes in parallel in the background and then poll their status.
Put simply, running the four processes sequentially would ...
0
votes
0
answers
32
views
Duplicate instance of ZSH shell in process list
This seems to be very odd as I've found little to no evidence that this issue has presented to someone else.
When running ps this is the output:
PID TTY TIME CMD
3142 pts/0 00:00:02 ...
11
votes
5
answers
103k
views
How to restart (or reset) a running process in linux
I have two Linux systems communicating over sockets (Desktop and ARM-based development board).
I want to restart (or reset) my client application (running on a development board) when server sends a ...
0
votes
0
answers
14
views
How can I generate a graph of all processes memory usage overtime from inside an ubuntu docker container?
If I'm inside an ubuntu docker container, and I want to graph all processes running inside over 20 seconds, and measure each ones memory usage... Is there an easy way to pipe unix commands together to ...
1
vote
2
answers
4k
views
Loginuid, should be allowed to change or not (mutable or not)?
I am trying to configure the linux kernel. I was confused by Make audit loginuid immutable (AUDIT_LOGINUID_IMMUTABLE) [N/y/?].
The help says:
+config AUDIT_LOGINUID_IMMUTABLE
+ bool "Make ...
0
votes
0
answers
53
views
fork: Resource temporarily unavailable - on CentOS server
I can't run anything anymore (hardly anything) and I keep getting the following error message. If I execute a command, it can be it comes several times the error fork: retry: No child processes, if I ...
1
vote
1
answer
14
views
Solaris 11: how to hide pids of other users?
On the glorious SCO Unix (remind C2 security..)
was possible to hide pid of other users to "oth
er".
For example, user Jane see Jane's processes, u
ser Mike see only Mike's processes, etc.....
3
votes
2
answers
2k
views
What is happening after kill -CONT <PID>?
I have suspend a process through kill -TSTP <pid>. Then tried to continue it with kill -CONT <pid>. But After completion of process, control is not returning to bash. Why this is happening?...
1
vote
1
answer
34
views
How can I identify the leader of a process group in linux?
I understand that when a process is started from a shell in linux or unix, a new process group is created with that process as the process leader, giving its PID equal to a new PGID which is used for ...
-2
votes
1
answer
54
views
ps showing processes that can't possibly be running?
Not sure if this is proxmox related, but when I run ps aux I see a bunch of processes running with uid 100000 (some higher) and some are for processes that involve a shell script that doesn't even ...
0
votes
3
answers
485
views
Is there any parseable process monitor?
I'm looking for a process monitor that produce an easy to parse output to stdout. Is there any tool like that in unix? Something like htop or top, but mean to be consumed by another program.
To be ...
265
votes
7
answers
218k
views
Find out current working directory of a running process?
What command(s) can one use to find out the current working directory (CWD) of a running process? These would be commands you could use externally from the process.
-1
votes
1
answer
63
views
Is the concept of file permission only applicable when access is via shell?
So in Linux we have a concept of file permission. There are three classes: user, group, and others, and there are three types of permissions: read, write, and execute.
Now consider this. You are on a ...
0
votes
1
answer
43
views
Shell: Why is there a "duplicate process " on using a pipe and tee?
I'm not very familiar with bash process, and was surprised to see a "duplicate" process running while using pipe and tee. Can you help me understand this?
In the following, the path to the ...
3
votes
1
answer
384
views
What is the minimum amount of memory required for starting a process on a Linux-based system?
Routines in both languages are inexpensive: goroutines are 2KB each, while Elixir processes are 0.5KB each.
I understand that to start a process in BEAM requires 0.5KB of memory. This being so ...
40
votes
8
answers
203k
views
Fix "firefox is already running" issue in Linux
I am trying to open Firefox in CentOS, but I'm getting the following message:
Firefox is already running but is not responding
and Firefox doesn't open. I tried this in command line:
kill ...
6
votes
5
answers
8k
views
Why does Firefox refuse to die despite killing it with pkill -9?
I am issuing the following command to kill Firefox on my Red Hat Linux box:
[subhrcho@slc04lyo ~]$ pkill -9 -f firefox
[subhrcho@slc04lyo ~]$
However, when I try to invoke Firefox through ...
3
votes
0
answers
69
views
How to understand the following quote from termios description
I'm using Mac, following quote is from man termios:
When a controlling terminal becomes associated with a session, its foreground process group is set to the process group of the session leader.
To ...
599
votes
15
answers
729k
views
What if 'kill -9' does not work?
I have a process I can't kill with kill -9 <pid>. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option.
0
votes
0
answers
15
views
Is the concept of file permission only applicable when access is via shell? [duplicate]
So in Linux we have a concept of file permission. There are three classes: user, group, and others, and there are three types of permissions: read, write, and execute.
Now consider this. You are on a ...
2
votes
3
answers
86
views
Find all Processes Except These Specific Ones
Is there a ps or pgrep option or standard practice what will let me list all the running processes on a machine EXCEPT for a few specific ones I don't want to see?
Put another way -- let's say I have ...
1
vote
0
answers
34
views
How to check whether a shell process has job-control enabled?
Is there a way to programmatically check whether a given (shell) process has job-control enabled?
1
vote
1
answer
42
views
How to: open terminal in running interpreter
Im not sure if there is any way of doing this...
So, i run several EPICS programs in my machine. EPICS programs usually open interpreters that can be used as a CLI for the program. To make every ...
119
votes
11
answers
396k
views
How to find which processes are taking all the memory?
I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
0
votes
0
answers
23
views
How to get the final current working directory of a child process?
If I spawn off a child process, I can access its working directory (in a not-very-cross-platform way) any time while it's alive by examining /proc/<PID>/cwd. But what are my options if I want to ...
1
vote
0
answers
25
views
How do i list all consuming program by cpu, memory
I wanna list down all consuming cpu, memory programs.
there are bunch of top and questions about it, but all of them not list them by programs.
like for example a python webservice could spawn ...
0
votes
1
answer
30
views
Search processes by executable name, excluding those without a TTY?
I'm trying to search for processes that have a given executable name and have an associated TTY.
My use-case is an attempt to identify running abduco client processes. Since abduco runs client ...
63
votes
4
answers
52k
views
What is the difference between a job and a process?
What is the difference between a "job" and a "process"?
0
votes
0
answers
49
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
---- ------ ----------- -----------
...
3
votes
1
answer
497
views
Hyper Threading and Process Priority
Are there any methods (linux kernel options, sysctl settings or configurable scheduler modules) that can cause a high priority process/thread to run on a physical processor core with the second (hyper ...
0
votes
2
answers
2k
views
Monitor process pid for change
I have a service that is always supposed to be running. I’d like to know when the service ever stops or gets restarted.
I’ve thought about referencing the service’s PID. If it gets restarted, it ...
42
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&...
6
votes
4
answers
44k
views
process id and killing process - ps commmand
Please see the output of below ps command:
abc@smaug:~/Desktop$ ps ax | grep firefox
2213 ? Sl 2:01 /usr/lib/firefox/firefox
2644 pts/0 S+ 0:00 grep --color=auto firefox
Please ...
0
votes
0
answers
57
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 ...
4
votes
2
answers
4k
views
How to prevent processes from being killed when I log out of GNOME?
So far I was used to be able to run tmux via SSH and if I disconnected, the tmux session would still be running when I connected back.
So I assumed that the same could be done by starting a tmux ...
4
votes
1
answer
251
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 ...
4
votes
2
answers
5k
views
How can I start a long running background process, via ssh, and immediately disconnect?
I want to write a bash script which can ssh into a server, start a continuous background process (infinite python script) and exit the server. Here is what I have tried:
ssh user@domain "python3 ...
43
votes
6
answers
54k
views
How do I tell a script to wait for a process to start accepting requests on a port?
I need a command that will wait for a process to start accepting requests on a specific port.
Is there something in linux that does that?
while (checkAlive -host localhost -port 13000 == false)
...
0
votes
0
answers
118
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 ...
299
votes
14
answers
457k
views
How to monitor CPU/memory usage of a single process?
I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.
376
votes
12
answers
626k
views
How to view the output of a running process in another bash session?
I have left a script running on a remote machine from when I was locally working at it. I can connect over SSH to the machine as the same user and see the script running in ps.
$ ps aux | grep ...
1
vote
1
answer
5k
views
nginx stop is not working and nginx is creating new process after killing processes
nginx version: nginx/1.8.0
I am trying to stop nginx with the following command /etc/init.d/nginx stop, however it is not returning any successful message. Then I tried to view the nginx processes ...
1
vote
1
answer
50
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
121
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). ...
4
votes
3
answers
825
views
cronjob to watch for runaway processes and kill them
I have a runaway ruby process - I know exactly how I trigger it.
Point is, it got me thinking about runaway processes (CPU usage or memory usage).
How would one monitor runaway
processes with cron? ...
0
votes
1
answer
49
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 (...