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

learn more… | top users | synonyms (1)

-1
votes
3answers
32 views

Output of processes and specific users with adding some text

I have tried to output processes for specific user but with adding some text. I can do like it is described in this answer How to see process created by specific user in Unix/linux but I don't know ...
0
votes
0answers
22 views

High CPU usage after Version Upgrade

Not sure if is related to the version upgrade but since I have updated my Raspberry to Linux version 4.1.13+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG ...
62
votes
4answers
15k 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 ...
3
votes
2answers
197 views

Content of /proc/<PID>/cmdline file depends on script shebang?

I have a bash script named test.sh which I start with startproc. In case I use #!/usr/bin/env bash shebang in test.sh, the /proc/<PID>/cmdline file looks following: SERVER:~ # cat ...
2
votes
1answer
219 views

iotop showing 1.5 MB/s of disk write, but all programs have 0.00 B/s

I don't understand iotop output: it shows ~1.5 MB/s of disk write (top right), but all programs have 0.00 B/s. Why? The video was taken as I was deleting the content of a folder with a few millions ...
21
votes
6answers
8k views

Can ps display only non kernel processes on Linux?

How can I ask ps to display only user processes and not kernel threads? See this question to see what I mean...
17
votes
2answers
4k views

Why does process substitution result in a file called /dev/fd/63 which is a pipe?

I am trying to understand named pipes in the context of this particular example. I type <(ls -l) in my terminal and get the output as, bash: /dev/fd/63: Permission denied. If I type cat <(ls ...
7
votes
2answers
9k views

Is it possible to get process group ID from /proc?

In "http://stackoverflow.com/questions/13038143/how-to-get-pids-in-one-process-group-in-linux-os" I see all answers mentioning ps and none mentioning /proc. "ps" seems to be not very portable ...
0
votes
2answers
109 views

Shell script to kill processes except those owned by user

I am Looking for some help in creating a script to kill processes, but return an error message if they are owned by root. Firstly I would like to say that I am a total beginner at this. At the moment ...
9
votes
1answer
6k views

Real time processes scheduling in Linux

I have been learning some scheduling concepts. Currently my understanding so far is as below. There are real time processes and non real time processes. Non real time processes can have nice values ...
0
votes
3answers
230 views

How to kill a command executed from a script?

I would like to start a tcpdump in my own script an after some time I would like to kill it again. How can I access the PID from the tcpdump. I tried it with $$ , but this only kills the script. if ...
1
vote
1answer
69 views

Kill process on specific port

It has been asked before but how to do it with OpenBSD? I tried some different method but none worked. $ sudo fuser -k 80/tcp fuser: 80/tcp: No such file or directory $ kill $(sudo lsof -t -i:80) ...
2
votes
2answers
1k views

How to use pgrep inside bash script correctly?

I'm running a GUI program called zeal(compiled from src) and add a script(zeal.sh) for the executable: #!/bin/bash if pgrep zeal &>/dev/null; then printf "already on\n" else ...
10
votes
5answers
4k views

Process descendants

I'm trying to build a process container. The container will trigger other programs. For example - a bash script that launches running background tasks with '&' usage. The important feature I'm ...
1
vote
1answer
53 views

Is it possible to rename a process you own from outside that process?

If I'm logged in as $USER, and I run top and I can see a process I own can I rename that process? If so, how? If not, can root rename a foreign process? If so, how? If not, why?
2
votes
2answers
71 views

How to kill line of PID?

I have process which created multiple PID's. I want to kill all those PID's. I have tried pkill <process_name>. But PID not getting killed as they were wait to resource releasing. I have ...
3
votes
1answer
150 views

Long-running R script is getting killed automatically

I'm attempting to run an experiment for my masters thesis that involves an R script that has to run for quite a while (up to 24 hours of 100% cpu usage). It's a single-core process, and as far as I ...
1
vote
0answers
15 views

How does an OS detect an access to random memory address of a compiled program? [duplicate]

I've read a couple things about memory management/virtual memory and I need a little more details on one important point. If I compile a program and it does an access to a hard-coded address without ...
2
votes
1answer
75 views

Ubuntu: Process vfs-worker taking all CPU resources

My Cloud9 (Ubuntu-based cloud IDE) began to be unresponsive after I tried to save some files (they didn't save to my cloud workspace). It shows 100% CPU utilization and a process that takes all CPU ...
1
vote
0answers
30 views

What is the best practice for setting a process niceness?

I have an agent which runs on my customer's hosts. I want this agent to leave the smallest possible footprint on their hosts, that is, I don't want to degrade my customers' performance. My agent runs ...
1
vote
2answers
71 views

screen process in capitals

I've noticed that when running screen the process identified with it actually shows up in capitals. Linux Debian Wheezy. Here an example with me ssh'in into a machine, running screen -S test and ...
3
votes
2answers
2k views

A tee >( process ) is truncating its stdout when writing a file

When I use tee to pipe stdout directly to a "specific block of code" (which then writes the modified data to a file), I always get the full complement of exptected output lines in the file. ...
5
votes
2answers
105 views

Why process does not (seem to) exist before fifo read

I have a trivial Python script: #!/usr/bin/python import os, sys sys.stderr.write('I am %s' % os.getpid()) sys.stderr.flush() print "hello" sys.stderr.write('I am done') When I run this script ...
6
votes
1answer
160 views

Replace current process by its coprocess/child

I have a program P that expects to receive "Hello" and output "Why?" before providing a feature. This feature is used by other programs that are not aware that it is common courtesy to start a ...
1
vote
1answer
59 views

How are piped processes presented in ps output?

I have a following very simple script which watches /tmp directory for new files and output of inotifywait is piped to sed: #!/bin/bash /usr/local/bin/inotifywait -q -m /tmp --format %f | sed ...
15
votes
7answers
7k views

Process Monitor equivalent for Linux?

Is there a Unix/Linux equivalent of Process Monitor, whether GUI or CUI? If it makes a difference, I'm looking at Ubuntu, but if there's an equivalent for other systems (Mac, other Linux variants ...
0
votes
1answer
42 views

Write a process with 0 idle memory [closed]

I see that the daemons in my PC's process list idle with 0 memory usage. I want my daemons to run like that, so how is it done?
118
votes
7answers
71k views

Keep SSH Sessions running after disconnection

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and ...
1
vote
0answers
24 views

i3pystatus-python process blocks suspend and shutdown

After using my arch-linux system a decent time, it can happen, that the i3pystatus process is not freezable anymore. As a result I can't suspend my laptop anymore. Killing the process (killall -9 ...
4
votes
2answers
2k views

What's the difference between lsof and fuser -uvm

Both shows the number of files we're using. Yet they both shows different results. root@host [~]# lsof /home4 root@host [~]# lsof /home2 root@host [~]# lsof /home4 Then we got fuser -uvm /home4 ...
16
votes
7answers
6k views

What is using this network socket?

I'm trying to use NTP to update the time on my machine. However, it gives me an error: host # ntpdate ntp1.example.org 10 Aug 12:38:50 ntpdate[7696]: the NTP socket is in use, exiting What does the ...
2
votes
3answers
7k views

How to tell who is connected via vnc to my machine?

How do I check how many vnc connections or different users are currently connected to my machine? Only through wireshark? And how do I kill any other users connected through vnc?
3
votes
2answers
97 views

What information about a process is retrievable after it is terminated?

After a process has been terminated, is it possible to retrieve any information about it, such as when it started and finished, &c. Is it possible to enable logging of this information?
0
votes
1answer
73 views

history/log of command-lines executed to launch processes(pid) [duplicate]

Given a certain PID, is it possible to discover what command-line executed this process? top, atop, ps provide real time informations, I'm looking for something whereby I can look the past, because ...
4
votes
4answers
213 views

Does a service restart send a HUP?

I have noticed that doing a service restart with something like: service sshd restart is very similar to doing something like: pkill -HUP sshd However the pkill would close my ssh session where ...
1
vote
1answer
400 views

How to demonstrate invalid PID assumptions?

It seems many programmers are happy with saving a PID to a file, and then later read and use the PID as if it was guaranteed to be the same process. It seems the general idea is that the odds are good ...
2
votes
3answers
82 views

How to make init script print “OK” only when all subprocesses are stopped?

I have a very complex python application. It has it's own init script, but when I execute: sudo service my_service_daemon stop It prints "Stopping my_service_daemon [OK]", but in real ...
2
votes
1answer
42 views

How does kill by pgid affect new subprocesses?

I have a very complicated application, which has its init-script and main service runs as a daemon. I want to stop it fast and gracefully, so I used this in stop() function: group_id=$(ps -o pgid= ...
2
votes
1answer
111 views

Process startup after boot

I know the following are ways processes get started in Linux from init.d (or similar) from shell (by user) forked by a running native daemon Is it ever possible on Linux for a process to be ...
2
votes
1answer
56 views

how to get processor that thread is currently assigned to?

I've found such column in ps -elF: PSR processor that process is currently assigned to. I need something similar but for threads. ps huH p 1234 prints threads of process 1234, can I somehow add ...
14
votes
2answers
12k views

How to know reason of a process going to sleep state and wake it up?

When I do 'top' , I see my perl script process in 'S' state. Is there a way to know, what is making this perl process go in sleep state and ways to wake it up? Any way to debug to give more insights ...
3
votes
3answers
105 views

How to get the pid to the last background app

Following from this question: How to get the pid of the last executed command in shell script? The thread there is good and clear, but what if the command actually doesn't require a '&' at the ...
1
vote
2answers
60 views

How to monitor the output as the process runs on a RedHat Linux server?

You need to run a process on a RedHat Linux server that takes a little while to run. You want to monitor the output as the process runs but need to guarantee that the process won't terminate if you ...
2
votes
2answers
82 views

How to get information about files being copied to my machine by remote rsync command?

I am rsyncing a directory from machine B to machine A. rsync command is run on machine B. On machine A, what kind of information can I get about this rsync process (progress/amount of data downloaded ...
3
votes
2answers
1k views

wait does not wait

If i have a file called myprogram containing sleep 200 date Run this in the background: $ sh myprogram & i want to know when myprogram has completed by using wait command $ cat >notify ...
2
votes
1answer
44 views

Strange behavior of 'ps -o pgid'

Intro: I have a daemon, which spawn processes and I have to stop it all gracefully. The solution I found on web based on pgid: group_id=$(ps -o pgid= $(cat $pidfile)) if [ ! -z $group_id ]; then ...
3
votes
1answer
488 views

How can I know thread names that run on specific core

I am working in Java code. My code makes specific Java threads run on specific cores. In this code, I give names to Java threads. I need a Linux command that enables me to know the threads' names that ...
2
votes
0answers
52 views

Find which process is being joined by another?

If I have opened Nautilus and spawned a new Nautilus instance, a new PID is created for the new Nautilus instance. Shortly after, the instance is joined with the main Nautilus program running. Main ...
3
votes
4answers
73 views

Who forks the processes of piped commands in the shell?

Consider this command in the shell : ls|less Now we know that ls and less are run as two different processes. We know that the shell forks and creates a child process which load the ls program using ...
1
vote
3answers
189 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 ...