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]

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

0
votes
1answer
23 views

Process state characterization in output of ps command

The ps command shows the state of the process (e.g. Sleeping, Running etc) as also some additional info about. Among two of these additional options according to the man page are < high-...
0
votes
1answer
41 views

Intepretation of -x and -a flags in ps command

According to the man page of ps command, the x flag Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some BSD-style ...
-4
votes
0answers
20 views

run command sleep1000, and remember the process id [on hold]

My task is run command sleep 1000 and remember the process id, maybe I dont understend, but how can I do it?
4
votes
1answer
91 views

Determine all processes running by root with 2 columns showing: pid,cmd

What I did: ps -ax -o pid,cmd,user | grep root but this shows me on 3 columns showing the root inclusive, how do I eliminate the "root" column?
0
votes
1answer
30 views

How to record PID and its command every 15s?

For troubleshooting purpose, I'd like to record PID and its command every 15s and write them to a text file. The desired output: TimeStamp, PID, Command
0
votes
0answers
18 views

Matching TCP Connections to PIDs? (tcptrack)

With tcptrack, I'm able to monitor and see a bunch of connections happening periodically between various IPs on the local machine to a remote machine. The connections are SSH connections (can confirm ...
0
votes
2answers
30 views

“Globally Store” PID of file started from bash script

I'm compiling a latex file in a script and then I'm trying to either open a new pdf reader window or reload the current one (llpp being my reader), so after compiling my script does pdflatex $...
3
votes
1answer
369 views

ps -a fails to find a process which is running

I could find a process named typora from htop but I cannot trace it from ps or pstree $ ps -a | grep -i typora 9696 ttys003 0:00.01 grep -i typora $ pstree | grep -i typora | |--- 09713 ...
5
votes
2answers
1k views

Why can't I kill a `Sl` process?

On Lubuntu 18.04, I open pcmanfm $ pcmanfm . and after looking at the thumbnails of the image files under the current directory in pcmanfm, I closed the window of pcmanfm by Alt-F4, but it is still ...
1
vote
0answers
28 views

Remove inactive SSH process (on server) after connection dropped (on client)

I'm using the following command on a client for port tunneling: autossh -M 20000 -4 -N -f -R 18822:localhost:22 <user>@<vps-ip> Sometimes the client would lose connection or power for a ...
1
vote
2answers
39 views

Exclude chrome/firefox from top command output

How can I exclude Chrome/Firefox processes from top command output? It's just too messy with them in there, and it isn't important for me to see them there.
1
vote
2answers
28 views

how to open running yum command if the terminal is closed mistakenly

I ran the command yum install without -y parameter, and after I hit enter the terminal is closed mistakenly and now the yum is lock and I cannot do any further operation. While searching I ...
0
votes
1answer
19 views

Pipeline running in parallel through creating multiple subshells

I read from this answer about the distinguish between | and ; https://unix.stackexchange.com/a/159492/318084; Consider two commands A and B. When you write A | B A and B are executed in ...
0
votes
0answers
18 views

Kill a process inside docker in a “R” state

I'm having a process on my server that I can't kill, even with kill -9. It's in R state in top and in ps, and it's running inside docker. It's a ls I've started in a very large folder. It's taking ...
3
votes
1answer
70 views

Get latest output of a running command

I have a command running for a long time, which I don't want to disturb. However, I would like to keep check on the process (most of the time remotely). I am constantly monitoring the process via ...
1
vote
0answers
14 views

Track process state changes

Is it possible to get a count of how many times a process has changed its state? (from running to interruptible sleep for example) I have a process that calls another process and i would like to ...
1
vote
0answers
40 views

Where else could memory be used other than process, cache and tmpfs?

We have a server that runs a huge server process to cache some data, sometimes the process crashes, and the memory is not freed unless the machine is rebooted. Before the crash if I sum the RSS ...
0
votes
2answers
54 views

Automate a process using bash script

I have a unimrcp client process (ucp) and I want to spawn multiple ucp using shell script. Whenever I spawn a ucp, it returns a command line using which I can access different functionalities in ucp. ...
0
votes
1answer
22 views

Piping PID into jstack

I've written a command line that effectively extracts the highest CPU java PID thread process from top -H (example code): top -H -n 1 | grep "java" | head -n 1 | cut -d' ' -f1 I want to inspect the ...
0
votes
1answer
33 views

Process continues to run after receiving uncaught SIGINT (Ctrl-C from terminal)

I am trying to interrupt some running processes with Ctrl-C from the terminal in Centos7; some do, some don't. One of the problematic processes (Process-A) is a GNU makefile with nothing fancy; just ...
0
votes
0answers
29 views

How to force all processes with a known name D, started from a given process K have equal CPU ticks scheduled?

Say we have a process K that in itself starts docker images D. We want to make sure that CPU ticks are provided to each and every one from that pool of processes D in a round-robin, or fair meaning ...
5
votes
1answer
144 views

Monitor network traffic of a process and all its subprocesses

I want to know the amount of the network traffic (inbound and outbound) in a time period, generated a specific process and all subprocesses that it spawns. I have developed a software that contains a ...
0
votes
0answers
16 views

htop interpetation of multiple entries per process

In the following htop snapshot, what is the meaning of multiple entries of the same process (in terms of command line, not pid) e.g. what is the meaning of having say more than 7-8 firefox entries ...
0
votes
0answers
17 views

pclose() won't give me the process exit code [migrated]

I've got a strange problem here. I wrote some C++ code with uses popen(3), read(3) and pclose(3) to run various shell commands, parse their output, and do some other stuff. The program seems to work ...
2
votes
0answers
50 views

Difference between closing terminal and closing shell on child processes

Opening a new terminal and typing the command firefox& inside, ps -l gives : 4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox If the shell is closed with the command ...
1
vote
1answer
34 views

Processes PPID changed to 1 after closing parent shell

Opening a new terminal and typing the command firefox& inside, ps -l gives : 4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox If the shell is closed with the command ...
0
votes
1answer
26 views

Number of file descriptors - pidstat

As mentioned here: On RHEL 7.x, below command: pidstat -C syslog-ng -v does not recognise -v option Alternative: There are two process 417880 & 417881 for syslog-ng: # ls /proc/`pidof syslog-...
1
vote
1answer
35 views

What happens to the old stack, heap, and (initialized and uninitialized) data segments after execve() call?

Manpage of execve() says execve() executes the program pointed to by filename. This causes the program that is currently being run by the calling process to be replaced with a ...
-1
votes
2answers
69 views

Is copy-on-write not implemented based on page fault?

Operating System Concepts say fork() we can use a technique known as copy-on-write, which works by allowing the parent and child processes initially to share the same pages. ... When it is ...
10
votes
2answers
1k views

Why is vfork() intended to be used when the child process calls exec() or exit() immediately after creation?

Operating System Concepts and APUE say With vfork(), the parent process is suspended, and the child process uses the address space of the parent. Because vfork() does not use copy-on-write, if ...
1
vote
1answer
23 views

Drilling down in graphs to see individual processes

Are there any system monitoring tools like Munino or Observium, where you can drill down in a graph to see individual processes? Like say if there's a graph of CPU usage, is it possible to click on ...
-2
votes
2answers
44 views

Why is there no choice for cooperative scheduling?

Operating System Concepts says CPU-scheduling decisions may take place under the following four circum- stances: When a process switches from the running state to the waiting state (for ...
3
votes
1answer
60 views

Why some libraries and other parts get repeated in the linux virtual memory with gdb?

This is the result of looking at virtual memory of a process in gdb; I have some questions regarding this: Why are some parts of the virtual memory are repeated? For example, our program (stack6) and ...
1
vote
1answer
29 views

How to log a process's uptime and restarts

I know that I can check a process's uptime with the following: ps -o etime= -p "PID" where PID = pid number. I would like to write to a log when this process ends, and include it's uptime. The ...
0
votes
1answer
33 views

Automatically restarting a process when it dies?

I have a process running on a raspberry pi. After ssh ing into in to the process is started like this: nohup .../blah/blah & IIUC this allows me to log out of the pi and the process keeps ...
1
vote
1answer
26 views

What does lsof -ad3-999 -c rsync do?

I was trying to see the progress of a already running rsync and cp task and found this answer that allowed me to see what was currently happening When i went to the man page for lsof and see that -c ...
0
votes
0answers
17 views

Duplicate JIRA services

I have JIRA 7.5.2 installed on a CentOS 7.4 server and I noticed that there are four duplicates of the JIRA Systemd service: [root@server ~]# systemctl list-units | grep jira jira.service ...
0
votes
2answers
39 views

After redirect stdin from tty1 to file, process still accepts input from tty1

command < file is used to redirect content from a file into a command. On virtual terminal 1 (/dev/tty1), I run less < file. Then on another virtual terminal, I run lsof -p <pid of the less ...
0
votes
1answer
32 views

updating PATH to work for every current working dir

Say I have this defined for PATH export PATH="./node_modules/.bin:${PATH}" does that mean that any process that uses PATH, will have a reference to node_modules/.bin from the current working dir?
0
votes
1answer
63 views

Does Linux have a concept called “heavy weight process”, besides light weight process?

In Linux, what is the definition of a light weight process? Is a light weight process defined as any thing created by clone() system call? (That is my understanding from the book Understanding the ...
12
votes
1answer
3k views

What are the relations between processes, kernel threads, lightweight processes and user threads in Unix? [closed]

Unix Internal by Vahalia have figures showing the relations between processes, kernel threads, lightweight processes, and user threads. This book gives most attention to SVR4.2, and it also explores ...
1
vote
1answer
94 views

Is a light weight process attached to a kernel thread in Linux?

Based on my understanding from Understanding the Linux Kernel, is it correct that: kernel threads and light weight processes in Linux kernel are both represented by task_struct structure in C. ...
0
votes
1answer
131 views

What's the use of having a kernel part in the virtual memory space of Linux processes?

I found a similar question but still it doesn't answer my questions Do the virtual address spaces of all the processes have the same content in their "Kernel" parts? First off, considering ...
1
vote
2answers
35 views

Is there a way to send process RAM usage in disk?

If I want the process PID 666 to stop using my CPU i can use kill -SIGSTOP 666. And I can use this process normally after a kill -SIGCONT 666. But this process is still using my memory. Is there a ...
0
votes
0answers
15 views

Track Process in top that restarts frequitly

What can i do to keep top filtered on a process that is reset frequently and so pid`s changes. top -H -p `pidof buggy_program` Works ok but needs to be reset when ever the application goes down i ...
2
votes
1answer
105 views

Among these two in my ps output, which real-time process will be preempted over the other by linux?

I have got some idea from: https://stackoverflow.com/questions/8887531/which-real-time-priority-is-the-highest-priority-in-linux about how the real time priority values assigned to different ...
2
votes
1answer
41 views

Identify ancestor/descendant involving daemonized processes

Is there a way to identify ancestor/descendant processes that's robust in that it works through daemonization? Consider this example: PID 123 forks into PID 124 PID 124 calls setsid PID 124 forks ...
0
votes
0answers
34 views

Listen for child process creation/fork

Say I have a process like so: #!/usr/bin/env bash node foo.js & pid=$! is there a way to listen to child processes that get created from pid? I want to create a list of pids that get created/...
1
vote
1answer
51 views

execl() is not executing a command without its absolute path

I have C program saved under /usr/sbin/. This program prints "Hello World" every two seconds. I can call/execute this program from any folder. When I write C program with system("a.out"); in it, it'...
0
votes
1answer
23 views

Tagging a process so I can kill it later easily by identifying

I need to tag a generic process (I don't really control the command being run). Could I do something like this: run_special_cmd(){ "$@" -- --very-special-command } run_special_cmd sleep 5000 &...