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

learn more… | top users | synonyms (1)

6
votes
1answer
88 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
37 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! ...
56
votes
6answers
186k 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
21 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 ...
0
votes
1answer
13 views

UFW app based filtering

is there any filtering in ufw which works sort-of like win firewall? basically allowing me not only to create ip/port/proto based rules, but also to bind such limitations to specific executables ...
1
vote
0answers
29 views

Theoric: How to kill a forever forking process?

Let's say you have a process that forks every time it has the chance. It launches itself in niceness -20, so it forks faster than you can kill it. Also, it remembers its childrens and it parents, so ...
0
votes
0answers
14 views

hadoop as init.d Process - status_of_proc return process not found

I was trying to use the init.d script to control hadoop service. The start and stop commands work without any issue. However status_of_proc does not find the process and its returning service is not ...
1
vote
0answers
44 views

What happens if dbus connection fails?

I am trying to find a root cause for server hung. I found that a process crashed with process id 14900 and the following are the log in message. No core dump is saved as it is not related to any ...
0
votes
1answer
24 views

What could be the cause for going to uniterruptable deep sleep state for this particular make process?

I am trying to understand 'D' state correctly. In my case, the following process went to 'D' state: make -f freac/CMakeFiles/freac_objs.dir/build.make freac/CMakeFiles/freac_objs.dir/build It is ...
11
votes
2answers
3k views

How to stop xargs from badly merging output from multiple processes?

I'm using xargs with the option --max-args=0 (alternatively -P 0). However, the output of the processes is merged into the stdout stream without regard for proper line separation. So I'll often end ...
0
votes
2answers
193 views

Why do some processes end with the letter “d”? [duplicate]

Some Linux binaries end with a "d", for example sshd, httpd, ppd, etc. Why is this so?
6
votes
2answers
306 views

What to do when “nice” isn't good enough (FreeBSD)

I've been using x265 to encode some video on my workstation lately, but I have a problem: even though I launch it using nice -n 20 x265 to deprioritize it, it still slows the computer to a crawl while ...
2
votes
2answers
2k views

High Idle CPU / Low CPU Load average

After removing APC (alternative php cache), I noticed that there are less pagination access and less dirty pages but in the same time: High idle CPU Very low CPU load (relatively to the time before ...
1
vote
1answer
28 views

Starting isolated namespace inside network namespace

I've managed to create two network namespaces (ns1 and ns2) and connect them via veth connection. They can ping each other fine, and even ssh one into another (provided I started sshd). What I would ...
2
votes
1answer
139 views

Does pkill kill itself (and its parent processes) last?

I'm writing a bash script that kills a bunch of processes selected by certain criteria and then quits. The only problem is that those criteria apply to the script and its parent processes (bash, sshd) ...
7
votes
4answers
127 views

How do I determine if a program is running when I start a shell and start that program if it is not already running?

When I start a shell, in my case bash and/or zsh, what lines do I need to add to .zshrc and/or .bashrc to check to see if a program is already running, and if the program is not already running, start ...
2
votes
1answer
32 views

Why is tee process still running?

# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 13880 4016 ? Ss 20:40 0:00 /bin/bash root 9646 0.0 0.0 4312 360 ? ...
64
votes
5answers
16k 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 ...
1
vote
2answers
26 views

How to use top in a shell script to track memory consumption of a process?

I was wondering if there was a way to use top or another program to track the memory consumption of a script I will be running. I was using runtime.totalMemory - runtime.freeMemory But that'...
0
votes
0answers
18 views

Find the process creating junk in my home folder [duplicate]

Some process keeps creating a folder called \~ in my home folder every time my computer boots up (and some other times, too) and it's really getting on my nerves. I guess this misconfigured app knows ...
0
votes
0answers
10 views

TCP/UDP socket in order to put on hold processes

I'm working on some bash scripts which will solve "The dining philosophers problem", in order to do so I created two scripts, run.sh and philosopher.sh . In run.sh I run n instances of philosopher.sh ...
1
vote
1answer
341 views

How to get UID and PID

So here's what I want to do: User inputs a USERNAME. Based on this username, I need to get the list of processes started by this user. I am planning to do this by getting the UID of this user and ...
17
votes
4answers
9k views

nohup vs. Screen

In the past, I've used nohup to run big background jobs, but I've noticed that a lot of people use screen in this context. Does screen provide some kind of functional advantage that I am unaware of, ...
1
vote
1answer
56 views

Why i couldn't kill the NOHUP process?

So in order to keep my simple blog running permanently, i used the nohup command: nohup python manage.py runserver 0.0.0.0:8000 Everything worked perfectly, my blog keep running even though i ...
0
votes
1answer
32 views

can't find running process which I started via SSH yesterday

Yesterday I connected to my Developer VM Debian Linux via SSH. I started "Mamute" which is a open source stackoverflow clone etc. As I restarted my machine today I reconnected as root and wanted to ...
3
votes
1answer
65 views

How to tell whether a process is network I/O intensive or not in user mode in Linux?

I am currently writing a program in Linux which needs to tell whether a specific process is network I/O intensive or not at runtime. I have tried some tools such as iotop and iftop, but none of them ...
0
votes
0answers
23 views

How to find the subroutine associated with a particular daemon process

I have a daemon process running on my shell and I know its process ID and the location where it is running etc which i obtained by ps -ef command. I want to get the script of that particular process ...
5
votes
3answers
4k views

Why pidof and pgrep are behaving differently?

I have a init script in /etc/init.d/myservice for initialize a service like this: ... start() { ... daemon /usr/sbin/myservice ... } stop() { ... pgrep myservice pidof myservice ps -ef ...
1
vote
2answers
62 views

How to make sure that a child process of a supervisor job dies when I kill supervisor

My app is a jar file that requires some environment variables. I have all the environment variables in one file, which looks like this: export VAR=value export VAR2=value2 #....etc My supervisor ...
1
vote
1answer
27 views

Disable OS-level caching

I want to be able to prevent the OS from caching in memory either: A particular file, or Any file a particular process accesses (i.e. by specifying a pid) Either would be helpful since I don't ...
2
votes
0answers
38 views

Read another processes memory using ptrace() in C/CPP [RaspberryPi]

So, initially, process A created a file containing data (37 Bytes) read from a stream(UART). Process B has to acquire that data, which is stored in /dev/shm. Process A has an absolute maximum of 4ms ...
1
vote
0answers
15 views

WCHAN = 0 for a sleeping task?

I am a little confused about the status of a process I have. It looks like this: $ ps -eal | head -n 1 ; ps -eal | grep perf F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 4 S ...
3
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
37 views

Point and click Ubuntu 16.04 bash script randomly alternates output behavior

I wrote and tested the following point and click Ubuntu 16.04 bash script for the purpose of completely killing a mono-service RecorderManager.exe process by literally killing the process id returned ...
1
vote
1answer
28 views

FTDI Driver for Custom PID and VID

I have changed VID and PID of my ftdi board to 0001 and 0002. Now the com is not showing and the device is showing in unknown device. How can make a customize driver for it to get com port. Sorry ...
38
votes
8answers
13k views

Block network access of a process?

Is it possible to block the (outgoing) network access of a single process?
1
vote
0answers
30 views

Reopen xchat after it has been closed to the system tray

When I close xchat to the system tray, it is leaving IRC connections to servers and consequent channels open and the process running. However, when the program is reopened from the system tray, it ...
3
votes
1answer
33 views

Process name post killing

I am getting OOM error and killed process error in logs. In the logs, I can see the process ID which has been killed by kernel but not able to find out which process is actually been killed. Can we ...
4
votes
1answer
40 views

how to reliably determine processes using files after `umount -l` on linux

The Question After umount -l was performed on some mounted filesystem, and this filesystem remains still mounted (albeit hidden) because of some process maintaining (at least) one open file handle to ...
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 ...
3
votes
1answer
20 views

Start new process group in .xinitrc

I have a statusbar (lemonbar) to which I pipe the output of a couple of scripts (time, battery, volume, etc.). These scripts, and the statusbar itself, are all started in a single bash script ...
0
votes
1answer
27 views

How to execute scripts in a parent-child behavior in bash?

Suppose I have two scripts named parent.sh and child.sh. The parent.sh script contains bash child.sh line and the child.sh script contains echo "This is the child script". Now, if the user executes ...
10
votes
3answers
798 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
29 views

Cinnamon: Which software project “owns” the “Display” configuration dialog?

Cinnamon 2.8.8 64-bit, Linux Mint 17.3 'Rosa' Menu > Preferences > Display The dialog allows to enable and disable (multiple) monitors, and position them relative to each other with drag and drop. ...
0
votes
1answer
31 views

Return owner of process given PID

I'm trying to grab the owner of a process from a list, I have the command pidof nmap to get the then ps -u <PID> | grep USER that I'm currently playing around with, but when I run it, it ends ...
8
votes
2answers
1k views

How to find tty from which a particular cmd “scp” is executed

How can I find out who executed a particular command and which terminal was used to run it? Original: How can I know particular cmd is executed by whom and to know about my terminal