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

learn more… | top users | synonyms (1)

2
votes
1answer
141 views

Why does a “child” process finish before its parent?

This is the code example given: # include <stdio.h> # include <unistd.h> void main() { static char *mesg[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; int display(char ...
3
votes
3answers
366 views

How to create a process tree?

I have some code that kills processes and their children/grandchildren. I want to test this code. Currently I'm doing $ watch date > date.txt, which creates a process with a child. Is there any ...
7
votes
3answers
127 views

How to view summaric memory usage of groups of commands (instead of processes)

Is there a way to group similar processes when using tools like top/htop? Sometimes I just want to know whats eating my memory and some programs (browsers mostly) are using multiple processes, which ...
1
vote
0answers
31 views

Cannot terminate for loop in terminal

I was running a for loop in terminal which has a sox command in it. For some reason the sox command failed and now I cannot terminate the for loop. I tried pressing Ctrl+c many times, Ctrl+z many ...
4
votes
3answers
138 views

Show network connections of a process

There is a way to show the connections of a process? Something like that: show PID in which show is a command to do this, and PID is the pid of the process. The output that I want is composed by ...
1
vote
4answers
333 views

Disabling column names in ps output

How to format output of ps -p command? To not show me something like this: PID TTY TIME CMD but just PIDs. I'm using Linux.
1
vote
0answers
16 views

How to stop a program that is not showing up using monit?

I have a set of raspberry running raspbian. On each of these, I have configured monit to monitor the epiphany browser, which should always show up with a specific web site. Unfortunatly, some times ...
1
vote
2answers
136 views

Shell's process group ID = foreground job's process group ID?

I decisively conclude that Shell's process group ID = foreground job process group ID from the 2 sources below. When a background job is selected to run in the foreground, is it the shell's process ...
2
votes
3answers
62 views

Processes group (session) of GUI processes

According to what I know, the shell and its child processes are in the same session which have the same (controlling) terminal. I read that they are interactive processes because they have the same ...
1
vote
0answers
11 views

Definitions arguments of daemon and server

Somehow, I feel clear about definitions of daemon and server after learn a little bit about X11. So, I would like to have verification to my definitions as below. Daemon is a process that is not ...
1
vote
1answer
56 views

How do I get the pid of the exact progarm launched

So I have a couple python programs say program A and program B, when using "pgrep python" to get the pid, it gives me the pid of both program A and program B. However, I am writing a program that need ...
2
votes
2answers
95 views

When does a process terminate in UNIX?

At which moment a process in Unix is terminated? Is it necessary a command such as exit(0) or return 0 to be written in a program to terminate a process? My question is provoked by the following code: ...
2
votes
1answer
47 views

Add fixed PID value to the process

I need to set PID number of my process to fixed value, because I need to kill it with my application when some conditions are met, is it possible to do that?
1
vote
1answer
92 views

Unable to kill process, even with root. How to diagnose?

There are a lot of bash processes running on my Ubuntu Linux (12.04). Even when I close the terminal they are still shown in the System Monitor. I tried killing them as below, but they remain as it ...
4
votes
1answer
83 views

Why does a process of a binary with only execute permission remain hidden in “ps” when using hidepid=2, if the user is not root?

I'm using hidepid=2 to mount /proc, so users can't see any but their own processes. A particular binary I want to use has been restricted to rwx--x--x permissions, so only its owner (root) can read it ...
1
vote
0answers
41 views

Threads vs. Processes [closed]

What is more recommended when developing an application, which for example has to do: receive characters from UART port, parsing GSM data, website update. Is it better to distribute/split tasks to a ...
1
vote
2answers
116 views

How to start the killed java process with its PID?

How to start the killed java process with its PID in Linux?
2
votes
1answer
40 views

What is the difference between opening an application from terminal Vs directly opening it?

I could open Firefox browser either by clicking FF icon on desktop or by running ~/firefox/firefox & in the terminal. What are the differences in these two ways of running? I am wondering because ...
15
votes
1answer
2k views

Why is the maximum PID in a 64-bit Linux system 2^22?

Why not 2^62, or 2^31 or anything else? What is the maximum value of the PID of a process?
0
votes
0answers
51 views

Per-process monitoring in cacti

I've read in some question that you are performing a per-process cpu/memory monitoring with cacti. Could you point a how-to I can use to get the same? Many thanks in advance.
2
votes
3answers
107 views

How to find out the process(es) that forks a lot?

Recently I got an load-too-high issue on our server. I watched top for like half an hour to find out that it was Nagios that forked a lot of short-lived processes. After bouncing Nagios, everything ...
3
votes
1answer
61 views

Can I exec an entirely new process without an executable file?

Suppose my non-root 32-bit app runs on a 64-bit system, all filesystems of which are mounted as read-only. The app creates an image of a 64-bit ELF in memory. But due to read-only filesystems it can't ...
1
vote
3answers
59 views

Strange behavior with bg command

How to send process (application) to background if it always expects input on terminal and sending received data from uart to stdout all the time? I cannot send my app to background with CTRL+Z & ...
1
vote
1answer
58 views

How to run command in foreground then send to background

I need to run my application in foreground of linux terminal, send some commands to my program and then send program to background. I'm not really sure how to do that?
1
vote
1answer
44 views

List of killed apps

Is there a command to list latest killed processes? Or to search through log file for killed app, for example called "my_app"?
1
vote
3answers
164 views

Set Parent Process ID from ShellScript, kill all Child Processes later

I want to write a shell script for my Ubuntu machine, that starts a few server applications. I need this script in order to execute it from my java application. But I need an easy way to group all ...
1
vote
1answer
62 views

Figure out the PID of exact node.js application

Here is an output of my ps aux: ps aux | grep "node" root 2501 0.0 3.4 720400 68512 ? Sl 16:09 0:03 node /etc/skbx/host/skbx.js 8081 tula13 8082 8084 8085 10.8.0.6 root 20586 ...
2
votes
0answers
48 views

When waiting on a pagefault, in what kind of sleep is a task?

Are tasks put into interruptible/uninterruptible/killable sleep when waiting on a pagefault? Does it matter, what kind of pagefault is it?
0
votes
1answer
56 views

Haveged service won't run (dead pid)

So my system entropy is low on my centos 6 VM. (137) and I installed haveged, Yum install haveged But when I go to start the process it instantly dies: Process is dead but sub system is locked ...
3
votes
2answers
158 views

Finding Process Info Associated to a Given Port in HP-UX

I need to find information for a process that's using a given port number, such as 8080. More specifically, I'm interested in finding out the full path of the program. How can I do that in HP-UX?
0
votes
1answer
159 views

nginx stop is not working and nginx is creating new process after killing processes

nginx version: nginx/1.8.0 I am trying to stop nginx with the following command /etc/init.d/nginx stop, however it is not returning any successful message. Then I tried to view the nginx processes ...
0
votes
0answers
19 views

most minimum processes required to have Linux that functions properly [duplicate]

If I want to have Linux that functions properly for a user, are the most minimum processes required are init/systemd, terminal emulator and shell?
1
vote
1answer
43 views

My compiled program is being run via init.d but eventually gets killed

I made a small utility application in C that monitors udev for power events and adjusts my laptop backlight brightness automatically. (I'm running Ubuntu 15.04) I ran the following commands and it ...
2
votes
0answers
39 views

Detect which program is blocked by firewall

The linux firewall can show a lot of information in the LOG target, for example via --log-uid. How can the executable doing the network call be logged, too? I did not find anything in the FAQ, the ...
0
votes
1answer
130 views

List process by name excluding grep [duplicate]

I am trying to list all the ffmpeg processes that are currently running on Debian machine (Ubuntu 15). I use the following command: ps aux | grep 'ffmpeg' If only one ffmpeg process is running, I ...
3
votes
2answers
46 views

Alternating a long running task to pause/run to reduce cpu

I have large file I need to mv and even with nice -n19 it seems to affect the server performance. I think an option would be to run the process in "chunks" whereby I run the command for a few ...
11
votes
3answers
2k views

Make a process unkillable on Linux

I'm working on a password manager application, and for security reasons I want to launch an unkillable process. And besides I don't want this program to be a daemon since I need to read from standard ...
2
votes
2answers
119 views

Why do multiple instances of Mate-terminal have the same PID?

I've noticed, that all mate-terminal instances I start, be it inside a mate-terminal or via a link button, have the same PID. For example, I got something like $ wmctrl -lp <omitted lines that ...
6
votes
3answers
625 views

How does getpid work?

The getpid system call returns the process id of the invoking process. How does the kernel figure out which process is invoking the system call ?
4
votes
1answer
159 views

Shared library mappings in /proc/pid/maps

Why does /proc/pid/maps contain a few records for the same library ? Here is an example: 7fae7db9f000-7fae7dc8f000 r-xp 00000000 08:05 536861 ...
0
votes
1answer
46 views

How to run bunch of hierarchical dummy shell processes (process of another process, etc.)?

I would like to run multiple processes where each process is running another one, so it will create a long process branch. I've tried: $ bash -c '(bash -c "sleep 20"); sleep 20' & $ pstree ...
10
votes
2answers
671 views

How does a shell execute a program?

If I compile a program using gcc, and try to execute it from the bash shell, what is the exact sequence of steps followed by bash to execute it ? I know fork(), execve(), loader, dynamic linker (and ...
1
vote
1answer
73 views

Outputting PID of Rails server(s) with ps aux | grep - breaks when put into an alias?

I'm trying to create an alias for an unwieldy command I'm using to output the PID and some other information about two rails servers I have running. When I simply run the command in terminal (over ...
0
votes
2answers
40 views

Which tool can be used to configure the CPU priority of a process?

I know that you can use nice to re assign priorities of processes but which tool can be used to configure the CPU priority of a process ?
4
votes
1answer
286 views

What is /proc/<pid>/net/dev?

I'm interested in per-process network I/O counters, like those in /proc/net/dev and found what I thought was it under /proc/<pid>, i.e. /proc/<pid>/net/dev. But it seems that was too easy ...
1
vote
1answer
122 views

Memory usage of a given process (using Linux proc filesystem)

I want to know which files from /proc directory and which fields of these files I need to calculate the memory usage of a given pid. I've been using the "stat" file and the "vsize" parameter that is ...
1
vote
1answer
92 views

Allow a single process to access a file

If I am the owner of a file, then is there a way I can give another process (running under another user that doesn't have read/write permission to that file) permission to access it? I want only that ...
0
votes
1answer
61 views

Are blocked and blocked/suspend processes put into the same queue?

In a 7-state process model (new, ready, blocked, running, blocked/suspend, blocked/ready, exit), are processes in the blocked and blocked/suspend states for each event that processes are blocked on ...
5
votes
4answers
132 views

How do see the memory used by a program in ubuntu?

How can I see the raw memory data used by an application ? Like , suppose I have a file name something.sh . Now I run the command ./something.sh , and then I want see all the data its accessing in ram ...
1
vote
1answer
44 views

What module in the kernel that inform the DHCP client to start DHCP negotiation?

DHCP client is a process instead of kernel code. How the DHCP client know when to start sending DHCP discover message? Is it the IP module in the kernel that inform the DHCP client?