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

learn more… | top users | synonyms (1)

0
votes
1answer
13 views

'htop' process and threads cpu usage?

I'm observing a multi threaded process in htop in tree view. If I were to strip it just to the problematic part, it looks somewhat like this: CPU% bin/process 100 `- ...
1
vote
1answer
24 views

Process id of a command ran by an user

Consider i am running just some basic command.. ls Now would the above command have a pid, when it was getting executed? If yes, then how can i determine that pid? when i try echo $! right ...
0
votes
0answers
22 views

pkill -P $ID working while kill — -$ID not

I was playing around with creating and killing process groups on linux ( ubuntu ) I am trying to kill a process group and am being driven crazy by the fact that pkill -P $ID works while kill -- -$ID ...
3
votes
1answer
25 views

Retrieve X11 window ID of a just-launched GUI-program

I want to retrieve the X id of GUI programs I launch in background, in order to work on their windows properties. I've been so far using this workaround: myprogram & sleep 1 winID=$(wmctrl -l | ...
4
votes
3answers
336 views

How can I start a process with any name which does nothing?

I want to start a process that does nothing but is still running. Say I start a process called sadhadxk, and when I run pgrep -x "sadhadxk" I will get the PID number back, like any normal process ...
3
votes
2answers
66 views

Sorting the output of `ps`

I am trying to understand why ps does not behave the way I expect it to. From the man pages, the following command should display ppid and lstart, with items sorted by lstart order. However when I run ...
2
votes
1answer
52 views

Find out to which directory a process is writing?

This question is NOT a duplicate of this question Find out current working directory of a running process?, because the writing directory can be different from the working directory. For example, I ...
2
votes
1answer
1k 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 ...
2
votes
2answers
85 views

gracefully terminating processes with killall <processname>

I am using several instances (profiles) of Icedove (Thunderbird) and when I need to close all of them, I use: killall icedove According to man killall, if no signal name is specified, SIGTERM is ...
23
votes
6answers
37k views

Determining what process is bound to a port

I know that using the command: lsof -i TCP (or some variant of parameters with lsof) I can determine which process is bound to a particular port. This is useful say if I'm trying to start ...
1
vote
2answers
22 views

using sudo create another process

I have wrote a shell script names testShell.I run this shell using command: sudo sh testShell Then I use ps -ef|grep testShell|grep -v grep to check the processes created.I find that system ...
0
votes
1answer
45 views

Pipe stdout to command on stdout

If I had a running process like tail -F watch.txt and I wanted to capture the stdout from this running process and pipe it to another command on stdout how could this be done? Here's an example of a ...
1
vote
1answer
22 views

PID in top different from the $$ one?

I have been always running my following job. #!/bin/sh NO_START=1 STEP_SIZE=1 NO_END=100 DATE_STR=$(date +%m%d_%H%M%S) RUN_DIR=./$DATE_STR mkdir $RUN_DIR echo PID = $$. See $RUN_DIR/$$.log for ...
0
votes
1answer
29 views

command “jobs” cannot see the stopped jobs

I have wrote a very simple shell script to practice command "bg" , "fg" and "jobs": #!/bin/bash myvar=1 while [ $myvar -le 100000000 ] do echo $myvar myvar=$(( $myvar + 1 )) done I use ...
1
vote
1answer
81 views

What is JID (job ID) and is it always smaller than PID? [closed]

I don't know what exactly is JID (job ID) and how it is assigned. What is it's relation to PID and how does one number affect the size of the other in any way?
2
votes
1answer
35 views

How to suspend a process for a certain period of time?

I have several running processes which is started by a shell, but I don't want them to run during 08:00am - 20:00pm for each day because they are really bandwidth-consuming, so , I have to suspend ...
1
vote
0answers
34 views

What does the “k” metric mean in the “sa” output?

From man sa: k cpu-time averaged core usage, in 1k units My questions: How is it calculated? What is the significance?
0
votes
1answer
14 views

Mechanism of multiple call for one script in the same time

Maybe this question is stupid Anyway I have the ruby script which is calling from different places in the same time(with defferent options). Is it safely and how this mechanism realized in linux? I ...
0
votes
1answer
13 views

screen manager with VT100/ANSI terminal emulation

If I join with 'screen' to existing sessions, I can get a list of the sessions with C-a " keystroke and switch between them, however I can't find a way to safely leave/detach and keep all the ...
2
votes
1answer
8 views

list processes running inside of screen (manager with with VT100/ANSI terminal emulation)

I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list ...
0
votes
1answer
21 views

CPU time that accton (psacct) records - recorded time relationship between parent and children processes

I've had 'accton' (in package psacct-6.3.2-63.el6_3.3.x86_64) turned on as I want to be able to report on a particular process (so I've written a script that will take the psacct file and get the ...
0
votes
1answer
30 views

Why PPID is different when opening from terminal and when opening by doubleclicking

I am using Linux. When i opened gedit program in gnome-terminal by gedit command it has opened the graphical gedit text editor. then the gedit has PPID bash ...
0
votes
2answers
32 views

Creating background process and communicating with it

1st thing off, I am really a Linux newbie - knowing just some basics; there's a great chance I didn't know what I need to look for, please redirect me if you know a good source. What I'm trying to do ...
11
votes
4answers
9k views

How to see how many context switches a process makes?

I want to see if my process makes a lot of context switches. I also want to see how manpulating task groups affects the number of context switches.
2
votes
1answer
2k views

What is the difference in CPU utilization between 'ps aux' and 'ps -ef'?

I use Ubuntu 12.04.1 Linux. I see a difference between %CPU and C output format of ps command for a process. It is not clearly noted in the ps man page. Man pages says: CODE HEADER ...
74
votes
8answers
32k views

How can I disown a running process and associate it to a new screen shell?

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back. One way I thought of doing that was to transfer its ownership to a screen shell, ...
0
votes
1answer
52 views

How to move a background job from one terminal tab to another? [duplicate]

I have a background job, say jobid 1, in a tab of gnome terminal. Can I move it to a another tab of genome terminal? I understand that the shell process in the first gnome terminal tab is the parent ...
0
votes
0answers
17 views

Why are some processes “killable” by pkill but not killall?

I had over 20 instances of httpd (apache) processes running, so I decided to shutdown these. Normally I use killall, But when I typed killall httpd it just said: No matching processes belonging to ...
0
votes
1answer
26 views

grep for specific process in ps but not the grep command itself [duplicate]

If I want to check if something is running, I do ps aux | grep flamethrower, expecting just to show the processes containing flamethrower in the name. This will always find at least one process, as ...
0
votes
1answer
34 views

Why kernel threads are treated as processes

In output of the ps command like the one below (kthreadd,ksoftirqd,kworker) , i can see that there are some processes that don't have an executable file and i find out that's because they are kernel ...
1
vote
4answers
12k views

Show running processes with file name(s)?

I am using putty to connect my linux server which my sites are in. I can run # ps aux | less to show running processes. But I want to display which files running these processes ? I have also ...
0
votes
3answers
56 views

Find the parent of a process

I am trying to write a script to help with computer security. I am trying to look for open ports, find the PID, and find what called it. I have it working, where my output looks something like this: ...
0
votes
0answers
62 views

System CPU Time and User CPU Time Calculation for a Process in Linux

I want to calculate CPU time consumption of a particular process in system mode and user mode using statistics present in /proc/<PID>. There are two fields utime and stime in ...
2
votes
1answer
31 views

How do I find the resident memory size of a process on busybox?

I run top on busybox and it shows all processes and their virtual memory size. How do I determine how much RAM is being used by each process?
2
votes
1answer
815 views

Why does't stopping the nginx server kill the processes associated with it?

When I stop nginx like this on ubuntu 12.04, I get the following errors: $ sudo service nginx stop Stopping nginx: nginx. $sudo service nginx start Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 ...
2
votes
3answers
38 views

(In)significance of [… ] and tty root processes

A colleague of mine assigned me to perform a root-cause analysis of an enterprise security server sometime ago. We knew the problem resided in one of the processes run by root but did not know which ...
0
votes
1answer
32 views

Issues executing program

Ultimately I'm trying to get a program to run at start up and work correctly. I have been successful in getting it to show up in running processes after a reboot, but it doesn't seem like it is ...
1
vote
2answers
1k views

Discrepancy between reported used memory and sum of application memory usage

I'm running a desktop system that quite regularly suffers from lack of memory, this prompted me to investigate what causes the issue in the first place. Problem is, there's no single process that ...
3
votes
1answer
55 views

Alternative to iotop for non-root user without sudo privileges

I'm looking for an alternative to iotop. Here's my situation: I want to find out if a program is accessing the hard drive a lot while running. iotop requires root/sudo privileges. My account is on ...
3
votes
1answer
43 views

Limit maximum number of concurrent scp processes running on a host

I am facing a problem where I have a fleet of servers which contain a lot of data. Each of the host runs many instances of a specific process p1, which makes several scp connections to other hosts in ...
3
votes
1answer
603 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 ...
2
votes
1answer
243 views

Where is PCB on linux

A PCB is a process control block , this is its definition on Wikipedia Process Control Block (PCB, also called Task Controlling Block,[1] Task Struct, or Switchframe) is a data structure in ...
1
vote
0answers
19 views

process duplication [migrated]

how to create a process at kernel level? As the functions do_fork and copy_process are static we cannot use them, so is there any way we could use their functionalities or do I have to implement ...
4
votes
3answers
5k views

Fork bomb on a Mac?

I just learned about a fork bomb, an interesting type of a denial of service attack. Wikipedia (and a few other places) suggest using :(){ :|:& };: on UNIX machines to fork the process an infine ...
2
votes
3answers
125 views

CPU and Memory usage monitoring for a single process

I need to monitor the CPU and Memory usage for a single process in an AIX server. The program runs 3 times a day. I need to find the way to capture statistics within some time intervals, lets say ...
1
vote
2answers
64 views

How to monitor use of Huge Pages per process

I'm trying to determine which process is using a large number of Huge Pages, but I can't find a simple Linux command (like top) to view the Huge Page usage. The best I could find was $ cat ...
2
votes
1answer
686 views

How to get start time for a defunct process on AIX?

When I run the following commands on AIX: 22:root@SERVER:/root # ps -ef | head -1 UID PID PPID C STIME TTY TIME CMD 22:root@SERVER:/root # ps -ef | grep defunct | head -1 ...
1
vote
1answer
54 views

How to find max parallel execution limit?

is there any limit for parallel execution? if yes, how to find out the maximum limit? I am creating a script which create a string of scripts concatenated by '&' and uses eval to execute them all ...
24
votes
2answers
6k views

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | ...
1
vote
0answers
13 views

How to interpret numerous processes with exact same RAM usage [duplicate]

I have a VM that processes files, parses the information and saves it to a database. I've been monitoring the resource usage and noticed /usr/sbin/console-kit-daemon --no-daemon.. Below you see a ...