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

learn more… | top users | synonyms (1)

5
votes
3answers
2k views

How to track the number of processes and forks per user?

I need to figure out how many forks are done and how many concurrent processes are run by each user over time. It does not look like this information is tracked by my distribution. I know how to ...
5
votes
1answer
785 views

Launch independent process [duplicate]

Possible Duplicate: How can I close a terminal without killing the command running in it? If I open a terminal emulator, type firefox & and then close the terminal, the process it ...
5
votes
2answers
1k views

Number of running processes show in top

The usual maximum number that I have seen in the "running" field displayed in top(1) is the number of logical CPUs installed in the system. However, I have observed that under Ubuntu 10.04 (not ...
5
votes
2answers
560 views

Processes do not respond to my signals

I have a strange behavior on my system. When I invoke a command in the shell (bash version 4.2.45(1)-release), say top or cat, the running program (the process) does not respond to Ctrl+C. I even ...
5
votes
2answers
3k views

How to identify a process which has no pid?

I have a process which listen to 2 ports : 45136/tcp and 37208/udp (actually I assume it is the same process). But netstat doesn't return any pid : netstat -antlp | grep 45136 tcp 0 0 ...
5
votes
4answers
7k views

Running multiple nohup commands in background

Got two commands cmd1 and cmd2. Of the two, cmd2 takes longer to finish. Need to run cmd2 and then cmd1. Tried to run them in following way: bash$ (nohup ./cmd2>result2 &) && nohup ...
5
votes
1answer
321 views

Get CPU usage for single process

I've got a problem getting a real-time CPU usage of a single process (by its PID). I'd like to setup a watchdog for the CPU usage of a process because it's suddenly reaching 100% of the CPU usage ...
5
votes
2answers
803 views

Turning off swapping for only one process with cgroups?

I would like to turn off swapping for only one process. Swap should work as usual for the other processes. How I can implement this with cgroups?
5
votes
1answer
4k views

Elegantly get list of children processes

I would like to get a list of all the processes whose parent is $pid. This is the simplest way I've come up with: pstree -p $pid | tr "\n" " " |sed "s/[^0-9]/ /g" |sed "s/\s\s*/ /g" Is there any ...
5
votes
2answers
1k views

What is “automatic stack expansion”?

getrlimit(2) has the following definition in the man pages: RLIMIT_AS The maximum size of the process's virtual memory (address space) in bytes. This limit affects calls to brk(2), mmap(2) and ...
5
votes
1answer
193 views

Can I add to my groups in the current (shell) process? [duplicate]

If I add myself to a group, it applies only to newly launched processes. Actually it's more restricted than that; it seems to apply only to new logins. I'm not sure what the exact mechanism is, but ...
5
votes
1answer
1k views

Getting disk i/o statistics for single process in Linux

I need to monitor the I/O statistics of a process that writes to disk. The purpose is to avoid write rates too high for long periods. I know there's iostat tool to accomplish this task on a ...
5
votes
2answers
1k 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 ...
5
votes
1answer
116 views

Is the Unix process scheduler itself a process?

Is the Unix process scheduler itself a process, or does it piggyback on other processes in the same way a system call does (running kernel code in the user process with the kernel bit set)?
5
votes
1answer
69 views

How disk IO priority is related with process priority?

I'm running software that overloads disk IO sometimes. I don't need fast response from that software, I need fast response from other applications, so I could set low process priority for that. I want ...
5
votes
1answer
7k views

bash: Run command in background and capture pid [duplicate]

Am writing a bash 4.1 script... Would like run another script (or internal function) in the background... And capture the pid of that background job in a variable in the foreground script... If the ...
5
votes
2answers
7k 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 ...
5
votes
1answer
191 views

How to monitor all executions of an executable over a time period

I know how to monitor a process. Commands like top and so forth can monitor the CPU time and memory usage for a given process instance. But say I expect a given executable to be run several times in ...
5
votes
3answers
7k views

when does the system send a SIGTERM to a process?

My server program received a SIGTERM and stopped (with exit code 0). I am surprised by this, as I am pretty sure that there was plenty of memory for it. Under what conditions does linux (busybox) send ...
5
votes
2answers
88 views

How can I see i/o stats for a briefly running process?

For long running processes like init, I can do things like $ cat /proc/[pid]/io What can I do if I want to see stats for a briefly running process such as a command line utility like ls? I don't ...
5
votes
2answers
458 views

Set process exclusivity in Linux

I am trying to measure the performance of a process. I have widely ranging performance measurements on small bit of single-threaded deterministic code that should perform the same every time. I would ...
5
votes
2answers
3k views

Write inside a socket open by another process in Linux

Is it possible on Linux for a process to write inside a socket open by another one? Let's say I open a connection to google.com using netcat: myuser@linux:~$ nc google.com 80 Now I can lookup for ...
5
votes
1answer
535 views

How can I search/browse in some process's memory?

I'm using MacOS X 10.7 and I'm not very familiar with unix. Is there a command for a search in some process's memory for a string?
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 ...
5
votes
1answer
208 views

How to monitor top applications using CPU (and IO if possible) in a graph?

I need to find what and when these applications used so much CPU (and IO if possible too). This should be in a graphic timeline like we see in GNOME System Monitor CPU History. I also want to compare ...
5
votes
2answers
574 views

Suggestions needed to debug why ps -ef gets stuck

A few of my processes consume 100% cpu. I'm trying to figure out which scripts are causing it I tried running strace ps -ef: open("/proc/PID/status", O_RDONLY) = 6 read(6, "Name:\textract\nState:\tR ...
5
votes
2answers
2k views

Hide processes from other users based on groups (under Linux)?

Is it possible to configure process hiding for certain user groups under a linux system? For example: Users from group X should not see processes owned by users from group Y in ps/top or under /proc. ...
5
votes
2answers
2k views

Detailed Per-Process Profiling

I am looking for a way to profile a single process including time spent for CPU, I/O, memory usage over time and optionally system calls. I already know callgrind offering some basic profiling ...
5
votes
2answers
731 views

What is the need of the struct thread_info in locating struct task_struct?

While reading through the Linux Device Drivers, I could understand that the Process Descriptor (of type struct task_struct) has all the info regarding a particular task. The process descriptors are ...
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 ...
4
votes
2answers
436 views

Force change of a user's cwd as root

I'm looking to change a user's process such that I can set it's cwd. Related, and secondary to the question, I have a filesystem I want to unmount but a user is sitting on it with a bash process. I ...
4
votes
2answers
3k views

Slow down a process without affecting other processes

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

How do I get a mapping of Pid to Port?

I have a process which I need to run on a specific port. I have started some other process on that port and I need to kill it. Unfortunately, I don't remember the name/pid of the other process so I ...
4
votes
2answers
6k views

How to pkill by “command name”?

So I'm executing a command like: COMMANDNAME -PARAMETERS But..why can't I kill it with "pkill"? I'm trying with: pkill -9 "COMMANDNAME -PARAMETERS" but it doesn't kills the "COMMANDNAME ...
4
votes
3answers
8k views

Fix “firefox is already running” issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line: kill ...
4
votes
3answers
2k views

What happens to suspended jobs in unix?

We can issue CTRL+Z to suspend any jobs in Unix and then later on bring them back to life using fg or bg. I want to understand what happens to those jobs that are suspended like this ? Are they ...
4
votes
3answers
3k 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 ...
4
votes
3answers
277 views

What call before a fork?

A long while ago I went to a job interview with a thoroughly weird company in London who claimed to be expert Unix consultants. Anyway these people were complete nutters and not surprisingly the ...
4
votes
4answers
8k views

Check for Process if Same is Running

Is there a script or a way in linux that when I try to execute a shell script/process, if the same is running, it will prompt that same is running and will exit otherwise it will continue.
4
votes
4answers
212 views

Single instance of script, but only with same arguments

I have this beautiful little code here that will exit from a script if there's another instance of it running: single_instance(){ if pidof -x "${0##*/}" -o %PPID >/dev/null; then exit ...
4
votes
3answers
9k views

Terminating a bash shell script running in the background

I often use bash shell scripts to run simple commands for many different files. For example, suppose that I have the following bash shell script, called script.sh, that runs the program/command foo ...
4
votes
4answers
216 views

“Virtual” shell, ie. jailing an user inside a process after the (SSH) login

The title might not say much about the issue at hand so let me get straight to the point. Let's assume I have a casual user who can log in to the system via SSH into a bash shell. I also have a PHP ...
4
votes
3answers
696 views

What is a subshell (in the context of the documentation of make)?

I'm reading a book about the make command and there is a paragraph: If any of the prerequisites has an associated rule, make attempts to update those first. Next, the target file is considered. ...
4
votes
4answers
466 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, ...
4
votes
3answers
2k views

Possible to get SMS/text message notification when process ends/is killed?

There are scripts that will send an e-mail when a server process is finished. However, I do not want to check my email every so often just to see whether a job has finished. Therefore I'd like to get ...
4
votes
2answers
240 views

Is grandchild process also child process?

In Unix/Linux terminology, do child processes of a process include grandchild processes of the process?
4
votes
3answers
9k views

Kill only one Java process

I usually run few Java applications, one for server running locally and other for some IDE like NetBeans. And from time to time, after lots of redeployments, my server get stuck on ...
4
votes
2answers
1k views

Using top to see processes run by a user on behalf of sudo

If I run top -u username I will see all the processes by a particular user. Is there a way to also see all the processes that the user called via sudo?
4
votes
3answers
223 views

how to determine how many times pid_max wrapped?

Is it even possible to know that? may be some kind of tests are required to be performed in order to find that information? My system, just after I login, seem to have already wrapped the max_pid, so ...
4
votes
2answers
223 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 ...