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

learn more… | top users | synonyms (1)

0
votes
2answers
49 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
33 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
62 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
25 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
83 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
31 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
44 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
35 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
300 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
47 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
45 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
41 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
27 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
35 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
36 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
37 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
42 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 ...
4
votes
2answers
36 views

Is it possible to force a group member to run something allowed by sudoers as himself only?

The sudoers line is %game_servers ALL= NOPASSWD:/usr/bin/renice which allows group members renice any process run by any user without pw, but I'd like to allow group members renice their own ...
0
votes
1answer
19 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
23 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
22 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
59 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
13 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
233 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
54 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
49 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
26 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
39 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
47 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
33 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
32 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
43 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
83 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
21 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
492 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
48 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
34 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
56 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 ...
11
votes
2answers
739 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
41 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
125 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 ...
2
votes
0answers
39 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 ...
1
vote
2answers
92 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 ...
0
votes
1answer
82 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 ...
2
votes
1answer
61 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 ...
4
votes
1answer
82 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 ...
3
votes
1answer
60 views

Monitoring filesystem activity

Say, I have a program, and I want to monitor its filesystem activity (what files/directories are created/modified/deleted etc.) This program may be capable of spawning further processes, and thus, I ...
1
vote
1answer
29 views

killall <processname> throughout the system [closed]

I'm opening two terminal windows. Terminal 1 - I run process1 Terminal 2 - I run process2 I then terminate both process using Ctrl+Z in each window. I type killall -9 process1 in Terminal 2 , ...