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

learn more… | top users | synonyms (1)

1
vote
0answers
12 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
73 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
175 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
59 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
112 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
98 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
50 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
162 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
47 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
90 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
174 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
91 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
61 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
73 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
45 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
213 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
147 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
60 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
92 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
490 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
274 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
52 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
48 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
787 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
54 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 ...
13
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
170 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
810 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
254 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
59 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
3answers
779 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
135 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
44 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 ?
5
votes
1answer
436 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
213 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
130 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
101 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
211 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
63 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?
0
votes
2answers
139 views

defunct process - is it always a child process?

reading on what is a defunct process says that it is a child process which when it terminates/end is not properly handled/killed by its parent. but viewing on the below output servera> ps -ef | ...
1
vote
1answer
41 views

Restrict a process to accessing only a specific directory

How could I run a process dostuff such that it can only access files/folders in the directory somedir?
1
vote
3answers
208 views

What is the output of “du” command during a long copy?

Recently, I launched the cp command to create a backup of a big directory. So, I used a command like this: cp -rv big_directory new_location Because the files are big, it took a long time to ...
1
vote
1answer
44 views

Which process group does my program belong to when started from bash?

If I run a program from bash, then does my program belong to the same process group as the shell, or does it belong to a new process group? As I am making a shell in C, I need to handle the SIGINT ...
0
votes
3answers
116 views

Killing a comet zombie

I have a zombie process that is changing its PID, which is increasing. Is it possible to kill a process with PID greater than N?
1
vote
1answer
146 views

Killing PGIDs but proceses are respawning, how do I make it persistent?

I ran ps aux --forest -j to see parent and child processes. Here is an example: root 3744 3744 3744 0.0 0.2 77084 4160 ? Ss 09:34 0:00 /usr/sbin/cupsd -f lp 3747 3747 ...
1
vote
1answer
91 views

Is it better/preferred to kill all child processes by using PPID or PGID?

I need the ability to kill all child processes running under a particular parent. What would be the better option to do this? Using PPID or PGID? Something like this: pkill -TERM -P Would kill ...
1
vote
2answers
981 views

Why I can not use all the 100% potential of CPU?

I am using my computer clusters to run a MD C program but I can not use full potential of those clusters. But the this node have 16 CPUs and I also only give 15 jobs for those CPUs. But I can not ...
2
votes
0answers
32 views

Restrict a user from viewing other user's processes [duplicate]

Suppose there are two users : user1 & user2. Now we know that if I give top -u user1, I can see only the process respective to user1. But if I do top -u user2, I can see all the process running ...