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

learn more… | top users | synonyms (1)

6
votes
2answers
327 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 ...
3
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
30 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
392 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
131 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
34 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
33 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
11 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
393 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
72 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
37 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
72 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
24 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
108 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
37 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
47 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
18 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 ...
1
vote
1answer
42 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
39 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 ...
39
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
35 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
47 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
21 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
34 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
822 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
35 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
33 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
1
vote
2answers
36 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
34 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 ...
3
votes
2answers
8k views

How do you make a cross-process locking in Linux (C/C++)?

I need to make sure one process executes only in one instance at a time. On Windows you could use named mutex. But I have no idea what to use on Linux. I think I've seen an approach were app creates ...
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
840 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
43 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
40 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 ...
8
votes
3answers
97k views

How can I see what processes are running?

I use Ubuntu Server 10.10 and I would like to see what processes are running. I know that PostgreSQL is running on my machine but I can not see it with the top or ps commands, so I assume that they ...
3
votes
2answers
386 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 ...
3
votes
2answers
270 views

Why can the waitpid system call only be used with child processes?

The man page wait(2) states that the waitpid system call returns the ECHILD error if the specified process is not a child of the calling process. Why is this? Would waiting on a non-child process ...
0
votes
2answers
4k views

`ps | grep | kill` aborts my script prematurely [duplicate]

I have a Linux computer that I remotely SSH into using plink on a Windows XP machine. I have a Plink program set to execute commands in a script using automated login: plink -ssh [domain name] -l [...
1
vote
2answers
47 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
1answer
803 views

Check for process already running in webfaction?

I use Django framework on webfaction and have 5 different cron jobs. One of them lasts much longer than others and sometimes gets stuck (30-120 seconds or more). I have already set that cron job to ...
2
votes
0answers
46 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. ...
4
votes
3answers
8k views

Why is apache2 showing up a defunct in the process list?

When I run top I see one line that doesn't look too good: 2475 www-data 20 0 0 0 0 Z 1 0.0 0:00.19 apache2 <defunct> Why is this process <defunct> and what should I ...
6
votes
1answer
377 views

Unkillable apache2 processes

After upgrading from debian lenny to squeeze (apache2 2.2.16-6+squeeze4 and php 5.3.10-1~dotdeb.1), my apache processes started to exit with segmentation fault. It happens every 5-30 minutes (for 1 ...
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 ...
1
vote
1answer
104 views

Systemcrash suexec forkbomb.sh ulimits

I got this script named fork.sh: #!/bin/sh forkbomb() { forkbomb | forkbomb & } ; forkbomb If I call it through suexec my whole system will consume 99% cpu. To prevent a normal bash forkbomb I ...