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

learn more… | top users | synonyms (1)

0
votes
1answer
41 views

Linux applications, user and system

I was wondering if there was any CLI command that would allow me to see what applications are being run by the current user, but ones that are not system commands. for example if I run lsof it will ...
1
vote
0answers
32 views

Real-time monitoring of changes in swap use (per process)

I'm looking for a way to observe which processes in my system are consuming an increasing amount of swap over time. The following function generates a list of swap user per process : sbp(){ grep ...
2
votes
3answers
181 views

How to wait for all spawned and backgrounded processes to finish in bash script

I've looked and looked and can't find a working solution to a bash script I'm trying to create to shut a process down and wait for it and spawned processes to finish. I'm still learning a lot of Linux....
0
votes
2answers
66 views

Sleep system call and its time parameter

Let's say that we are writing a C program that calls the sleep() function. For instance, by calling sleep(7), the calling thread would be put to sleep for 7 seconds. My question is: Will the thread ...
3
votes
1answer
119 views

How to sort ps output to find processes realtime priority and identify processess currently occupied running queue

How to properly identify real-time processes currently occupied CPU queue and count them using ps? I know there is a bunch of fileds like prio,rtprio,pri,nice but do not know correct to use. It seems ...
4
votes
2answers
604 views

How to wait for the copying process (cp) to finish?

I want my RPi 2 (with MiniBian (a minimal version of Debian-based Raspbian OS) as its OS) to execute a script when it detects a USB flash memory is inserted. So this is what I have done: I created /...
3
votes
2answers
49 views

wait and recycling of PID

I have a concern whereby in a script, I will be calling parallel versions of a function to run in the background and then issuing a wait. a () { sleep $1 } a 10 & PIDs="$PIDs $!" a 50000 & ...
3
votes
2answers
132 views

How does the Linux scheduler determine if a process is I/O bound or CPU bound

Adding to this question, how does the scheduler determine if a process is I/O bound or CPU bound? Mr. Love in this article, says "schedulers often employ complex algorithms to determine the most ...
1
vote
0answers
62 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 ...
1
vote
1answer
232 views

Why does running sudo cp show two processes

I am trying to copy some files and folders on a Centos machine. I do it like so: sudo cp source destination & to run it in the background. I see there are three cp processes now when I run ps ...
0
votes
1answer
375 views

Process tree using fork() [closed]

I am given the task of creating this process tree in C using fork, if and else: |_____1___ |___2__ | |_4_ | |_3_ | | | | | Or as a pstree like drawing: p(0)─┬─p(1)───p(3) ├─p(2) ...
4
votes
1answer
140 views

Pulling all of a process's swapped memory out of swap

How would one go about quickly pulling all of a process's swapped memory out of swap without writing to disk? The context on this issue is trivial, as the systemic issue necessitating the question ...
4
votes
2answers
119 views

How can I kill my backticked yes process?

I was playing around in my terminal, which runs zsh. I typed the following: $ ` bquote> yes bquote> ` And then, yes started to run in the background, I think. Neither Ctrl + C nor Ctrl + \ ...
2
votes
2answers
117 views

How to set an indentifier for multiple background processes?

I'm creating a custom game server and I have a .jar file to run it. I need to launch multiple game servers on a single virtual machine(like 15). I found, that I could just run them like this: java -...
1
vote
1answer
32 views

Retrieve data from mem cache

Newbie to Linux. My application writes to a log file and for some reason it stopped writing to that file suddenly. We have restarted the application to fix this glitch. Is it possible to retrieve the ...
3
votes
1answer
66 views

`EINTR`: is there a rationale behind it?

Small talk as background EINTR is the error which so-called interruptible system calls may return. If a signal occurs while a system call is running, that signal is not ignored and a signal handler ...
5
votes
1answer
61 views

Can I set a resource limit for the current process tree?

Let's say I'm running on a resource-constrained system, and I want to ensure that the applications I run open no more than 10 files total. If I try to do it using setrlimit, something like: if (fork(...
2
votes
3answers
382 views

lsof -p PID vs lsof | grep PID

I do not understand the ouput of the lsof command. When i write lsof -p PID I get 4 lines and when I write lsof | grep PID I get hundreds of lines. Shouldn't it return the same result? ...
2
votes
1answer
114 views

How is sudo interrupted in xterm on Ctrl-C? [duplicate]

Please explain in detail (including tty related stuff) how is a sudo foreground process on a X terminal emulator actually killed on the Ctrl-C. See the following example please: $ sudo -u test_no_pw ...
1
vote
0answers
9 views

How to see the variables current value of a running matlab process on tmux?

I have a matlab process in tmux which is running for days. Actually I need to see the values of calculated variables till now. I thought that, it is good(if possible) to duplicate the process and then ...
4
votes
2answers
61 views

How do I find the PID of a particular program?

I would like to write a Bash script that searches for PIDs matching a program's name (perhaps using ps ax | grep <PROGRAM> or something similar) and feeds them to pixelb's ps_mem script. ps_mem ...
0
votes
1answer
51 views

How to extract all links from a given url in a decent time

I'm trying to extract the links from a specified url and redirect them to a file. At first I tried using --spider , this is my code: wget --spider --force-html -m http://file/path 2>&1 | grep ...
1
vote
2answers
37 views

View current user process ancestors and formating the output

I'm using ps -eo ppid,pid,cmd to view all process, and how can I format the output to view like below? Only given PID and its ancestor will print (until init). 23464 current | 23211 bash | ...
30
votes
1answer
1k views

What is a “subreaper” process?

The word "subreaper" is used in some answers. Searching Google also turn up entries where the word is "just used". How can I understand what a "subreaper" is?
1
vote
1answer
29 views

Find the command the application has spawned

Is there a way to find the command by which an application has launched an external process? Motivation: I'm using an IDE Qt Creators which at some point calls a SFTP to transfer a file to a remote ...
0
votes
1answer
35 views

strace vs web browser

I was trying to strace an iceweasel like this: strace -e trace=connect iceweasel And I was expecting to see calls to connect when I load new pages. Surprisingly, there weren't any. Why so? Am I ...
0
votes
1answer
85 views

which process was running on a particular time in linux [duplicate]

Is there any way to find which process was running on a particular time in linux? I found the disk utilization was 99% and CPU utilization was 100% on two different times yesterday. The issue was ...
2
votes
1answer
121 views

Why do I have 9 bash processes, why does one of them take up so much CPU and how do I stop them?

I have 9 different bash processes running at all times (I sometimes get more, for example, I have 37 bash processes now.). I found this question, where OP had a similar issue. But I don't see this as ...
0
votes
1answer
41 views

Help with the PS and TTY?

I have this question for you guys: I execute on a different shell 'sleep 600'. I open a different terminal and I executed 'ps' to see my current process , however , I dint see any sleep process. I ...
0
votes
0answers
33 views

Supervisord fails to run a program

I've a program that I try to run with supervisord but keep failing. The following is supervisord configuration: $ cat /etc/supervisor/conf.d/application.conf [program:application-web-1] command=env /...
-1
votes
3answers
34 views

Output of processes and specific users with adding some text

I have tried to output processes for specific user but with adding some text. I can do like it is described in this answer How to see process created by specific user in Unix/linux but I don't know ...
0
votes
0answers
24 views

High CPU usage after Version Upgrade

Not sure if is related to the version upgrade but since I have updated my Raspberry to Linux version 4.1.13+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+...
2
votes
1answer
321 views

iotop showing 1.5 MB/s of disk write, but all programs have 0.00 B/s

I don't understand iotop output: it shows ~1.5 MB/s of disk write (top right), but all programs have 0.00 B/s. Why? The video was taken as I was deleting the content of a folder with a few millions ...
3
votes
2answers
251 views

Content of /proc/<PID>/cmdline file depends on script shebang?

I have a bash script named test.sh which I start with startproc. In case I use #!/usr/bin/env bash shebang in test.sh, the /proc/<PID>/cmdline file looks following: SERVER:~ # cat /proc/29481/...
0
votes
2answers
121 views

Shell script to kill processes except those owned by user

I am Looking for some help in creating a script to kill processes, but return an error message if they are owned by root. Firstly I would like to say that I am a total beginner at this. At the moment ...
1
vote
1answer
95 views

Kill process on specific port

It has been asked before but how to do it with OpenBSD? I tried some different method but none worked. $ sudo fuser -k 80/tcp fuser: 80/tcp: No such file or directory $ kill $(sudo lsof -t -i:80) ...
0
votes
3answers
306 views

How to kill a command executed from a script?

I would like to start a tcpdump in my own script an after some time I would like to kill it again. How can I access the PID from the tcpdump. I tried it with $$ , but this only kills the script. if [[...
2
votes
2answers
83 views

How to kill line of PID?

I have process which created multiple PID's. I want to kill all those PID's. I have tried pkill <process_name>. But PID not getting killed as they were wait to resource releasing. I have ...
1
vote
1answer
79 views

Is it possible to rename a process you own from outside that process?

If I'm logged in as $USER, and I run top and I can see a process I own can I rename that process? If so, how? If not, can root rename a foreign process? If so, how? If not, why?
3
votes
1answer
180 views

Long-running R script is getting killed automatically

I'm attempting to run an experiment for my masters thesis that involves an R script that has to run for quite a while (up to 24 hours of 100% cpu usage). It's a single-core process, and as far as I ...
1
vote
0answers
16 views

How does an OS detect an access to random memory address of a compiled program? [duplicate]

I've read a couple things about memory management/virtual memory and I need a little more details on one important point. If I compile a program and it does an access to a hard-coded address without ...
3
votes
2answers
42 views

How to find what processes run by the user right now?

Once again, I'm a beginner and I can't find the right command. I want to view the processes that I'm currently running.
2
votes
1answer
100 views

Ubuntu: Process vfs-worker taking all CPU resources

My Cloud9 (Ubuntu-based cloud IDE) began to be unresponsive after I tried to save some files (they didn't save to my cloud workspace). It shows 100% CPU utilization and a process that takes all CPU ...
1
vote
0answers
30 views

What is the best practice for setting a process niceness?

I have an agent which runs on my customer's hosts. I want this agent to leave the smallest possible footprint on their hosts, that is, I don't want to degrade my customers' performance. My agent runs ...
1
vote
2answers
86 views

screen process in capitals

I've noticed that when running screen the process identified with it actually shows up in capitals. Linux Debian Wheezy. Here an example with me ssh'in into a machine, running screen -S test and ...
15
votes
1answer
891 views

Why can I list other users processes without root permission?

Using ps -aux or top, I can list other users running processes, but i'm neither running as root or making use of sudo, why ?
1
vote
1answer
73 views

How are piped processes presented in ps output?

I have a following very simple script which watches /tmp directory for new files and output of inotifywait is piped to sed: #!/bin/bash /usr/local/bin/inotifywait -q -m /tmp --format %f | sed 's/a/b/...
0
votes
1answer
42 views

Write a process with 0 idle memory [closed]

I see that the daemons in my PC's process list idle with 0 memory usage. I want my daemons to run like that, so how is it done?
6
votes
1answer
164 views

Replace current process by its coprocess/child

I have a program P that expects to receive "Hello" and output "Why?" before providing a feature. This feature is used by other programs that are not aware that it is common courtesy to start a ...
1
vote
0answers
30 views

i3pystatus-python process blocks suspend and shutdown

After using my arch-linux system a decent time, it can happen, that the i3pystatus process is not freezable anymore. As a result I can't suspend my laptop anymore. Killing the process (killall -9 ...