A process is an instance of a computer program that is being executed.
16
votes
1answer
492 views
How does systemd survive a kill -9?
Between the recent "Why does 'kill -9 0' end my console session" and "How to get a kernel panic" questions, I got a bur under my saddle and tried kill -9 1 on a mostly up-to-date Arch linux laptop. I ...
2
votes
2answers
65 views
what happens when a window manager is put to background
I am trying to understand the situation why .xsession file expects the last process to be in foreground otherwise it is supposed to stop X11 session.
I have a small stand-alone script. when I run ...
6
votes
1answer
242 views
Why does “kill -9 0” end my console session?
I just wonder why kill -9 0 ends my tty console session?
What exactly is PID 0, it is not listed on a ps aux?
2
votes
4answers
75 views
Capture complete process structure/stack
There are a lot of java processes running on the server, generally, we capture the PIDs of the java processes using command 'ps -ef | grep java'. In general, the java processes have a lot of jars in ...
14
votes
2answers
445 views
How are the processes in UNIX numbered?
I can't find any pattern when I look at the numbering of PIDs in process table (ps -a), as the PIDs are not subsequent numbers and sometimes there are large "gaps" between those numbers.
Is it ...
-3
votes
2answers
65 views
Which Linux distro/mode offers lowest interference when running your own applications?
I'm interested in a Linux distro to build C projects and test their behavior in a very predictable and controlled environment. I'm especially concerned about letting the scheduler deal as much as ...
10
votes
2answers
375 views
Why does bash show 'Terminated' after killing a process?
Here is the behaviour I want to understand:
$ ps
PID TTY TIME CMD
392 ttys000 0:00.20 -bash
4268 ttys000 0:00.00 xargs
$ kill 4268
$ ps
PID TTY TIME CMD
392 ttys000 ...
3
votes
2answers
262 views
Bash script wait for processes and get return code
I am trying to create a script which will start many background command.
For each background command I need to get the return code.
I have been trying the following script :
#!/bin/bash
set -x
...
0
votes
0answers
34 views
Forking two interactive bash processes causes parent process to stop or second bash to go background
If you fork (exec) two interactive bash processes within same parent process (from different threads) causes that parent process becomes stopped or second interactive bash goes to background which ...
1
vote
3answers
233 views
Kill only one Java process
I usually run few Java applications, one for server running locally and other for some IDE like NetBeans. And from time to time, after lots of redeployments, my server get stuck on ...
3
votes
3answers
260 views
How to track the number of processes and forks per user?
I need to figure out how many forks are done and how many concurrent processes are run by each user over time. It does not look like this information is tracked by my distribution.
I know how to ...
1
vote
1answer
116 views
Change of real time priority made no visible effect
we were trying to get the best result with software PWM on raspberry pi with Raspbian. We made a python script which starts PWM on a GPIO pin, and observed the results with the oscilloscope.
It ...
5
votes
1answer
124 views
Real time priorities in non real time OS
If I do the following command on my standard Linux Mint installation:
comp ~ $ ps -eo rtprio,nice,cmd
RTPRIO NI CMD
...
99 - [migration/0]
99 - [watchdog/0]
99 - [migration/1]
- 0 ...
1
vote
2answers
68 views
Cron creates vim process but does not display vim
Under MacOSX 10.8.2 I am able to run vim as follows in the bash shell:
/usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal
If I put the exact same command in a script:
#! /bin/bash
export ...
1
vote
2answers
160 views
Which script from /etc/init.d/ started the process?
Let's say we have a PID of a process and we know that it was started by init during startup. How do we find the script name that started it?
One way is to run grep $PROCESS_NAME /etc/init.d/*, but ...
3
votes
1answer
103 views
What is “automatic stack expansion”?
getrlimit(2) has the following definition
in the man pages:
RLIMIT_AS
The maximum size of the process's virtual memory (address space) in bytes. This limit affects calls to brk(2), mmap(2) and ...
4
votes
1answer
45 views
How to monitor all executions of an executable over a time period
I know how to monitor a process. Commands like top and so forth can monitor the CPU time and memory usage for a given process instance.
But say I expect a given executable to be run several times in ...
1
vote
2answers
115 views
Host process for multiple processes?
I am maintaining an application that currently consists of 4 processes that are dependant on each other in various ways. At the moment these processes are started, stopped and monitored via a rather ...
4
votes
2answers
116 views
Why is I/O uninterruptible?
What is the rationale behind making I/O uninterruptible? What would be the negative consequences if a process handling I/O were allowed to handle a signal?
2
votes
2answers
140 views
Why “uninterruptible sleep” is not counted as “IDLE”?
When I run top -bi, where the parameter -i means "ignore idle processes", the resulted list(see below) of processes are either R or D, although there're S processes at that time.
So, why ...
4
votes
1answer
224 views
What does <defunct> mean in the output of ps?
I had issued the ps -ef|grep java command and this is one of the entries that I got :
subhrcho 875 803 0 Jan23 pts/5 00:02:27 [java] <defunct>
What is <defunct> implying here ? ...
3
votes
2answers
146 views
Please explain the -f option in pgrep
man pgrep says the following about -f option:
-f The pattern is normally only matched against the process name.
When -f is set, the full command line is used.
What does it ...
3
votes
1answer
144 views
What is the difference between exiting a process via Ctrl+C vs issuing a kill -9 command?
I know I can kill any process with kill -9 command . But sometimes i see that even if I have terminated a program with CTRL+C , the process doesn't get killed . So I want to know the difference ...
2
votes
4answers
271 views
How do I know what service is running on a particular port in linux?
I am trying to run weblogic server on my linux machine and I am getting the following error :
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to ...
2
votes
2answers
90 views
$BASHPID And $$ differ in some cases
I'm reading "BASH pocket guide of Oreilly".
It said:
The process ID of the current Bash process.
In some cases, this can differ from $$.
Above explanation , explained $BASHPID variable.
...
-3
votes
2answers
363 views
Please explain this output of ps -ef command?
A part of the output from the ps -ef command is given below :
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 2012 ? 00:00:01 init [3]
root 2 ...
0
votes
3answers
260 views
What is the difference between ps and top command?
What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?
12
votes
2answers
268 views
When was a process started
To know when was a process started, my first guess was to check the time when /proc/<pid>/cmdline was written/modified the last time.
ps also shows a START field. I thought both of these ...
10
votes
4answers
537 views
What is the difference between running a executable just by name and by appending a dot /slash before it?
This is the output from ls -all command :
-rwxr----- 1 subhrcho dba 3600 Nov 13 17:26 jdev
-rw-r----- 1 subhrcho dba 1566 Nov 13 17:26 jdev-Darwin.conf
-rw-r----- 1 subhrcho dba 347 Mar 6 2009 ...
0
votes
0answers
26 views
How can I see a process' thread count? [duplicate]
Possible Duplicate:
Is there a way to see details of all the threads that a process has in Linux?
I want to see the thread count which belongs to a process in linux. What command should I ...
1
vote
3answers
204 views
What happens to suspended jobs in unix?
We can issue CTRL+Z to suspend any jobs in Unix and then later on bring them back to life using fg or bg. I want to understand what happens to those jobs that are suspended like this ? Are they ...
1
vote
1answer
69 views
Please explain the output from the jobs command
When I ran jobs command I see the following output :
[1] - Suspended ./startWebLogic.sh
[2] + Suspended (signal) top
What does -/+ indicate in the second column ?
...
1
vote
2answers
201 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 ...
3
votes
1answer
70 views
Can I add to my groups in the current (shell) process?
If I add myself to a group, it applies only to newly launched processes. Actually it's more restricted than that; it seems to apply only to new logins. I'm not sure what the exact mechanism is, but ...
1
vote
1answer
75 views
How to ensure a process has started reading a file before continuing?
I'm trying to write a command to test that data is written to a file. My first approach was:
Start reading in the background.
Write some data to the file.
Wait for the reader to find a result.
...
1
vote
1answer
457 views
What is kondemand?
I have searched the web for the answer of this question but couldn't find a clear answer. Best answer I found was as follows:
kondemand is a kernel thread that belongs to the ondemand governor of
...
1
vote
2answers
102 views
How to view commandline of processes executed in last 10 seconds
Is there a view to log and list down the processes executed in last 10 seconds ?
I especially want to trace the command line.
2
votes
1answer
97 views
Can I transfer running process from dead ssh [duplicate]
Possible Duplicate:
How can I disown a running process and associate it to a new screen shell?
I have started (as expected) a long copy process from ssh shell (putty) which died due to ...
3
votes
1answer
179 views
Cannot kill a java process
I have a java process that cannot be killed. I have tried every method I know, or that I have found on the internet to no avail. I have tried:
killall java
kill -9 <pid>
kill -11 <pid>
...
0
votes
0answers
99 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 ...
1
vote
1answer
87 views
Application in terminal still running but not directly accessible [duplicate]
Possible Duplicate:
How to suspend and bring a background process to foreground
I have kind of an odd problem which I haven't encountered before. Here's what I did:
I started an ...
0
votes
1answer
86 views
What does m represents in VIRT column using TOP command
When we run top command it shows all the processes information. But under VIRT column there is m written against some values what does that m represents, is it MB . If yes then why it is only showing ...
1
vote
1answer
155 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
...
0
votes
1answer
431 views
ATOP shows red line vmcom and vmlim. What does it mean?
utility atop shows:
ATOP - MyServer 2013/01/07 00:03:57 10 seconds elapsed
PRC | sys 2.18s | user 8.33s | #proc 141 | #zombie 0 | #exit 0 |
CPU | sys 21% | ...
1
vote
3answers
136 views
Killing all the process of a command except first process
I am sometimes stuck in a situation where a script/command kept in Cron runs more than once because of some reasons (the first instance is not completed fully, the second instance of the same process ...
6
votes
1answer
141 views
What should interactive shells do in orphaned process groups?
(Re-posting in unix per the suggestion in http://stackoverflow.com/questions/13718394/what-should-interactive-shells-do-in-orphaned-process-groups)
The short question is, what should a shell do if it ...
3
votes
1answer
128 views
How to know which commands are executed when I do something in GUI
This is for academic purpose. I want to know which commands are executed when we do something in GUI, for example creating a folder. I want to show that both the mkdir shell command and create folder ...
3
votes
2answers
253 views
What is meant by stack in connection to a process?
From the book Advanced programming in the Unix environment I read the following line regarding threads in Unix like systems
All the threads within a process share the same address space, file
...
2
votes
1answer
112 views
Program stall under user but runs under root
I am running R job under a normal user john and root. Interestingly, the program stalls under john user but runs quickly under root. Using strace, I found that when john runs the R, the process stalls ...
9
votes
1answer
240 views
How do I monitor opened files of a process in realtime?
I know I can view the open files of a process using lsof at that moment in time on my Linux machine. However, a process can open, alter and close a file so quickly that I won't be able to see it when ...
