The tag has no usage guidance.

learn more… | top users | synonyms

8
votes
5answers
9k views

'kill java' doesn't kill java

I am running debian right now and sometimes I need to kill java manually from the terminal, but when I try kill #pid# or pkill java nothing happens. No console output (ok, that's normal) and java is ...
4
votes
3answers
69 views

Get chrome's total memory usage

Since google chrome/chromium spawn multiple processes it's harder to see how much total memory these processes use in total. Is there an easy way to see how much total memory a series of connected ...
310
votes
10answers
122k views

When should I not kill -9 a process?

I am always very hesitant to run kill -9, but I see other admins do it almost routinely. I figure there is probably a sensible middle ground, so: When and why should kill -9 be used? When and why ...
2
votes
1answer
12 views

Pthread scheduler scope variables?

I read that their is 1:1 mapping of user and kernel thread in linux What is the difference between PTHREAD_SCOPE_PROCESS & PTHREAD_SCOPE_SYSTEM in linux if kernel is considering every thread ...
8
votes
3answers
93k 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 ...
2
votes
0answers
22 views

unicorn + systemd: losing logging after unicorn upgrade

I'm deploying unicorn with systemd for the first time (actually, this is the first time I'm using systemd at all), and I'm using unicorn's "zero-downtime upgrade" trick, or basically: Send USR2 to ...
1
vote
2answers
177 views

One-Liner needed: Stop httpd if running already & Start httpd if not running

As part of a provisioning script for CentOS 7 I am in need to have a one-liner that performs the following. Unfortunately, I have no clue how to achieve that. If httpd is running then stop it If ...
1
vote
1answer
102 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 ...
2
votes
1answer
25 views

Why do processes not fill up empty process IDs

Everybody knows that PID number 1 is systemd (or something equivalent). And every process after that takes another PID, counting up. However when there are 50 processes running (up to PID 50) and ...
1
vote
2answers
63 views

Is there a program like tmux or screen but only for attaching or detaching a session

I was wondering if there was a program like GNU/screen or tmux that would allow me to attach or detach a session with a running process but would not provide all of the other features such as windows ...
1
vote
1answer
35 views

pgrep full match not work, only part, why?

I use pgrep from procps-3.3.10. If I have executable aout_abcdefgh_ver27, then pgrep aout_abcdefgh_ver27 returns nothing, while ps aux | grep aout_abcdefgh_ver27 returns the expected result: ps ...
-3
votes
1answer
55 views

What is the difference between nice and renice?

What is the difference between the two commands nice and renice to manage process priority?
1
vote
2answers
134 views

Terminal command (called not from SU) that would restrict process from writing to all directories but one?

We have an app testApp. We have a folder called notRestricted in the directory where we run app from. We want to limit access of the app to file system so that app could write only to that folder (we ...
0
votes
0answers
948 views

Detach a process from Sh (not Bash) or “disown” for Sh (not Bash)

Consider a shell script executed by Sh, not Bash (and I can't change it, and can't use a shebang, it's ignored). The & operator works, but disown $! does not and makes Sh complains “disown: not ...
17
votes
1answer
28k views

What does this process STAT indicates?

If you check the STAT column in above image you will see Ss S S< SN and R+ What does this indicates ? Process states. If yes,Then what is the significance of 'Ss S< SN and R+'?
5
votes
4answers
1k views

A gzip process regularly runs on my system, how do I figure out what is triggering it?

For a while now, I have had the problem that a gzip process randomly starts on my Kubuntu system, uses up quite a bit of resources and causes my notebook fan to go crazy. The process shows up as gzip -...
5
votes
1answer
1k views

A script's background process is still alive after closing the terminal

This is more of a process management/signal handling question than a Bash question. It just uses Bash to explain the issue. I'm running a Bash script in which I run a background process. This is the ...
1
vote
2answers
47 views

List superuser processes

I am trying to list the superusers processes currently running in my Kali distro. Using "pgrep -f sbin" I figured that would do the trick, however it only lists the PID numbers, not the actual name of ...
1
vote
2answers
1k views

How can I wake a process from sleep status via signal or /proc?

Many years ago I had an issue with Linux where processes would randomly go to sleep. Back then, I knew a trick with the /proc filesystem to trigger a wakeup of the process. I vaguely remember being ...
30
votes
1answer
1k views

What is a “subreaper” process?

The word "subreaper" is used in some answers. Searching Google also turn up entries where the word is "just used". How can I understand what a "subreaper" is?
20
votes
2answers
405 views

Can a zombie have orphans? Will the orphan children be disturbed by reaping the zombie?

As I understand it, a zombie process has died but still exists as a placeholder in the process table until its parent (or init if the zombie is itself an orphan) checks its exit status. And my ...
16
votes
3answers
15k views

How to Throttle per process I/O to a max limit?

I'm looking for a way to limit a processes disk io to a set speed limit. Ideally the program would work similar to this: $ limitio --pid 32423 --write-limit 1M Limiting process 32423 to 1 megabyte ...
2
votes
2answers
118 views

How to get the title of the media playing in VLC or other media players using CLI?

I want to get the title of the media playing in VLC using the Command Line. The closest thing I currently have is this command. ps aux | grep vlc The output is pc 27636 2.1 2.3 1261964 ...
2
votes
2answers
82 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
3answers
4k views

How to find how many cores a process is using?

I have a eight core machine. How can I find out how many cores are used by processes that I see in htop?
4
votes
3answers
144 views

How to show quoted command list?

ps -o command shows each command on a separate line, with space separated, unquoted arguments: $ ps -o command COMMAND bash ps -o command This can be a problem when checking whether the quoting was ...
1
vote
2answers
185 views

Get process age from command line [duplicate]

In linux, from /proc/PID/stat, I can get the start_time (22:nd) field, which indicates how long after the kernel booted the process was started. What is a good way to convert that to a seconds-since-...
1
vote
1answer
81 views

Signal execution details

I am reading some Linux documentation about 'signals' and I still have these questions making noise in my mind: 1) A 'signal' handler execution is done when the 'target' process receives its ...
0
votes
1answer
125 views

Process management - add daemon process from CLI

I'm looking for process manager which can be controlled from CLI (add, start, stop, delete), so I can control it programmatically. I've tried using https://github.com/circus-tent/circus, but the ...
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
2answers
93 views

Opened file with several million lines: how to close it?

I've just accidentally opened rockyou.txt in Kali Linux on a fairly slow computer. It has now been sitting on the desktop loading the 30million words for over an hour. It is not frozen, as I can still ...
1
vote
0answers
95 views

Check whether a process is running in privileged mode

I want to check if a specific process is running in privileged mode. If a process is running is privileged mode, necessarily the user running it is going to be root? I've noticed that when I use sudo,...
1
vote
1answer
48 views

Which process group does my program belong to when started from bash?

If I run a program from bash, then does my program belong to the same process group as the shell, or does it belong to a new process group? As I am making a shell in C, I need to handle the SIGINT ...
6
votes
4answers
18k views
4
votes
2answers
1k views

Removing zombie process from the process table

Can somebody please explain when parent process receives the exit status of a dead child process via wait, who actually reallocates the memory of the child process and removes it from the process ...
1
vote
3answers
134 views
1
vote
1answer
60 views

Kill process instead of panic on hung_task

There are sysctl parameters for hung_task* that allow you to emit error messages or panic if a process is in the D state for some amount of time. Is there anyway way to have the kernel kill the ...
2
votes
2answers
186 views

Why do multiple instances of Mate-terminal have the same PID?

I've noticed, that all mate-terminal instances I start, be it inside a mate-terminal or via a link button, have the same PID. For example, I got something like $ wmctrl -lp <omitted lines that ...
6
votes
1answer
432 views

Difference between closing the terminal using the closing button, and Ctrl-D

When I'm launching a background process and then closes the terminal using the window's closing button, the background process gets killed. However if I close the terminal using Ctrl+D, the background ...
0
votes
2answers
48 views

Which tool can be used to configure the CPU priority of a process?

I know that you can use nice to re assign priorities of processes but which tool can be used to configure the CPU priority of a process ?
5
votes
1answer
431 views

SIGKILLing after a grace period

I've seen a lot of process managers that try to do this. It was my understanding that you should only use SIGTERM to kill a process. The process could take an unknown amount of time to clean up after ...
24
votes
1answer
13k views

What is the maximum value of the PID of a process?

What is the maximum value of the PID of a process? Also, is it possible to change the PID of a running process?
9
votes
2answers
2k views

Kill a suspended process?

I was slightly confused by: % vim tmp zsh: suspended vim tmp % kill %1 % jobs [1] + suspended vim tmp % kill -SIGINT %1 % jobs [1] + suspended vim tmp % kill -INT %1 % jobs [1] + suspended ...
0
votes
1answer
116 views

Are blocked and blocked/suspend processes put into the same queue?

In a 7-state process model (new, ready, blocked, running, blocked/suspend, blocked/ready, exit), are processes in the blocked and blocked/suspend states for each event that processes are blocked on ...
2
votes
3answers
55 views

How can you print arguments of command in ps?

sudo ps o gpid,comm reports something like 3029 bash but the command has parameters --arbitrary -other -searchword is there a way to display these arguments?
7
votes
2answers
2k views

Systemd and process spawning

Don't normally post here but I am ripping my hair out over this one. I have a Python script that forks when it launches, and is responsible for starting a bunch of other processes. This script used ...
2
votes
1answer
47 views

Is there a process logging tool for solaris?

Is there an existing tool for solaris/unix that keeps a history trail of the list of running processes. I'd like to be able to review backwards in time what processes were active/running. I can ...
0
votes
1answer
280 views

How to kill only current process and continue with shell pipe-line?

I have 2 related Doubts about Bash. (Q1) Consider tail -f SomeFile | wc, a fictitious command-line, where tail is used to simulate a command (C1) which runs for a long time, with some output from ...
0
votes
1answer
1k views

kill processes in one line with kill, awk, ps, and grep

I have a few processes that spring up and I am able to print a line of the pgid's that I would like to enter into a kill command. here is what I have: sudo ps o pgid,args | grep mininet: | sudo awk '{...
0
votes
1answer
678 views

Very large values for utime and stime for foo. Is foo still running?

I am running a program foo It has been running for close to 30 days now (even more) Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...