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

learn more… | top users | synonyms (1)

3
votes
3answers
172 views

How to restart (or reset) a running process in linux

I have two Linux systems communicating over sockets (Desktop and ARM-based development board). I want to restart (or reset) my client application (running on a development board) when server sends a ...
3
votes
1answer
49 views

what does it mean 'fork()' will copy address space of original process

I'm studying 'operation system concepts' on my own and I'm studying the chp3. process part. There is an example where the 'fork()' function is called and depending of the returned pid value like the ...
5
votes
1answer
4k views

Is it possible to get process group ID from /proc?

In "http://stackoverflow.com/questions/13038143/how-to-get-pids-in-one-process-group-in-linux-os" I see all answers mentioning ps and none mentioning /proc. "ps" seems to be not very portable ...
0
votes
2answers
55 views

Why do some processes end with the letter “d”? [duplicate]

Some Linux binaries end with a "d", for example sshd, httpd, ppd, etc. Why is this so?
1
vote
0answers
30 views

How do I automatically kill the process and restart it to use the updated package? [closed]

Suppose a process is using a package, and I update it in the midst. How do I create a trigger in Linux that automatically kills the process and restarts it to use the updated package
1
vote
0answers
27 views

If processes can't modify their parent's environment, what is MC doing?

As far as I know, a process cannot modify its parent's environment. However, when I run mc (GNU's Midnight Commander, a curses-based file manager) and then quit it, I end up with another $PWD: ...
3
votes
4answers
105 views

How do I get the value of a named option of an already running process in Linux?

I run the following command. ps -e -o args | grep destiny | grep UNIX I receive the following output. /path/to/destiny -r -m UNIX -t TCP -p 1501 What command can I use the get the value of the ...
5
votes
1answer
66 views

How to enable random PIDs on Linux?

I'm currently comparing random PID implementation on OpenBSD, FreeBSD and Linux from security perspective. As long as OpenBSD and FreeBSD are concerned, my work is done. However, while the answer ...
1
vote
1answer
141 views

Can a script be running even after it's been killed?

I know it sounds so stupid, and I know it IS stupid; but I ran a Unix script to send me and my friend emails every few seconds to test mailx. The stupid thing is I used $ while true; do blah blah ...
3
votes
3answers
348 views

How do I know if acct is running? (The Unix system accounting)

I have installed the acct package and it is running because I can see file activity in the log file. I know there is the command accton on to turn it on, but how do I determine that its running short ...
2
votes
1answer
440 views

Does jps lie? If not, what else is this?

I am running dockerized hadoop cdh 4.6.0 with supervisor . I have opened the docker container and tried the following two commands. Got confused a lot. jps 103 -- process information unavailable ...
14
votes
3answers
1k 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 ...
5
votes
3answers
363 views

How do Linux permissions work when a process is running as a specific group?

This is something I haven't been able to find much info on so any help would be appreciated. My understanding is thus. Take the following file: -rw-r----- 1 root adm 69524 May 21 17:31 ...
1
vote
0answers
27 views

Is there any considerations I should take when running untrusted apps as non-root user?

I have to use an application I don't trust (unstable) and I will run it as a non-privileged user so if something bad happens the damage would be limited to the home folder of that user. I removed ...
3
votes
1answer
34 views

Get all files open for writing with pid, recursively

Given a pid, I can get all the files open for writing something like: lsof -p 28827 | awk '$4 ~ "[wW]"{print $(NF-1), $NF}' One of those ends up being a pipe: 28827 232611 pipe I want to look-up ...
20
votes
3answers
21k 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?
-2
votes
1answer
94 views

How are zombie processes handled when the parent dies?

Which technique does the Unix system use to remove zombie processes whose parent has terminated?
4
votes
4answers
265 views

Are the states of processes which are ready and scheduled to wait “S”?

In the output of top, the state S means interruptible sleep. What is the state of those processes which are scheduled to be ready and waiting for execution in CPU by the scheduler? Is it S or ...
3
votes
4answers
144 views

How to get the PID of a sub process across to the parent process in a bash shell script?

My shell script is as following: #!/bin/bash ./process1 #It will create a sub process: sub_process1 while [ condition ]; do break done kill -9 process1 and sub_process1 In my script, it will ...
0
votes
2answers
29 views

Is there a need to get rid of a zombie process? [duplicate]

I read somewhere (forgot where) that a zombie process continues to consume the process table entry (concretely the process identifier or PID), and causes a resource leak. Is it correct that a zombie ...
0
votes
2answers
1k views

How to disable core dump generation in Centos (cPanel Server)?

I want to disable core dump generation, How can I disable it ? One of the website keeps generating core dumps every second and eats up all the disk space. OS Details: CentOs cPanel Server ...
5
votes
2answers
215 views

What are pending signals?

When looking at the limits of a running process, I see Max pending signals 15725 What is this? How can I determine a sensible value for a busy service? Generally, I can't seem to find a ...
4
votes
4answers
196 views

Run multiple commands and kill them as one in bash

I want to run multiple commands (processes) on a single shell. All of them have own continuous output and don't stop. Running them in the background breaks Ctrl-C. I would like to run them as a single ...
2
votes
0answers
30 views

Identify process

Every couple of minutes my Mac OSX machine starts running a process that consumes 10% of the CPU. It runs for a couple of seconds and then stops. I can see the process coming up in 'Top', but the name ...
4
votes
0answers
66 views

Is it possible to make an exec call that “returns”?

Is there a way to make the exec system call work like a function call that returns instead of totally replacing the current process image? My motivation is trying to integrate two shells with ...
1
vote
0answers
48 views

Create tree of processes

I'm implementing pstree as an assignment, and I would like to create test tree of processes, but I'm struggling to do so. I tried to do something like this to create tree of background processes ...
0
votes
1answer
32 views

Killall processes under a user?

So, I know you can pkill -U <uid>, but whenever I've used this, my entire system crashes. Further investigation shows it probably is because I'm not matching anything, so it matches everything? ...
31
votes
1answer
43k views

There are stopped jobs (on bash exit)

I get the message There are stopped jobs. when i try to exit a bash shell sometimes. Here is a reproducible scenario in python 2.x: ctrl+c is handled by the interpreter as an exception. ctrl+z ...
3
votes
3answers
4k views

Cron job to check if PHP script is running, if not then run

I am wondering if someone might point me in the right direction. I've got little experience working with the Linux command line and recently due to various factors in work I've been required to gain ...
0
votes
1answer
509 views

Very large values for utime and stime for foo. Is foo still running?

I am running a program foo It has been running for close to 30 days now (even more) Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
10
votes
2answers
20k views

ps switches to display PID, PPID, PGID, and SID collectively

I tried ps with different kinds of switches e.g. -A, aux, ef, and so forth but I cannot seem to find the right combination of switches that will tell me the Process ID (PID), Parent Process ID (PPID), ...
1
vote
2answers
5k views

How to know if a background job is finished?

I invoke a script (do_something) in background via another script (do_manythings) as below. nohup do_something & How would I know in the parent script (do_manythings) that the job invoked ...
1
vote
4answers
200 views

How to set the process won't be terminated when the terminal stops

[Edit] Make it simple. I invoked java xxx... on Machine A using putty to connect from Machine B. However I cannot reach Machine B. How can I connect Machine A from Machine C to set the running ...
0
votes
1answer
44 views

How to resume a process from an SSH connection?

At work, I have lot's of interactive scripts running that I would like to access them later on from home. If I do Ctrl+Z to them and then bg, then I am able to use them from home using the fg command. ...
14
votes
4answers
8k views

How to kill a process with a single command?

I want to kill a process, after finding the id in a single step. I currently use these two commands: pidof <name> kill <#number_which_is_result_of_command> How can I write a single ...
1
vote
1answer
35 views

setpgrp causes tty gone

When using setpgrp vi (and other tty programs) work completely different than if setpgrp is not used. Example: perl -MIPC::Open3 -e '$pid= open3("<&STDIN", ">&STDOUT", ...
6
votes
1answer
7k 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 ...
0
votes
3answers
33 views

processes started in this session

I've opened a terminal session and started some processes with &. When I tried closing the terminal window, it warned me that there were still jobs running in the background. I can see the ...
2
votes
1answer
6k views

How to check which process is using most memory

When I check free in one of Prod server it showing 70% of memory is being used: total used free shared buffers cached Mem: 164923172 141171860 23751312 ...
0
votes
1answer
71 views

Portable way to kill a process listening on a given port

Is there a way to kill a process listening on a given port (e.g. in bash lsof -t -i tcp:8000 | xargs kill) from a shell script that will also work on cygwin, as well as bash?
1
vote
1answer
66 views

How to start (or find) a process with RUID different from EUID?

Inspired by one of the previously answered questions, I tried executing a program by a user who was not its owner -- and the process's RUID and EUID remained the same. (Unless I read the answer wrong ...
0
votes
1answer
38 views

What is Dynamic interleave for process in Linux?

I have read through the source defined in /source/mm/mempolicy.c. Starting at line 1178: /* Do dynamic interleaving for a process */ static unsigned interleave_nodes(struct mempolicy *policy) { ...
18
votes
7answers
8k views

Is there a way to limit the amount of memory a particular process can use in Unix?

I need to test a process for memory management. I do not have the source, so I need to do all the testing from the OS side. I want to be able to say something like limitmemory 400k -p <pid> ...
4
votes
1answer
65 views

CPU usage of file system operations not shown in top

I run the following command (which does ls for 10,000 times) in a Ubuntu Linux terminal and use the top command to monitor the CPU usage. While top shows the total CPU usage (line 2) is about 48% ...
1
vote
2answers
202 views

Spawn multiple processes with a single command

Is there a way to create say 10 instances of a process (for example yes) with a single command? $instantiate 10 yes
1
vote
0answers
191 views

Why does my redhat 5.11 system have so many ext4-dio-unwrit processes?

I have a redhat 5.11 system running, and it looks like there are 32 of these processes. What are they, and why are there so many of them?
4
votes
2answers
76 views

How to kill a bunch of jobs based on ps output?

Here is output from ps: $ ps aux | grep blob ubuntu 4286 0.0 0.1 34748 9592 ? S Jan14 0:00 /usr/bin/python /usr/local/bin/pynt start_blob_reader ubuntu 4287 0.0 0.1 34748 ...
1
vote
1answer
40 views

process id and command

I want to write the process id and command of all processes with some name and from some user (for example root and init). What should I do? ps -f -u root -C init or ps -f -U root -C init ...
2
votes
2answers
34 views

Replace screen process from within screen

I have configured my shell to exec screen when it starts, unless it's already running within a screen session. So in a TTY, the process tree will look like something like this: ...
7
votes
5answers
5k views

How do I start a process with a nice value of -20 and not give it root privilege?

I would like to start a process with a nice value of -20. This requires me to use a command like - sudo nice -n -20 matlab. However, this starts matlab as root too. Is there a way to have matlab as ...