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

learn more… | top users | synonyms (1)

5
votes
5answers
4k views

Drop Process Privileges

I have a process that gets started by a damon running as root, now I want to "downgrade" this process's privileges to those of your average user. Is this possible? If yes how? PS: Running unix on a ...
5
votes
3answers
417 views

Determining the particular processor on which a process is running

I have access to an 8-core node of a Linux cluster. When logged in to the node, I can see a list of processors using this command: more /proc/cpuinfo In my 8-core node, the processors are numbered ...
5
votes
4answers
16k views

How do I know what service is running on a particular port in linux?

I am trying to run weblogic server on my linux machine and I am getting the following error : ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to ...
5
votes
2answers
253 views

How to determine what instructions a process is executing?

I know about strace and ltrace, but that only tells me what system calls and library calls a process is executing, respectively. I would like to know exactly what instructions a process is executing. ...
5
votes
1answer
286 views

Return value of a process and comparison of the number

I have a val.py python script that returns a negative number. import sys sys.exit(-1234) When I run this bash script, I get the value $? as return value of 46 (not -1234). Even when I tried to ...
5
votes
2answers
401 views

Portability of file descriptor links

I've always wondered this but never took the time to find out, so I'll do so now - how portable is the usage shown here of either /proc/$$/fd/$N or /dev/fd/$N? I understand POSIX guarantees /dev/null, ...
5
votes
2answers
716 views

Are kernel threads really kernel processes?

I've read in many places that Linux creates a kernel thread for each user thread in a Java VM. (I see the term "kernel thread" used in two different ways: a thread created to do core OS work and a ...
5
votes
3answers
637 views

Is it possible to support multiple processes without support for Virtual memory?

Is it possible to support multiple processes without support for virtual memory? I would like to know more about it if so.
5
votes
2answers
230 views

Processes in Linux

As I understand it, process descriptors are stored in a doubly linked list data structure. But a fork can create multiple children for the same process, so that makes me think that there is a tree ...
5
votes
2answers
10k views

How to list processes locking file?

Using flock, several processes can have a shared lock at the same time, or be waiting to acquire a write lock. How do I get a list of these processes? That is, for a given file X, ideally to find the ...
5
votes
3answers
31k 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 ...
5
votes
1answer
470 views

will the same pid be used after getting killed?

I had a file opened using vim editor. It was in a ssh session and since I had been idle for a long time, the session got closed and I had to establish the connection again. I opened the file again ...
5
votes
2answers
353 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
1answer
3k views

What does <defunct> mean in the output of ps?

I had issued the ps -ef|grep java command and this is one of the entries that I got : subhrcho 875 803 0 Jan23 pts/5 00:02:27 [java] <defunct> What is <defunct> implying here ? ...
5
votes
1answer
358 views

root owned program with setuid bit on

Ping is a a program owned by root with the user id bit set. $ ls -l `which ping` -rwsr-xr-x 1 root root 35752 Nov 4 2011 /bin/ping As I understand it, if a user runs the ping process, then the ...
5
votes
1answer
1k views

The meaning of output of pmap

I wrote main.c in Linux: int main() { while (1){} } When I compile and start it, I can pmap it: # pmap 28578 28578: ./a.out 0000000000400000 4K r-x-- /root/a.out 0000000000600000 4K ...
5
votes
2answers
540 views

Does linux kill heavy and long running background processes after they reach some threshold?

If I start a really heavy (memory/cpu intensive) running really long running process will the OS terminate it after a period of time arbitrarily? I.e. are there any limits beyond which the OS would ...
5
votes
3answers
575 views

Can I pipe any two processes to each other?

In this page from The Design and Implementation of the 4.4BSD Operating System, it is said that: A major difference between pipes and sockets is that pipes require a common parent process to set ...
5
votes
3answers
292 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 ...
5
votes
3answers
1k views

How to poll existence of a background script correctly

I have a problem with the following kind of script: #!/bin/sh long_running_script.sh & while [ `pidof long_running_script.sh` ] do echo "." sleep 1 done The sript will ...
5
votes
2answers
2k views

Preventing program from using internet

Is there a way to block certain programs from being able to connect to the internet in Debian (a firewall blocking outgoing connections), so for example, to block a windows program running in wine ...
5
votes
2answers
2k views

How do I tell a script to wait for a process to start accepting requests on a port?

I need a command that will wait for a process to start accepting requests on a specific port. Is there something in linux that does that? while (checkAlive -host localhost -port 13000 == false) ...
5
votes
2answers
526 views

Obtaining PID of command earlier in Pipeline

I'm writing a bash script to use inotifywait to monitor a directory and kick off actions when changes are detected. Something like: inotifywait -m ... | while read f; do something; done Since ...
5
votes
3answers
458 views

Using `kill -s 0 $pid` vs `[[ -e /proc/$pid ]]` to detect if PID is running

One of the idioms often used to check if process is running is to use kill -s 0 $pid. My question is, does it have any upsides over using [[ -e /proc/$pid ]] construct? The script I'm writing is ...
5
votes
4answers
198 views

Best practices for job/process tracking and multi-tasking

I run 10+ different commands from 10+ different directories, and I need a better process to track everything. I do a lot of debugging, and often times I need to work on multiple issues in parallel. I ...
5
votes
3answers
328 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
2answers
5k views

How to see complete list of processes in top

When I do 'top', I learn that there are many processes running out of which many are in sleep state. I need to see complete snapshot of all processes at that point. the 'top' is able to show listing ...
5
votes
3answers
1k views

killing processes automatically

I need to kill all processs in a certain shell excluding certain processes. Like sh which is my shell. And the comand. This is what currently in my shell right now. rcihp146 :/home/msingh2> ps ...
5
votes
2answers
153 views

Why does process substitution result in a file called /dev/fd/63 which is a pipe?

I am trying to understand named pipes in the context of this particular example. I type <(ls -l) in my terminal and get the output as, bash: /dev/fd/63: Permission denied. If I type cat <(ls ...
5
votes
1answer
83 views

Why does `bash -c somecommand` sometimes not leave a bash process?

On an Ubuntu 12.04, with GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu), I tried the following command: $ bash -c 'pstree -s $$' init───sshd───sshd───sshd───bash───pstree $ bash -c 'pstree ...
5
votes
2answers
215 views

Why do forked processes sometimes appear with brackets [] around their name in ps? [duplicate]

On a Linux system a C process is started on boot, which creates a fork of itself. It is not a kernal process or something. In most cases a ps -ef show both processes as expecxted, but sometimes it ...
5
votes
2answers
683 views

Get the PID of file creation

I am writing a bash script that creates 5 files with the extension ".P" and write a line of "something" into them. "P" represents a number and it's the PID of the process that creates the file. How ...
5
votes
2answers
221 views

Is there a way to really prioritize processes or make Linux respect their priorities?

I know there are process priorities like in other operating systems, going from -20 (most prio) to 19 (less prio) but Linux seems to ignore them. Right now I was building the kernel in the background ...
5
votes
5answers
421 views

Is a persistent zombie process sign of a bug?

(OS: Debian variant.) Having a process with zombie-status. The PPid belonged to a gvim process. The contents of /proc/[pid]/wchan is do_exit, /comm is sh and /cmdline is empty, /status is shown ...
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
3k views

Stuck process: is it a bad sign?

Sometimes a few process are in a stuck state. For example: PID COMMAND %CPU TIME #TH #WQ #POR #MREGS RPRVT RSHRD RSIZE VPRVT VSIZE PGRP PPID STATE 99357 plugin-container ...
5
votes
1answer
689 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

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 ...
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
347 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
619 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
3k 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
1answer
170 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
98 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
27 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
2answers
63 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
3answers
1k views

Silently start task in background

I know that you can use this to start a process in the background, without getting the notification when the process is put in the background and when it is done like so: (command &) &> /dev/null ...