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

learn more… | top users | synonyms (1)

1
vote
0answers
10 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 ...
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! ...
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
28 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 ...
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 ...
2
votes
1answer
116 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) ...
3
votes
1answer
32 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 ...
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 ? ...
1
vote
2answers
25 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 ...
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
64 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
22 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 ...
1
vote
0answers
43 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 ...
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 ...
1
vote
2answers
59 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 ...
2
votes
0answers
37 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
14 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 ...
7
votes
4answers
126 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 ...
1
vote
1answer
35 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
26 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 ...
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 ...
4
votes
1answer
39 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 ...
3
votes
1answer
32 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 ...
3
votes
1answer
19 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
26 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 ...
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 ...
1
vote
2answers
31 views

Getting the original command invocation from /proc/self

I'm trying to run some startup code in all procesess via the dynamic linker. The code should do stuff based on the zeroth argument of the process. I'm getting the arguments from /proc/self/cmdline (...
2
votes
2answers
28 views

ptrace suid binaries after privilege is dropped

I understand that we probably cannot do ptrace on suid binaries. However, I'm wondering why we cannot do ptrace after the binary drops its previlege to uid instead of euid. For example, in the binary ...
2
votes
2answers
25 views

Status of a threads vs. status of a process

Do all threads of a specific process share the same status (D, R, S, ...) or may there be differences among these threads? If so, where in /proc do I find information about the status of a certain ...
14
votes
2answers
828 views

Colored output?

When I execute a command from a terminal that prints coloured output (such as ls or gcc), the coloured output is printed. From my understanding, the process is actually outputting ANSI escape codes, ...
1
vote
1answer
42 views

How to show a list of processes from a group?

I want a simple command to list all the processes and its information from a given PGID.
0
votes
1answer
32 views

How to manipulate a file descriptor in another process? [duplicate]

Is there any way to manipulate (read, write, etc..) a file descriptor for any app which can be found in the path /proc/{pid}/fd? Especially for sockets. $ ll /proc/4229/fd total 0 lrwx------. 1 ...
3
votes
2answers
316 views

How do I kill all processes except PID 1?

I want to kill all processes on a system except for PID 1. I am currently using pgrep -l . | awk "{if (\$1 != 1) print \$1}" | xargs -n 1 kill -s INT. awk is used to exclude the process with PID 1 ...
1
vote
2answers
41 views

Test whether a process left any orphans behind

I don't need to wait for them, I just need a yes or no. I'm executing a program that I know is going to fork (and the children are likely to fork too). If run correctly, it should take care of all ...
2
votes
0answers
44 views

How to get the executed command of a process which has completed successfully using the PID?

I have small script, abc.ksh that takes 3 parameter e.g abc.ksh ${a} ${b} ${c} I will read from a config file with 'n' no of entires and I will execute abc.ksh 'n' times in parallel using a for loop. ...
0
votes
0answers
38 views

How do we programatically tell if our bash script was succesful in starting or stopping mono-service -l:${LOCK_FILE} ./${PROGRAM_NAME}.exe?

I am running Ubuntu Linux 16.10 on an Ubuntu ThinkStation desktop. I used a bash script just now to restart and stop mono-service on our second Ubuntu Linux 16.04 desktop computer in the following ...
0
votes
1answer
25 views

nonsudo kill processes matching string

I am trying to write a command that will kill all processes matching a string. I have permissions to execute kill -9 but when I try to do pkill -f string I get operation not permitted. Here is what ...
9
votes
3answers
266 views

Set-uid executable and resulting process user

In Ubuntu 14.04, the passwd executable is -rwsr-xr-x 1 root root 47032 gen 27 01:50 /usr/bin/passwd and the ping executable is -rwsr-xr-x 1 root root 44168 mag 7 2014 /bin/ping so (for both) ...
2
votes
2answers
62 views

When opening a terminal does not require a login?

Speaking about Linux and in particular Ubuntu (from 14.04) systems: Case 1 - As pointed out in this answer, processes that allocate a pseudo-terminal don't need to make a login: for example, cups. ...
3
votes
1answer
20 views

Changing the current working directory of a certain process

Can I change the current working directory of a certain process? For example, I am running a process that has the pid 1000. Right now, its current working directory is ~. I want to change its current ...
1
vote
1answer
31 views

Command substitution. Spawned process name is identical to the parent one

This script $ cat csub.sh #!/bin/bash while true; do sleep 5 AVAR=$(date; sleep 2) done when started, makes a process appear in the ps output: ps -eLf|egrep '[c]sub.sh|PID' UID PID ...
0
votes
1answer
34 views

Multithreading (increasing the number of threads for the process)

I wonder if there is any way of adding thread to specific process just to prove that number of thread which are assigned to process can be changed by user. If so, how could I do that ? [root@195689 ...
1
vote
1answer
258 views

Why should I not use 'kill -9' / SIGKILL

Posting this question because I was surprised to not find it directly answered; apologies if this is a duplicate - I did look! I have heard that kill -9 or kill -SIGKILL is bad, but I don't ...
1
vote
2answers
38 views

What is the meaning of Tasks and Running in htop screen?

On my computer it shows Tasks 314; 24 running What do these numbers mean? Is 1 Task = 1 process? Why isn't the number of running tasks = number of CPUs then? (I have more than 24 CPUs) edit. ...
3
votes
1answer
63 views

How to identify & kill runaway processes that runs, exits, then runs again?

Question How can I identify a program caught in an endless loop; where it runs, dies, then runs again? How can I kill it and prevent it from starting again - is reinstalling the package the only way? ...