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

learn more… | top users | synonyms (1)

3
votes
1answer
35 views

Process name post killing

I am getting OOM error and killed process error in logs. In the logs, I can see the process ID which has been killed by kernel but not able to find out which process is actually been killed. Can we ...
3
votes
1answer
21 views

Start new process group in .xinitrc

I have a statusbar (lemonbar) to which I pipe the output of a couple of scripts (time, battery, volume, etc.). These scripts, and the statusbar itself, are all started in a single bash script ...
0
votes
1answer
34 views

How to execute scripts in a parent-child behavior in bash?

Suppose I have two scripts named parent.sh and child.sh. The parent.sh script contains bash child.sh line and the child.sh script contains echo "This is the child script". Now, if the user executes ...
1
vote
1answer
35 views

Cinnamon: Which software project “owns” the “Display” configuration dialog?

Cinnamon 2.8.8 64-bit, Linux Mint 17.3 'Rosa' Menu > Preferences > Display The dialog allows to enable and disable (multiple) monitors, and position them relative to each other with drag and drop. ...
0
votes
1answer
34 views

Return owner of process given PID

I'm trying to grab the owner of a process from a list, I have the command pidof nmap to get the then ps -u <PID> | grep USER that I'm currently playing around with, but when I run it, it ends ...
1
vote
2answers
36 views

Getting the original command invocation from /proc/self

I'm trying to run some startup code in all procesess via the dynamic linker. The code should do stuff based on the zeroth argument of the process. I'm getting the arguments from /proc/self/cmdline (...
2
votes
2answers
34 views

ptrace suid binaries after privilege is dropped

I understand that we probably cannot do ptrace on suid binaries. However, I'm wondering why we cannot do ptrace after the binary drops its previlege to uid instead of euid. For example, in the binary ...
2
votes
2answers
25 views

Status of a threads vs. status of a process

Do all threads of a specific process share the same status (D, R, S, ...) or may there be differences among these threads? If so, where in /proc do I find information about the status of a certain ...
14
votes
2answers
841 views

Colored output?

When I execute a command from a terminal that prints coloured output (such as ls or gcc), the coloured output is printed. From my understanding, the process is actually outputting ANSI escape codes, ...
1
vote
1answer
43 views

How to show a list of processes from a group?

I want a simple command to list all the processes and its information from a given PGID.
0
votes
1answer
41 views

How to manipulate a file descriptor in another process? [duplicate]

Is there any way to manipulate (read, write, etc..) a file descriptor for any app which can be found in the path /proc/{pid}/fd? Especially for sockets. $ ll /proc/4229/fd total 0 lrwx------. 1 ...
3
votes
2answers
388 views

How do I kill all processes except PID 1?

I want to kill all processes on a system except for PID 1. I am currently using pgrep -l . | awk "{if (\$1 != 1) print \$1}" | xargs -n 1 kill -s INT. awk is used to exclude the process with PID 1 ...
1
vote
2answers
47 views

Test whether a process left any orphans behind

I don't need to wait for them, I just need a yes or no. I'm executing a program that I know is going to fork (and the children are likely to fork too). If run correctly, it should take care of all ...
2
votes
0answers
46 views

How to get the executed command of a process which has completed successfully using the PID?

I have small script, abc.ksh that takes 3 parameter e.g abc.ksh ${a} ${b} ${c} I will read from a config file with 'n' no of entires and I will execute abc.ksh 'n' times in parallel using a for loop. ...
0
votes
0answers
38 views

How do we programatically tell if our bash script was succesful in starting or stopping mono-service -l:${LOCK_FILE} ./${PROGRAM_NAME}.exe?

I am running Ubuntu Linux 16.10 on an Ubuntu ThinkStation desktop. I used a bash script just now to restart and stop mono-service on our second Ubuntu Linux 16.04 desktop computer in the following ...
0
votes
1answer
26 views

nonsudo kill processes matching string

I am trying to write a command that will kill all processes matching a string. I have permissions to execute kill -9 but when I try to do pkill -f string I get operation not permitted. Here is what ...
9
votes
3answers
277 views

Set-uid executable and resulting process user

In Ubuntu 14.04, the passwd executable is -rwsr-xr-x 1 root root 47032 gen 27 01:50 /usr/bin/passwd and the ping executable is -rwsr-xr-x 1 root root 44168 mag 7 2014 /bin/ping so (for both) ...
2
votes
2answers
63 views

When opening a terminal does not require a login?

Speaking about Linux and in particular Ubuntu (from 14.04) systems: Case 1 - As pointed out in this answer, processes that allocate a pseudo-terminal don't need to make a login: for example, cups. ...
3
votes
1answer
27 views

Changing the current working directory of a certain process

Can I change the current working directory of a certain process? For example, I am running a process that has the pid 1000. Right now, its current working directory is ~. I want to change its current ...
1
vote
1answer
33 views

Command substitution. Spawned process name is identical to the parent one

This script $ cat csub.sh #!/bin/bash while true; do sleep 5 AVAR=$(date; sleep 2) done when started, makes a process appear in the ps output: ps -eLf|egrep '[c]sub.sh|PID' UID PID ...
0
votes
1answer
36 views

Multithreading (increasing the number of threads for the process)

I wonder if there is any way of adding thread to specific process just to prove that number of thread which are assigned to process can be changed by user. If so, how could I do that ? [root@195689 ...
1
vote
1answer
272 views

Why should I not use 'kill -9' / SIGKILL

Posting this question because I was surprised to not find it directly answered; apologies if this is a duplicate - I did look! I have heard that kill -9 or kill -SIGKILL is bad, but I don't ...
1
vote
2answers
85 views

What is the meaning of Tasks and Running in htop screen?

On my computer it shows Tasks 314; 24 running What do these numbers mean? Is 1 Task = 1 process? Why isn't the number of running tasks = number of CPUs then? (I have more than 24 CPUs) edit. ...
3
votes
1answer
68 views

How to identify & kill runaway processes that runs, exits, then runs again?

Question How can I identify a program caught in an endless loop; where it runs, dies, then runs again? How can I kill it and prevent it from starting again - is reinstalling the package the only way? ...
2
votes
1answer
60 views

How to hide a specific process?

The command hidepid is used to prevent users from seeing all processes that do not belong to them, but it doesn't offer the possibility of selecting a specific process. Is it possible to hide only one ...
1
vote
1answer
29 views

How to run a process and find how much memory it uses? [duplicate]

I regularly use time to find out how long a process takes. Is there an equivalent command for memory? The usual ways to find out how much memory a process takes (ps,/proc/meminfo, etc.) work fine for ...
0
votes
1answer
42 views

Process login vs user login

In a Ubuntu 14.04 system, who has the following output: user1 :0 2016-05-02 14:49 (:0) user1 pts/4 2016-05-02 15:10 (:0) So apparently just the pts/4 is used. But, for example, ...
1
vote
2answers
71 views

killing a process in one line

Sometimes I need to end a process quickly via terminal but it is tedious to just type ps -e | grep firefox and then kill all the time. I want to create an alias in my .bashrc and just type in ...
3
votes
1answer
77 views

Which process sent data out of my computer?

Using vnstat, I observed a lot of uploaded data from my computer and I don't know which process sent data out of my computer. Is there a tool to get stats on how much data a process consumed during a ...
2
votes
1answer
40 views

Sort processes by start time

Is there a way to view processes by the time they were started? top and htop have an option for sorting by how much time a process has been running, but I would like to sort by when the process began ...
1
vote
1answer
36 views

Verify why a process went down accidentally on Solaris 11

I want to know what reasons could have caused a process to be killed automatically by a system or taken down. What file do I need to verify, or how do I know why the process crashes accidentally? Is ...
1
vote
1answer
72 views

Why i couldn't kill the NOHUP process?

So in order to keep my simple blog running permanently, i used the nohup command: nohup python manage.py runserver 0.0.0.0:8000 Everything worked perfectly, my blog keep running even though i ...
1
vote
1answer
30 views

How to get pid of subprocess from the subprocess itself

How can I get pid of a subprocess from the subprocess itself? foo() { echo pid=$$ echo spid=$! echo bpid=$BASHPID } echo PARENT_PID=$$ foo & wait on first run I get: PARENT_PID=17112 [...
0
votes
1answer
94 views

How “Max open files” soft and hard limit are set for specific process?

I used the cat /proc/<pid>/limits command to check the Max open file hard and soft limit, but I want to know how this value will be set and can it be increased or decreased? Is this value is ...
1
vote
2answers
28 views

Preventing the accidental killing of wrong process in htop

I frequently use htop to kill certain processes. To find the process I usually execute "Search" via F3. However, the list of processes refreshes frequently, and in many occasions, before I could press ...
3
votes
2answers
125 views

What are the default stdin and stdout of a child process?

I would like to know what are the default stdin and stdout of a child process (if there are such defaults). Are stdin and stdout of a child process the same as its parent process? Is this something ...
0
votes
0answers
21 views

how to keep supervisord sub-process alive when supervisord was killed

I found when supervisord was killed, the sub-processes which controlled by supervisord also were killed. So I'm wondering that how to keep the sub-processes still alive when supervisord was killed.
0
votes
0answers
67 views

System management locked out by zypper process; refuses to kill

I am attempting to run zypper install nmap on openSUSE Tumbleweed (KDE), but when I attempt to do so I see the following error: System management is locked by the application with pid 12063 (zypper). ...
1
vote
0answers
40 views

apt-get failed to fork in UML (user mode Linux)

I'm running a user mode Linux (Linux-3.19.8) for development testing. I'd like to be able to edit files inside the UML. I have some experience with Vim, so I'd prefer that. But unfortunately when I ...
0
votes
1answer
39 views

Upstart job starts the script twice

I am using Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-85-generic x86_64) where I created a simple Upstart job: # content of /etc/init/listener.conf start on runlevel [2345] stop on runlevel [!2345] ...
13
votes
1answer
1k views

Why do some programs return to the shell immediately while others don't until execution is complete?

I have read from the Modern Operating systems book that when a command is run, the shell creates a child process, waits for it until the child has finished execution and then waits for another command ...
3
votes
3answers
1k views

Is it good to utilize ~100% CPU by my application [closed]

I have an application written in C++ on Linux (Ubuntu 12.14), which decodes audio and finds the peak. This calculation is running on a background thread. From the main UI thread, I am calling the ...
0
votes
1answer
79 views

How to stop a “watch” process

I use "Pleeease" to watch CSS files and automatically compile them when any change happens. I did pleeease watch and then just close the terminal, the wathcing process keeps running. Now I want to ...
1
vote
1answer
30 views

How to know what exactly is being written or which process is keeping my storage disk busy?

I have a server , which has gone rogue(not really), i ran nmon and saw that its Disk utilization is BAD, its 100% busy writing!! Here is the output : Can someone tell me what is keeping my disk ...
0
votes
0answers
17 views

How to FG a Background Process without jobs, fg, etc [duplicate]

I am SSH'ed into a Ubuntu Server. I started a process and closed the terminal window, reconnected to the server. Using TOP I can see the process is still running smoothly, but I did not assign a job ...
1
vote
2answers
30 views

Wait for program in a clean way (e.g. in a different terminal window)

If you want to execute one command and then another one after the first one finish, you can execute command1 & which prints the PID of the process executing command1. You can then think of ...
2
votes
1answer
26 views

Why do processes not fill up empty process IDs

Everybody knows that PID number 1 is systemd (or something equivalent). And every process after that takes another PID, counting up. However when there are 50 processes running (up to PID 50) and ...
1
vote
1answer
53 views

Duration of /proc/pid/stat

I have a process that starts a child process and when the child exits, scans /proc/<pid>/stat to gather some information about the CPU and memory the child used. However I am worried that I am ...
3
votes
3answers
77 views

When interrupting a process, does a memory leak occur?

Lets say I created a program in c/c++, where I manually allocated some variables. Then while running the program, I send an interrupt signal (Ctrl-C). Are those variables freed from memory, or will ...
0
votes
1answer
82 views

How to get the number of threads on the waiting queue for a cpu?

Is there a way to programmatically get the number of threads waiting for cpu on Linux.