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

learn more… | top users | synonyms (1)

0
votes
1answer
19 views

Does “stopped” belong to “blocked” state?

The manpage of ps says PROCESS STATE CODES R running or runnable (on run queue) D uninterruptible sleep (usually IO) S interruptible sleep (waiting for an event to complete) Z ...
2
votes
1answer
147 views

why “ps -ef -u root -U root” also displays user processes?

ps -ef -u root -U root Also displays processes whose user is not root (the current user). Can someone explain me why ? -u : EUID -U : RUID
2
votes
2answers
33 views

cpulimit does not detect Node.JS process

I was able to limit python process to use only 50% CPU with the following cpulimit -l 50 -e python but when I tried to do the same for Node, and it is not able to detect the process at all. Does ...
0
votes
2answers
65 views

Is reparenting from the shell possible?

This question is closely related to How to "correctly" start an application from a shell but tries to tackle a more specific problem. How can I spawn an application from a shell and thereby ...
0
votes
2answers
34 views

Is killing processes created on startup safe?

I've just got a vserver running debian 7 and whenever I start the server and call the top command, there are very many processes that were started automatically on startup. Can I kill them or are ...
1
vote
1answer
19 views

Process status on AIX

I want to get process status on AIX like we get it on Linux from /proc/<PID>/stat, I did not find the status in /proc/<PID>/status file. There was some encrypted text there. Which file ...
0
votes
0answers
17 views

How is user space process/thread controlled by the operating system

I understand this: User code executes in a process/thread context in a process address space, in user mode, and can address only user code/data defined for the process, with no access to privileged ...
2
votes
2answers
52 views

find out the memory allocated for a particular process in ubuntu

Could anyone please tell me how to find out the memory allocated for a particular process in ubuntu?
0
votes
2answers
75 views

How to kill a process running in specific script

I have two script files running simultaneously. I just need to kill the java process running in one script without affecting the java process in the another one.
2
votes
1answer
39 views

Process IDs range

On GNU/Linux system I seen only positive PIDs, but when kernel panic occured I seen info about process with PID=0. What's it? On Minix 3 I seen processes with negative PIDs. Minix is POSIX-compatible ...
1
vote
4answers
72 views

Prevent a second instance of my software from starting

I wrote a service script to run a specific software at boot time. How can I restrict this software so that it does not run manually again? I mean software has to have just one instance in the ...
0
votes
0answers
29 views

How to start Process state

Over and over and also aver again. I saw this picture on operation system text book. But this time, I want to see the codes to understand this picture more tangible. where is codes which their duty ...
0
votes
3answers
89 views

How can I get the pid of a process started this way

#!/bin/bash mkfifo /var/run/out while true do cat /var/run/out | nc -l 8080 > >( while read line do do some stuff done ) done How can I get the pid ...
2
votes
1answer
33 views

where is PCB on linux

PCB is process control black , this is its definitions on Wikipedia Process Control Block (PCB, also called Task Controlling Block,[1] Task Struct, or Switchframe) is a data structure in the ...
1
vote
1answer
69 views

How can I kill child processes with start-stop-daemon?

I'm writing a simple web server using nc and bash. It looks like this: #!/bin/bash rm -f /var/run/streamman/out mkfifo /var/run/streamman/out trap "rm -f /var/run/streamman/out" EXIT while true do ...
1
vote
2answers
42 views

kill xterm process in a bash

I would like to kill the xterm process I started this way in a script: #!/bin/bash echo "#!/bin/bash" > /tmp/test0 grep file | awk '{print "xterm -hold -e echo",$1,"sleep 10" && pid=$!}' ...
6
votes
4answers
358 views

Send SIGINT to child process of shell, simulating CTRL+C (Linux)

Given a shell process (e.g. sh) and it's child process (e.g. cat), how to simulate the behavior of CTRL+C using the shell's process ID? This is what I've tried: Running sh and then cat: ...
0
votes
1answer
64 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
57 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?
4
votes
1answer
53 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 ...
0
votes
2answers
25 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
0answers
6 views

What does the following code do? [migrated]

Including the initial parent process, how many processes are created by the program: #include <stdio.h> #include <unistd.h> int main() { /* fork a child process */ fork(); ...
0
votes
1answer
30 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. ...
1
vote
2answers
41 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 ...
0
votes
1answer
41 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: ...
1
vote
2answers
40 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
2
votes
1answer
53 views

I can't install new packages and can't update and upgrade

I'm trying to install some program on Ubuntu, but when I try it I got the following error.- E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock ...
0
votes
1answer
20 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?
-1
votes
1answer
26 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 ...
4
votes
0answers
66 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 ...
0
votes
1answer
20 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 ...
5
votes
2answers
242 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
58 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 ...
3
votes
1answer
62 views

Process history in Unix/Linux systems

I know that ps -efl shows running processes on *nix systems. I would like to check history of the (past) processes that have been run on a particular machine, preferably with all the information ps ...
0
votes
1answer
28 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
44 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 ...
5
votes
2answers
49 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 ...
0
votes
2answers
39 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 ...
2
votes
0answers
36 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
48 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
102 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 ...
0
votes
1answer
22 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). ...
5
votes
4answers
504 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 ...
3
votes
1answer
73 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
35 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
61 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 ...
12
votes
2answers
754 views

How to find out what process is writing to STDOUT?

I have two instances of a process running. One of them is "frEAkIng oUT!" and printing errors non stop to STDOUT. I want to kill the broken process but I have to make sure I don't terminate the wrong ...
1
vote
3answers
42 views

How can i get the process with the biggest pid?

How can I get the process with the biggest pid using ps?
0
votes
1answer
174 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 ...