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

learn more… | top users | synonyms (1)

0
votes
1answer
761 views

Are lock, mutex, and semaphore for between threads or between processes?

I think lock, mutex, semaphore are used for synchronized multiple (threads or processes?) to access something simultaneously. Must this "something" be some shared memory between multiple (threads or ...
3
votes
3answers
218 views

New parent process when the parent process dies

In UNIX, when a parent process disappears, I thought that all child processes reset init as their parent. Is this not correct all the time? Are there any exceptions?
5
votes
1answer
328 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 ...
6
votes
2answers
3k 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) ...
0
votes
2answers
41 views

moving a process to fg and bg [duplicate]

Suppose I run a process in the background likw ./script &, I can bring it to foreground by running fg. However, is there a way to move it back to background without stopping it (as in ctrl+z) or ...
0
votes
1answer
377 views

Restarting process via cron every 12 hours

I'm not familiar with cron at all, and I've looked it up and am still confused as to how specifically it works. I'm on CentOS 6.5, and I need to end a process and then start it again every 12 hours. ...
0
votes
1answer
90 views

Emacs windows, frames, server and clients: threads or processes?

From http://www.gnu.org/software/emacs/tour/ Emacs server Some people like to keep only a single instance of Emacs open and edit all their files in there. Doing this has a few advantages: ...
79
votes
6answers
49k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
1
vote
2answers
83 views

Remove unneeded file lock in script

I have some script using flock executable. It works well. Problem is when this script calls another script, and it creates background process. In this situation background process inherits file locked ...
3
votes
1answer
10k views

How to find Heap memory of a running process? [duplicate]

I would like to know how to find the heap memory of a process that is running in the background. Is there any command that allows such?
1
vote
1answer
319 views

List of killed processes HP-UX

Is there a file similar to the one in this answer http://unix.stackexchange.com/a/10078/5027 to determine the processes which were killed, in a certain time, for example, yesterday, in HP-UX?
1
vote
2answers
70 views

Call background process back to stdout

Is it possible to "call" a background process output to be shown in the terminal? Example: cron starts apt-get to update the system and I want to see the output of apt-get
0
votes
1answer
35 views

How to add a progress bar to cryptsetup luksFormat?

Example command. cryptsetup --hash sha512 -c aes-xts-plain64 --key-size 512 luksFormat /dev/loop0 This can take quite a while for big files / on slow disks. How to add a progress bar?
0
votes
1answer
78 views

What do brackets mean in the output of pstree?

What are the differences between [] and {} and [{}] used to enclose a process in the output of pstree? I guess [] is used for specifying more than one processes. For example, ...
0
votes
0answers
23 views

How do you adjust other user's job priority?

Let's say your coworker started a very intense process and went home. It's occupying most of the CPU resources, and you can't do your stuffs because of it. If it was your own process, you could run ...
0
votes
1answer
55 views

/usr/bin/X :0 -audit process

Hello I am trying to solve some internet problems that I have. It is a university computer and I do not have root access. I want to understand what is this processor, that root has started, and if you ...
4
votes
0answers
122 views

How do I execute in background / return early?

For reference, I'm using phpseclib to control a remote SSH server using the 'root' account. I have to start/stop a java process which is ran in the background. Stopping works fine with killall java ...
3
votes
2answers
4k views

ATOP shows red line vmcom and vmlim. What does it mean?

utility atop shows: ATOP - MyServer 2013/01/07 00:03:57 10 seconds elapsed PRC | sys 2.18s | user 8.33s | #proc 141 | #zombie 0 | #exit 0 | CPU | sys 21% | ...
5
votes
2answers
295 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. ...
1
vote
1answer
111 views

How to kill - softly? [duplicate]

If I want to kill a process as careful and politely as possible, which signals should I use in a kill command, in which order? I would like to give the programm any kind of time to clean up, if it ...
70
votes
2answers
7k views

How does Linux “kill” a process?

It often baffles me that, although I have been working professionally with computers for several decades and Linux for a decade, I actually treat most of the OS' functionality as a black box, not ...
0
votes
1answer
56 views

Loginuid, should be allowed to change or not (mutable or not)?

I am trying to configure the linux kernel. I was confused by Make audit loginuid immutable (AUDIT_LOGINUID_IMMUTABLE) [N/y/?]. The help says: +config AUDIT_LOGINUID_IMMUTABLE + bool "Make ...
3
votes
1answer
79 views

Different between `ulimit -e` and `renice`?

I would like to run a backup script in low CPU and disk I/O. Is there any different between this: #!/bin/bash ulimit -e 19 ionice -c3 -p $$ and this: #!/bin/bash ionice -c3 -p $$ renice -n 19 ...
1
vote
4answers
8k views

Kill all process of users in Ubuntu?

How to kill all process of one user? When I make ps aux I obtain a list of process with several users, and I want to kill all process of user name1 for example! What's a command to do that in Ubuntu? ...
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 ...
16
votes
3answers
11k 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?
0
votes
2answers
101 views

Using /proc/stat for the number of processes running on the system

How does one find out the true number of processes that is running on your system. A number of articles mention using ps in order to count the number of processes. But recently I looked at cat ...
20
votes
5answers
41k 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 ...
2
votes
0answers
43 views

Why are the process priorities not respected?

I was running four jobs in the background with HTCondor. It sets the priority to 10. Then I was compiling something with make -j4 in the foreground (priority 0). However, the HTCondor jobs still got ...
2
votes
1answer
53 views

The current path of a process

Suppose I write a program, which outputs a file under a relative path (as opposed to a full/absolute path) - let's say, the current path. Then I compile it and store the executable under some dir ...
4
votes
1answer
617 views

Maximum memory usable by a 32 bit RHEL 6 system

I have installed a 32 bit RHEL OS on a 64 bit system. From the wiki page of PAE: The Linux kernel includes full PAE mode support starting with version 2.3.23, with Linus Torvalds mentioning ...
16
votes
3answers
25k 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 ...
0
votes
1answer
56 views

Process's father after setpgid(0,0);

I have a process P1 (child of some parent process P0) both in the same process group. P1 somewhere in his code runs: setpgid(0,0); then a new process group is created (where the group leader is P1). ...
2
votes
1answer
67 views

Does this dispatcher produce zombie process?

I have such a dispatcher shell script. while read line do java TestProg $line & done < $tasklist On the zombie process Wikipedia page, it says if a parent fails to call wait, the ...
5
votes
4answers
991 views

chdir(<directory>) doesn't change directory after exiting to shell

I wanted to make a simple C program to change to my project directory. Its content is following: #include <unistd.h> int main(){ chdir("/home/enedil/projects/algo"); return 0; } I ...
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?
5
votes
3answers
36k 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 ...
0
votes
1answer
1k views

long format of ps command in Solaris

Jobs with a long command-line is not printing in Solaris: bash-3.2$ /usr/ucb/ps auxwww | grep ftf | awk '{print $NF}' | head -5 /proj/cmp01/app/btws/cfg/btw /proj/cmp01/app/btws/cfg/btw ...
3
votes
1answer
755 views

What is meant by “Unknown instance” when restarting a service?

I am trying to get vsftpd file server running on Ubuntu 13.10, I'm unable to connect to the server from another network, although this other network is connected to the server's network and ping is ...
1
vote
1answer
43 views

How can I tell why a process is waiting?

I'm trying to run a command on OSX Mavericks and it seems to be hanging. I found out that Control + T is a Unix command to show the status of a foreground job. Pressing it several times over the ...
2
votes
1answer
328 views

Kill any service running at a specific port

I am trying to write a script that kills service running at a specific port. This is my script: a=$(ps ax | grep 4990 | grep java | awk '{print $1}') kill -9 $a It's a java program. This script ...
10
votes
1answer
7k 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 ...
1
vote
3answers
49 views

How can i get the process with the biggest pid?

How can I get the process with the biggest pid using ps?
1
vote
2answers
212 views

Do all Linux processes write EOF to stdout when they are terminating/have finished terminating?

I'm having trouble with sending shutdown -h 0 to a lxc Debian container (i.e. executing this command in the lxc) with with the python pexpect module (in a python script). In this module the user can ...
1
vote
1answer
3k views

Modify 'Soft Limit' of 'Max processes'

I tried ulimit -u 2000 and ulimit -Su 2000 to modify the 'Max processes', and started up my program, but failed. I found file '/proc/pid/limit' is still: Max processes 1024 ...
2
votes
0answers
56 views

Cgroups - memory subsystem

I want to set the memory.limit_in_bytes parameter for a control group and disable OOM, so processes freeze when the limit is reached. But i want to change that limit dynamically, if there is more ...
22
votes
2answers
5k views

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

I want to determine what process has the other end of a unix socket, that was created with socketpair(). I have a program parent which creates a socketpair(AF_UNIX, SOCK_STREAM, 0, fds), and fork()s. ...
0
votes
1answer
102 views

How to determine who started a process? [duplicate]

every few minutes I found this process running root 949062 100 0.0 37204 1488 ? R< 05:14 0:51 /usr/local/cpanel/3rdparty/bin/clamdscan --quiet --no-summary /etc/passwd It's ...
4
votes
1answer
169 views

Launch background processes in one group and later kill them all

The other day I tried writing a script that would kill a PID and all its children processes, but after spending some time on it, I decided it wasn't trustworthy, because sometimes some of the children ...
2
votes
1answer
353 views

Why is the PGID of my child processes not the PID of the parent?

So I keep reading everywhere that this command should terminate all child processes of the parent process: kill -- -$$ Using a negative ID with the kill command references a PGID and from the ...