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

learn more… | top users | synonyms

12
votes
4answers
623 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 ...
12
votes
3answers
4k views

What would cause ps to report uid instead of username?

I have Eucalyptus installed on my Linux machine, and I've noticed that for processes owned by the eucalyptus user, ps reports the userid instead of the username. For example: $ sudo -i -u eucalyptus ...
12
votes
5answers
24k views

Is there a way to see details of all the threads that a process has in Linux?

For Windows, I think Process Explorer shows you all the threads under a process. Is there a similar command line utility for Linux that can show me details about all the threads a particular process ...
12
votes
2answers
1k views

Is there a way to intercept interprocess communication in Unix/Linux?

For intercepting/analyzing network traffic, we have a utility called Wireshark. Do we have a similar utility for intercepting all the interprocess communication between any two processes in ...
12
votes
3answers
2k views

Can I limit a process to a certain amount of time / CPU cycles?

We have a script which runs on our web servers, triggered by customer action, which initiates a unix process to generate some cache files. Because this process acts upon files supplied by our ...
12
votes
4answers
8k views

view stdout for another pts

Here is the situation. I left my pc at home doing an rsync from a 2TB hard drive to another 2TB hard drive (it's going to take a while since they are both USB 2.0). I am now at work and I have ssh-ed ...
11
votes
5answers
3k views

What is using this network socket?

I'm trying to use NTP to update the time on my machine. However, it gives me an error: host # ntpdate ntp1.example.org 10 Aug 12:38:50 ntpdate[7696]: the NTP socket is in use, exiting What does the ...
11
votes
3answers
1k views

How to stop a background process?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to stop its process, then start it again. How can I stop it? I haven't close its shell window. ...
11
votes
4answers
3k views

After fork(), where does the child begin its execution?

I'm trying to learn UNIX programming and came across a question regarding fork(). I understand that fork() creates an identical process of the currently running process, but where does it start? For ...
11
votes
2answers
3k views

Which process has PID 0?

I'm looking for the process started in Linux which has process ID 0. I know init has PID 1 , which is the first process in Linux, is there any process with PID 0?
11
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?
11
votes
2answers
1k views

Why does bash show 'Terminated' after killing a process?

Here is the behaviour I want to understand: $ ps PID TTY TIME CMD 392 ttys000 0:00.20 -bash 4268 ttys000 0:00.00 xargs $ kill 4268 $ ps PID TTY TIME CMD 392 ttys000 ...
11
votes
4answers
2k views

Is it possible to find the path of a running program?

I have a xmms2d process running, but two possible executable files (in different directories, both in the executable path) that could have spawned it. I suspect that one of those is corrupted, because ...
11
votes
3answers
5k views

How to read environment variables of a process

Linux's /proc/<pid>/environ does not update (as I understand it, the file contain the initial environment of the process). How can I read a process's current environment?
11
votes
1answer
2k views

How do I monitor opened files of a process in realtime?

I know I can view the open files of a process using lsof at that moment in time on my Linux machine. However, a process can open, alter and close a file so quickly that I won't be able to see it when ...
11
votes
4answers
906 views

How can I find which process sends data to a specific port?

I have a service, keeping a certain port open. I'm getting data to it, that I neither expect nor want to get, and I'm trying to pin-point the source of this data. So how can I find which process that ...
11
votes
2answers
804 views

Is there an upper limit to the number of zombie processes you can have?

I used to work with an HP-UX system and the old admin told me there is an upper limit on the number of zombie processes you can have on the system, I believe 1024. Is this a hard fact ceiling? I ...
11
votes
4answers
418 views

Is there a top-like command that shows the network bandwidths and file accesses of running processes

For example, we'd like to see: PROCESS IF TX RX FILE(regular) R/W prog1 eth0 200kB/s 12kB/s -- -- wlan0 12kB/s 100kB/s -- ...
11
votes
3answers
279 views

Where to find explanation of kernel processes?

I want to know about kernel processes, like [migration], [kswapd], etc. Where are kernel processes like these documented?
10
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
5answers
4k views

Under AIX, how can I get the full path of a program bound to a port?

Under Linux I can use netstat -tulpnw and ps, like so: # netstat -tulpnw | grep :53 tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1482/named udp ...
10
votes
3answers
200 views

How do I wait on a program started in another shell

I have a program that does a large a amount of work (takes about 4-5 hours) that gets started by cron when all the data it works with becomes available. Sometimes, when I am waiting for it to finish, ...
10
votes
4answers
388 views

In bash, what are potential negative consequences of pausing a process with control-z?

Using bash, one can pause a process with control-z. However, are there any general circumstances or guidelines to beware of where a process would not behave well with being paused? My specific ...
10
votes
2answers
2k views

tmux session lost in unknown pts, cause and possible solution?

I was trying to re-attach to a long-running tmux session to check up on a python web-application. However tmux attach claims that there is no running session, and ps shows a tmux process (first line), ...
10
votes
3answers
465 views

Maintain 100 instances of a program running

I'm currently using supervisord to maintain 100 instances of a script running at once. If any die then it starts up a new one. However it seems to be struggling maintaining larger numbers (>300 ...
9
votes
4answers
1k views

Block network access of a process?

Is it possible to block the (outgoing) network access of a single process?
9
votes
3answers
16k views

Bash script to find and kill a process with certain arguments?

I want a script which kills the instance(s) of ssh which are run with the -D argument (setting up a local proxy). Manually, I do ps -A | grep -i ssh, look for the instance(s) with -D, and kill -9 ...
9
votes
4answers
12k views

How can I kill a particular thread of a process?

$ ps -e -T | grep myp | grep -v grep 797 797 ? 00:00:00 myp 797 798 ? 00:00:00 myp 797 799 ? 00:00:00 myp 797 800 ? 00:00:00 myp This shows the process ...
9
votes
1answer
4k views

How to suspend and resume proccesses like bash does

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

Linux: Writing a watchdog to monitor multiple processes

A few years ago, a coworker came up with an elegant solution for a watchdog program. The program ran on Windows and used Windows Event objects to monitor the process handles (PID’s) of several ...
9
votes
1answer
219 views

How can I track executables created by my user on Linux?

Using Linux, I would like to track the executables that are executed in my name, including the whole command line (in practice, every exec*() done as my own user). A program I do not control is ...
9
votes
1answer
144 views

Why do I need dbus?

I recently removed dbus from my system (along with consolekit and polkit). I didn't notice any change (I was running it as system daemon and per-user from .xinitrc). However, many people claim that ...
8
votes
3answers
176 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
8
votes
2answers
4k views

How to know reason of a process going to sleep state and wake it up?

When I do 'top' , I see my perl script process in 'S' state. Is there a way to know, what is making this perl process go in sleep state and ways to wake it up? Any way to debug to give more insights ...
8
votes
1answer
153 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 ...
8
votes
2answers
231 views

How can I create a hard to kill process

I want to create a program that will be difficult to stop (even for the administrator) once it is started (with root privileges). Once started the process should continue to start itself at startup ...
8
votes
1answer
469 views

Negatives of running processes with real-time priority?

The question is as the title says, are there any downsides of running processes with real-time priority (chrt -f 99)? My hypothesis is that this combined with an affinity will ensure that any ...
7
votes
6answers
3k 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
8k views

Find out what processes are writing to hard drive

On my Lenovo T400 and Ubuntu, the light for hard drive writing keeps flashing. I was wondering if in Linux it is possible to find out what processes are doing I/O to the hard drive? Just like by top, ...
7
votes
3answers
22k views

Alternatives for “lsof” command?

In many cases "lsof" is not installed on the machines that with I have to work, but the "function" of lsof would be needed very much (ex. on AIX). :\ Are there any "lsof" like applications in the ...
7
votes
1answer
442 views

Why does “kill -9 0” end my console session?

I just wonder why kill -9 0 ends my tty console session? What exactly is PID 0, it is not listed on a ps aux?
7
votes
2answers
1k views

How to stop xargs from badly merging output from multiple processes?

I'm using xargs with the option --max-args=0 (alternatively -P 0). However, the output of the processes is merged into the stdout stream without regard for proper line separation. So I'll often end ...
7
votes
3answers
158 views

Harddrive I/O per Pid

is there any way to see the disk I/O per pid/process ? Monitorix shows me the following and correct me if I´m wrong, but it looks like that the harddrive is slowing down the whole system: UPDATE #1 ...
7
votes
2answers
6k views

Launch process as another user/group (in init.d script)

I am editing a init.d script. The init.d script runs a utility script which then runs an process. From either bash scripts how would I make it launch the main process as a specific user and group?
7
votes
2answers
442 views

Finding out with which parameters a program was started

Is there a way to find out for any given process with which parameters it was started?
7
votes
1answer
7k views

Need explanation on Resident Set Size/Virtual Size

I found that pidstat would be a good tool to monitor processes. I want to calculate the average memory usage of a particular process. Here is an example output: 02:34:36 PM PID minflt/s ...
7
votes
3answers
899 views

How to stop a bunch of processes on unix fast?

How to stop a bunch of processes on unix fast. I can use ps/top, kill. If the number of processes is very large, I use shell script. Are there other ways, only one or two unix commands can do it ...
7
votes
2answers
2k views

How to kill both process and subprocess?

I asked a question to know how to get multiple lines of message from Python's subprocess module. The problem is that in the course of testing, I had to kill the python process that runs gnuchess ...
7
votes
3answers
638 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]/ ...
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 ...