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

learn more… | top users | synonyms (1)

11
votes
2answers
799 views

Why can't I kill a SIGSTOP'd process with a SIGTERM?

I am using Debian stretch (systemd). I was running the rsyslog daemon in foreground using /usr/sbin/rsyslogd -n and I did a ctrl+z to stop it. The state of the process changed to Tl (stopped, ...
10
votes
1answer
602 views

How can I track executables created by my user on Linux?

Using Linux, I would like to track the executables that are executed in my name, including the whole command line (in practice, every exec*() done as my own user). A program I do not control is ...
4
votes
1answer
164 views

How to sort ps output to find processes realtime priority and identify processess currently occupied running queue

How to properly identify real-time processes currently occupied CPU queue and count them using ps? I know there is a bunch of fileds like prio,rtprio,pri,nice but do not know correct to use. It seems ...
3
votes
2answers
61 views

Hide arguments of commands in ps

I run an application on a linux server, and when I run the application I supply the password as a command line, like this: ./myapplication --smtp-password mypassword In our application, we didn't ...
1
vote
1answer
25 views

bash kill process by call

I am using bash to start several instances of one python program, like this: python example.py -id $i where $i is the id given to the instance. All the processes are started on the same user, and ...
5
votes
2answers
101 views

Suspend process without killing it

So I've got a persistent program running in the background. Killing it just causes it to restart with a different PID. I'd like to suspend it (put it to sleep without actually killing it). Does kill -...
0
votes
0answers
303 views

Serial port locked by ModemMana, gmain or gdbus [duplicate]

I have an issue with trying to open a USB device's serial port with pyserial. It seems that as fast as I connect the device, /dev/ttyACM0 is used by some random process. ModemMana 851 root 8u ...
11
votes
2answers
427 views

Is there a way for shell script to know which program has executed it?

In *nix world, is there a way for shell script to have information about which program has executed it? Example: /path/to/script1 /path/to/script_xyz in this imaginary scenario, script_xyz would ...
1
vote
1answer
36 views

Avoid running multiple programs [closed]

Some programs, eg. firefox, allows to have multiple instances. Though, this is useful in some cases (eg. new xterm instance), I usually end up having enormous number. Is it possible to configure ...
3
votes
0answers
35 views

How to determine how much time a process is blocked waiting for networking (socket) activity?

We are having issues with high load (top and uptime) but high CPU idle. Usually, that means high IO wait but that's also low. I believe IO wait typically does not include time a process is blocked ...
-1
votes
0answers
17 views

posix_spawn taking too much time to spawn a new python program from c++ [closed]

I'm facing a problem where when I invoke my python program from c++ using posix_spawn it takes around 70ms-200ms based on how long main program was running. Is there anyway I can reduce this time, as ...
5
votes
3answers
48k views

How to find which Process is causing High CPU usage

Is there any way to find out from terminal which process is causing high CPU Usage ? It would also be useful to order processes in descending order of cpu Usage
0
votes
3answers
30 views

how can I supply negative value to nice() and run without error even if I am not the superuser

how can I supply negative value to nice() and run without error even if I am not the superuser can I do system("su"); nice(-1); it is asking for password which I do not want?
65
votes
6answers
17k views

Why do we need to fork to create new processes?

In Unix whenever we want to create a new process, we fork the current process, creating a new child process which is exactly the same as the parent process; then we do an exec system call to replace ...
0
votes
0answers
25 views

Not owner error in AIX(unix) while getting pgid between processes

I confront a problem while porting my python program in AIX. The problem seems on ownership or permission between processes. Let's assume that there are two processes(process1, process2). The ...
0
votes
0answers
8 views

Process Family Tree: list_for_each() [migrated]

I'm reading about Process Management in Robert Love's Linux Kernel Development. He's writing about how one can use the following code to iterate over a process's children struct task_struct *...
0
votes
0answers
13 views

Logging all processes which initiated and quitted [duplicate]

When a program is initiating, it will appear when running the command sudo ps aux. After that a program has quitted, it will NOT appear when running the command sudo ps aux. How do I log/record all ...
0
votes
1answer
28 views

Order of signals: SIGPOLL and SIGCHLD

I spawn a child process and connect to it with a pipe. I configure the pipe to send SIGPOLL on data available by fcntl I_SETSIG. The child sends some data over the pipe and then terminates. Can I ...
14
votes
5answers
15k views

How to send keystrokes (F5) from terminal to a process?

I'm using an Raspberry Pi in combination with Chromium (kiosk mode) to show up some stats. The Pi doesn't have an connected keyboard so I searched for a solution to send keystrokes from the terminal ...
1
vote
1answer
16 views

Check which display an application is using

The machine I'm working from has many active X displays (one standard X server and many VNC displays). It is also running a handful of GUI applications, which appear on an X display. Assuming I have ...
13
votes
2answers
462 views

How should I check whether a given PID is running?

I'm writing a Perl script that parses logfiles to collect PIDs and then checks whether that PID is running. I am trying to think of the best way to make that check. Obviously, I could do something ...
2
votes
2answers
234 views

Dropping a process into the background

If I have started a process, and it spends more time than I anticipated, and I regret not having said rm foo & rather than rm foo, can I do something to drop it into the background?
0
votes
2answers
36 views

How to show processes that use more than 30% CPU?

I need to display processes that use more than 30% CPU via command top. How can I do it?
0
votes
3answers
203 views

Check for process and kill if running

I am trying to find if a process is running or not, and if it is runing then I want to call a script or print something. I tried with the below few ways, but it gives me syntax error or command not ...
18
votes
4answers
17k views

Why is SIGINT not propagated to child process when sent to its parent process?

Given a shell process (e.g. sh) and its child process (e.g. cat), how can I simulate the behavior of Ctrl+C using the shell's process ID? This is what I've tried: Running sh and then cat: [user@...
22
votes
10answers
47k views

Kill many instances of a running process with one command

This is one of the questions that has troubled me often. Suppose I have thousand or more instances of any process(for e.g. say the process vi) running. How do I kill them all in one single shot/one ...
1
vote
1answer
30 views

How can I find duplicate processes on FreeBSD?

I suspect that there is some replicate (many instances) process that is overloading the CPU of my FreeBSD 10.3 (pfSense v2.3) computer, but I don't know what its name could be. The process is ...
3
votes
2answers
101 views

How can I start several processes with a single command?

I use pianobar player. But before launching it I need to run tor and polipo. Both are continuous (are running until interrupted). Basically what I'm looking for is a single command which would spawn ...
0
votes
0answers
20 views

Log notifications sent by process and its descendant

I have a process which creates a lot of processes, I know that processes can send notifications using /run/systemd/notify (systemd-notify). Is there any way that I can launch processes and log all the ...
0
votes
1answer
37 views

Why are processes stuck in system calls (sometimes) unkillable? [duplicate]

I recently had a problem with a c program I wrote. According to ps it was stuck in a system call, even kill -9 didn't change anything about it. Even a restart didn't work, it was stuck forever in ...
2
votes
0answers
28 views

How to renice all threads and child processes on Linux?

Linux does not follow the POSIX.1 standard which says that a renice on a process affects "all system scope threads in the process", because according to the pthreads(7) doc "threads do not share a ...
2
votes
1answer
46 views

Understanding controlling terminal

I started a java program that simply enters an infinite loop from a unix terminal (let's say terminal window tw1) I opened up a second terminal window (say tw2) and executed ps -ef | grep java command ...
0
votes
1answer
1k views

Maltego stuck in Loading Modules

I'm using Kali Linux 2016 on Vmware 12 player. I'm trying to run maltego(first time) and it's stuck on loading modules. any suggestions?
0
votes
1answer
13 views

What is the threshold for top to label a process as idle

With the top command I can toggle, whether to list idle processes or not. What is the CPU usage limit for a process to show up as idle or non-idle?
2
votes
1answer
34 views

How to set per process disk quota?

I want to set disk quota (limit maximum space used in the file system) that a particular process can use under Linux. There seems to be plenty ways to limit disk quota for a user, but not at a per ...
4
votes
2answers
1k views

how to find out the full path of the command from the result of lsof -i

lsof is a great utility, just now started using it. lsof -i | grep smtp => this give the following result. httpd.pl 212548 global 3u IPv4 893092369 0t0 TCP server07.host...blah.....
1
vote
1answer
1k 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 ...
2
votes
1answer
4k views

Apache cannot fork: cannot allocate memory

I am running apache on Fedora with mod_perl. The server forks a process to send an email frequently - and the fork exits. Suddenly, I got: Cannot fork: Cannot allocate memory. There was plenty of ...
0
votes
0answers
20 views

Sub process keyboard input layer

I have a bash script where I set up a stream playlist by user interaction. The user then press p to play the selection. This simply do something like: media-player --playlist media-player defaults ...
4
votes
4answers
16k views

What is the difference between ps and top command?

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?
0
votes
2answers
41 views

Why is ulimit -u higher than /proc/sys/kernel/pid_max?

On my system ulimit -u reports 63172 and /proc/sys/kernel/pid_max reports 32768. Why is it that the value for ulimit -u is higher than the kernel's value? From my understanding, ulimit -u shows the ...
3
votes
1answer
5k views

Understanding the difference between pid_max, ulimit -u and thread_max

I am trying to understand the Linux processes. I have confusion on the terms pid_max, ulimit -u and thread_max. What exactly is the difference between these terms? Can someone clarify me the ...
6
votes
1answer
94 views

What does '?' represent under TTY

If you run ps in your terminal, you may see something like the following: What is ?? I'm ssh'ing into a Linux server, so I assume that it's just the sshd as it says under CMD, but I'm curious what ...
3
votes
1answer
52 views

filter out certain processes and/or pids in ftrace?

I'm not sure if I'm thinking about this the right way (and please correct me if I'm wrong), but the following is my understanding of ftrace. In /sys/kernel/debug/tracing, there are the following ...
4
votes
3answers
2k 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 ...
1
vote
1answer
19 views

What is the equivalent of pstop on OSX?

Is there an equivalent of pstop in OSX? How is pstop different to kill?
1
vote
2answers
31 views

VIM: function that checks if external program is running

Using a vim function, I would like to check if a program is running using pgrep, and if it is not running then do something. In particular, I want to achieve something like this: function! ...
64
votes
6answers
196k views

How to stop a background process?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to stop its process, then start it again. How can I stop it? I haven't close its shell window. ...
1
vote
1answer
34 views

pkill not killing processes past immediate descendants of a process

I want to kill a chain of process e.g. PID PPID 100 XXX 101 100 102 101 When I use pkill -P 100 PID 100 and 101 die as expected, but 102 is given init as it's PPID. How can I force pkill to ...