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

learn more… | top users | synonyms (1)

13
votes
1answer
3k views

init process: ancestor of all processes?

I have always learned that the init process is the ancestor of all processes. Why does process 2 have a PPID of 0? $ ps -ef | head -n 3 UID PID PPID C STIME TTY TIME CMD root ...
10
votes
1answer
5k views

How to suspend and resume processes like bash does

this question is a follow-up to: How to suspend and resume processes I have started firefox from a bash session in gnome-terminal. The process tree looks like this: $ ps -e -o pid,ppid,cmd -H 1828 ...
18
votes
2answers
5k views

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | ...
8
votes
1answer
266 views

how to find out namespace of a particular process?

I already asked a question about how to list all namespaces in Linux, but there wasn't any correct and exact answers, so I want to find out a method which can help me to find out the namespace of PID ...
7
votes
2answers
2k views

How can you determine which process scheduler is being used? [duplicate]

I.e. is it the O(1) scheduler, the CFS scheduler, or an older one?
7
votes
1answer
2k views

Is the sum of all PIDs “utime” the total system utime?

In order to measure a user's total CPU time, I'm using the "utime" field out of /proc/[pid]/stat: utime %lu Amount of time that this process has been scheduled in user mode, measured in ...
6
votes
3answers
639 views

Running continuous jobs remotely

I'm new to Linux, and I'm probably asking a fairly basic question. How do I run a continuous program on Linux? Basically, I have a program that will continuously check for content on a website. This ...
5
votes
3answers
27k views

How can I see what processes are running?

I use Ubuntu Server 10.10 and I would like to see what processes are running. I know that PostgreSQL is running on my machine but I can not see it with the top or ps commands, so I assume that they ...
3
votes
1answer
652 views

Difference between process group and job?

What's the difference between a process group and a job? If I type pr * | lpr then is it both a process group as well a job? What exactly is the difference between a process group ID and a job ID? ...
2
votes
1answer
439 views

What process created this window with no PID associated? [duplicate]

Possible Duplicate: What process created this X11 window? I need to kill a process that spawned a window which seems to have no PID associated with it. At least that is what xdotool says: ...
15
votes
1answer
4k views

What is the maximum value of the PID of a process?

What is the maximum value of the PID of a process? Also, is it possible to change the PID of a running process?
8
votes
6answers
5k views

Kill many instances of a running process with one command

This is one of the questions that has troubled me often. Suppose I have thousand or more instances of any process(for e.g. say the process vi) running. How do I kill them all in one single shot/one ...
7
votes
3answers
4k views

nohup vs. Screen

In the past, I've used nohup to run big background jobs, but I've noticed that a lot of people use Screen in this context. Does Screen provide some kind of functional advantage that I am unaware of, ...
6
votes
3answers
264 views

Understanding environmental variables in different contexts

Trying to understand the behaviour of the environment in Linux (Ubuntu 13.04 concretely), I've find different situations where setting envirionment variables are used or defined for/in different ...
6
votes
1answer
9k views

What does this process STAT indicates?

If you check the STAT column in above image you will see Ss S S< SN and R+ What does this indicates ? Process states. If yes,Then what is the significance of 'Ss S< SN and R+'?
6
votes
2answers
942 views

Is it possible to transfer a running process to your terminal? [duplicate]

Possible Duplicate: How can I pause up a running process over ssh, disown it, associate it to a new screen shell and unpause it? It is fairly easy to disown a process, or make it run ...
3
votes
2answers
391 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, 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 ...
1
vote
2answers
826 views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
12
votes
4answers
654 views

What is the difference between running a executable just by name and by appending a dot /slash before it?

This is the output from ls -all command : -rwxr----- 1 subhrcho dba 3600 Nov 13 17:26 jdev -rw-r----- 1 subhrcho dba 1566 Nov 13 17:26 jdev-Darwin.conf -rw-r----- 1 subhrcho dba 347 Mar 6 2009 ...
11
votes
3answers
13k views

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a ...
5
votes
3answers
271 views

Dynamic file content generation: Satisfying a 'file open' by a 'process execution'

I have a read-only file, F. A program, P, that I'm not the author of, needs to read F. I want the content of F to come from another 'generator' program, G, whenever P tries to read F (taking F to ...
5
votes
1answer
2k views

Find processes using a network interface

I'm trying to find a way to safely shutdown a network interface, i.e. without disturbing any processes. For this I need to find out what processes are currently using that interface. Tools like ss, ...
5
votes
1answer
231 views

Why is the following command killing a system?

Anyone understand the following code , running in bash ? :(){ :|:& };: It seems to be a "fork" bomb on Linux.
4
votes
2answers
175 views

LD_PRELOAD or similar to prevent network access

I'd like to start a program disconnected from the network (because immediately upon starting it tries to download huge amounts of data, which can be prevented by changing settings as soon as it ...
7
votes
1answer
99 views

Simulate an unkillable process in D state

For catastrophe testing scenarios on out server environment we're looking for an easy way to make a process stuck in D (uninterruptible sleep) state. Any easy ways? An example C sample code would be ...
7
votes
3answers
907 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]/ ...
5
votes
2answers
276 views

How can I allow a user to prioritize a process to negative niceness?

I want a user to run a specific process on the system with a negative nice value. I can't simply fork the process to background as this specific program is a minecraft server and I rely on the command ...
5
votes
3answers
248 views

How can you change the process name of Wing IDE from python to something more descriptive

In my process list under Ubuntu (using top/System Monitor) one of the largest memory hogs (200+Mb) was python. I searched a bit for one of my programs to be the cause until I realised this was my ...
4
votes
2answers
4k views

Bash script wait for processes and get return code

I am trying to create a script which will start many background command. For each background command I need to get the return code. I have been trying the following script : #!/bin/bash set -x ...
4
votes
4answers
403 views

why new pid is smaller than the old ones?

Is there any chance the new process's pid is smaller than the existed ones ? I have a daemon process which will restart when be killed, I recorded the pids, and found that the pid first came smaller, ...
3
votes
4answers
391 views

How to get the id of a very short child process if the parent is known?

I'm looking for a way to get the PID of a short child process in Linux. The process is instant from a human perspective. I know the parent process which will spawn the child process. Is there a way ...
2
votes
0answers
20 views

CGroup Processes Not Terminated even when main process has been killed through Systemctl stop command

I am running systemctl stop process command for some process. Please find the output for systemctl status process below: Loaded: loaded Active: deactivating (stop-sigterm) CGroup: ...
2
votes
1answer
119 views

Obtain user and kernel time of a running process?

Is there way to determine using standard Linux/Unix tools how much a process has spent in User mode and how much waiting for kernel? In other words, exactly the "user" and "sys" values that you get ...
2
votes
0answers
99 views

How is it that I can attach strace to a process that isn't in the output of ps?

I'm trying to debug why our integration tests are taking so long and it looks like they're hanging part way through. I logged onto our test service and saw the following behaviour: root@colossus:~# ...
2
votes
1answer
127 views

Why does't stopping the nginx server kill the processes associated with it?

When I stop nginx like this on ubuntu 12.04, I get the following errors: $ sudo service nginx stop Stopping nginx: nginx. $sudo service nginx start Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 ...
2
votes
2answers
92 views

How to get environmental variables of a very short process?

I have a very short process for which i want to check the environmental variables for debugging purposes. The process is instant from a human perspective. The example illustrates it better. Example ...
2
votes
3answers
2k views

pkill can't kill processes with parent process id 1

I want to kill the following processes using pkill "run_tcp_sender.sh" or pkill -SIGKILL "run_tcp_sender.sh" root 14320 1 0 2012 ? 00:00:00 bash run_tcp_sender.sh ...
2
votes
2answers
619 views

Is there any impact of reaping zombie processes?

I will execute following command for reaping zombie /usr/bin/preap $(ps -ef | grep defunct | grep -v grep | awk '{ print $2 }' | xargs) Is there any service impact of this approach ?
1
vote
3answers
73 views

detect process eating cpu without: top, htop, ps?

I went thru a problem where I could only guess what process was eating the cpu. My cpu usage was about 80% for all cores at psensor. I tried htop, top and ps -A -o pcpu,pid,cmd --sort +pcpu (the ...
1
vote
3answers
116 views

How do I start a server via ssh and have it run after I log out?

I ssh into a virtual server and start up a web server. Everything runs as expected. But when I close my terminal on my laptop, the process dies on the virtual server. How do I fix this?
1
vote
2answers
504 views

“ps” command doesn't return to prompt

I have this linux box that I need to maintain periodically. To do that, I issue a ps command programmatically and check the running processes. But as shown in the screenshot, sometimes, the ps ...
1
vote
2answers
119 views

Terminal command (called not from SU) that would restrict process from writting to all directories but one?

We have an app testApp. We have a folder called notRestricted in the directory where we run app from. We want to limit access of the app to file system so that app could write only to that folder (we ...
0
votes
3answers
4k views

What is the difference between ps and top command?

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?