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

learn more… | top users | synonyms (1)

4
votes
3answers
2k views

How to kill two or more processes with one kill command?

I am using the following command to kill one java process via shell script: pidof java|xargs kill -9 $1 What if the list of pidof output has more than one elements? How do I kill them both with ...
0
votes
1answer
4k views

How to know how long a process has been running? [duplicate]

Possible Duplicate: How to check how a long a program has been running? I am interested in doing this purely using bash.
4
votes
3answers
3k views

Slow down just one process to regulate CPU temperature

I have a program. When it is running, the CPU temperature raise from 50 to 80 Celcius, which is my major concern. I can control the CPU frequency to slow it down, but other processes will be slowed ...
30
votes
5answers
9k views

Measuring RAM usage of a program

time is a brilliant command if you want to figure out how much CPU time a given command takes. I am looking for something similar that can measure the max RAM usage of the program and any children. ...
10
votes
3answers
39k 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 ...
11
votes
1answer
15k 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+'?
33
votes
3answers
13k views

What are “session leaders” in `ps`?

What are session leaders, as in ps -d which selects all processes except session leaders?
1
vote
1answer
338 views

Native and non-native support of thread/process programming in Linux?

POSIX thread (pthread) and OpenMP are both libraries for thread programming. But is it right that they are not native to Linux, i.e. they have to be installed by user later? If yes, what are the ...
3
votes
1answer
671 views

Which processes should I NOT strace?

I've created a little function for strace'ing a set of the current user's processes by name: function pstrace() { local pattern="$1"; shift; prefixDashP $(pgrep -U $(whoami) $pattern) | ...
7
votes
2answers
2k 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 ...
3
votes
2answers
179 views

How to detect out-bound port from PID

I have several applications that run on random ports. How would I take the pid or the file location and find which port it is running on? Example of desired output: www-data/apache = 80 ...
19
votes
4answers
4k views

What happens to the output of a process that has been disowned and lost its terminal?

If I close the virtual terminal, where some process was started, does the output just go straight to /dev/null, or can it pollute memory somehow? Can I anyhow grab the output to continue reading it at ...
-2
votes
1answer
479 views

What is a zombie process? [closed]

Could you tell me the meaning of a "zombie process" and give an example.
3
votes
3answers
401 views

Kill process when it stops to produce further output

Is there a shell tool which can probe if a subprocess is still producing output, and otherwise kill it after a specified timeout? I'm using offlineimap for Gmail backup, but that's very very very ...
2
votes
1answer
684 views

Check for process already running in webfaction?

I use Django framework on webfaction and have 5 different cron jobs. One of them lasts much longer than others and sometimes gets stuck (30-120 seconds or more). I have already set that cron job to ...
2
votes
1answer
3k views

A more readable ps

Are there any tools that improve the readability of ps in the same spirit as ack for grep? This would be especially on OS X where ps does not even have options such as --sort user. So far the nicest ...
18
votes
1answer
8k 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?
12
votes
3answers
16k 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, ...
1
vote
1answer
985 views

Automount lookup failed. How to determine what is trying to access the file?

Is there a way to find out what is trying to mount this file? Jul 13 14:27:24 myhost automount[13527]: lookup(file): lookup for tmp_dir failed Something is looking for "tmp_dir", and I've ...
5
votes
1answer
1k views

File descriptor limits are lost after a system reboot

I'm trying to increase the default file descriptor limits for processes on my system. Specifically I'm trying to get the limits to apply to the Condor daemon and its sub-processes when the machine ...
2
votes
1answer
136 views

Is there a way to determine which process creates a file on osx 10.6.8

I would like to know which process has created files on os X 10.6. I'm trying DTrace, which probably will give the right answer, but I have not eyes to see the method. I'm doing this because I think ...
1
vote
1answer
744 views

Make top shows only server process

Can I make top show info about the web and db servers? Can it be done by piping the pids to the top? They can be many process from every one?!? Or is there any better method for this?
27
votes
5answers
6k views

Who's got the other end of this unix socketpair?

I want to determine which process has the other end of a UNIX socket. Specifically, I'm asking about one that was created with socketpair(), though the problem is the same for any UNIX socket. I ...
4
votes
2answers
873 views

Removing zombie process from the process table

Can somebody please explain when parent process receives the exit status of a dead child process via wait, who actually reallocates the memory of the child process and removes it from the process ...
1
vote
2answers
125 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 ...
8
votes
3answers
2k views

Process descendants

I'm trying to build a process container. The container will trigger other programs. For example - a bash script that launches running background tasks with '&' usage. The important feature I'm ...
4
votes
4answers
8k views

What is a command line alternative to top for finding current CPU utilization that isn't dependent on screen width?

If I run top -p <myPID> -n 1 with a terminal that isn't wide enough, the CPU utilization % is omitted from the output. When trying to find a process' cpu utilization via bash scripting, this is ...
2
votes
2answers
2k views

stop parallel processing for a cron triggered process

I have configured my webservers cron jobs to trigger some php script, every 15min, but sometimes the script takes morethan 15 min to complete execution, by the time another process of the same script ...
16
votes
5answers
13k 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 ...
2
votes
1answer
2k views

parsing process ID/names from /proc, thread IDs

When I'm parsing process IDs from /proc, obviously each thread of a process gets its own ID. And I realize that all the threads in that same process can be gathered from /proc/${pid}/task/. But my ...
7
votes
2answers
861 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?
2
votes
3answers
1k views

How to monitor or kill a process which has been started by cron?

I have some bots, which are run by the System scheduler at given time interval. But sometimes due to some logical error I have to stop these bots manually. How can I find these processes run by the ...
6
votes
3answers
4k views

killall gives me `no process found ` but ps

Could somebody explain to me the difference between kill and killall? Why doesn't killall see what ps shows? # ps aux |grep db2 root 1123 0.0 0.8 841300 33956 pts/1 Sl 11:48 0:00 ...
3
votes
1answer
113 views

Is there a way to tell which file (script, specifically) executed a command?

I'm running Slackware 13.37, and I was wondering if there was a way to tell which script executed a command. I tracked the process and its arguments, but I would like to know where the command ...
2
votes
2answers
444 views

Need for thread_info structure in Linux 2.6 Kernel

Prior to the Linux 2.6 kernel, struct task_struct was present at the end of the kernel stack of each process. There was no thread_info struct concept. But in Linux 2.6 kernel, instead of task_struct ...
28
votes
5answers
21k views

How to determine which process is creating a file?

Given file path, how can I determine which process creates it (and/or reads/writes to it)?
3
votes
1answer
812 views

Solution to get data from memory of a process

If I'm using Firefox and filling out a big form (with lots of text to write), and for some reason I accidentally press F5 and all my text in the forms is lost, I can use e.g. HxD on Windows to ...
1
vote
1answer
2k views

Can you specify a separate trap in a subshell created with ()?

I'm writing a script that starts a subshell to go off and do some work. In a special case, the script needs to tell the subshell to cleanly stop what it's doing and exit early. However, my ...
3
votes
2answers
2k views

How to list only non-<defunct> processes?

Is there a combination of command-line options for ps or pgrep or some other relatively direct way to determine if a particular process name is actually running (available for normal use).. By ...
15
votes
5answers
5k views

Process Monitor equivalent for Linux?

Is there a Unix/Linux equivalent of Process Monitor, whether GUI or CUI? If it makes a difference, I'm looking at Ubuntu, but if there's an equivalent for other systems (Mac, other Linux variants ...
5
votes
3answers
4k views

How to check how long a process ran after it finished?

Currently I'm using the following to check how long a process is actually running: ps -eo uid,pid,etime | egrep '^ *MY_ID' | egrep 'PID_OF_PROCESS' And that outputs the following: MY_ID ...
16
votes
1answer
5k 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 ...
2
votes
3answers
520 views

process that only root can run

I have created a process and it is running in the background as a daemon it.Now I want that only root should be able to view the output of that process.My process is something like "top" which ...
18
votes
1answer
7k views

How to tell if a running program is 64-bit in Linux?

In Mac OS X, I could use the Activity Monitor program to see if a running program/process is 64-bit. How do I do that in a Linux OS, regardless of flavour?
1
vote
1answer
435 views

Queries about top command

top command shows the process cpu utilization, and it when we sum the cpu utilization of all the processes then it goes greater than 100%. And how can it shows the cpu utilization of each process( ...
4
votes
1answer
2k views

Disable random memory address generation in my programs

I'm reading "The art of exploitation" and would like to try some experiments, including reading from and writing to various memory address. I've created some simple programs and trying to overwrite ...
4
votes
1answer
2k views

I don't want other users see my processes in ps aux. I have root. It's Debian. How to use grsec?

I installed 'linux-patch-grsecurity2' and it has some sort of interface. ~$ sudo gradm2 gradm 2.1.14 grsecurity administration program Usage: gradm [option] ... Examples: gradm -P ...
3
votes
2answers
302 views

Monitoring process activities using system calls only (without utilities like `top`)

I want to obtain information about memory used by different users and different processes which users are running and statistics about those processes like memory consumption, execution speed, etc., ...
1
vote
1answer
595 views

What is the size of the TaskList?

While reading through the Linux Kernel Development by Robert Love, I went through the following line : The kernel stores the list of processes in a circular doubly linked list called the task ...
6
votes
2answers
2k views

Dump process core without killing the process

Is there a way to get a core dump (or something similar) for a process without actually killing the processes? I have a multithreaded python process running on an embedded system. And I want to be ...