4
votes
2answers
77 views

How to kill a process started as daemon?

I start a process using foo &. It outputs something like: [1] 16915 This is the process id, I guess. How can I store this number into a variable named MY_PROCESS_ID (for example)? Then I ...
3
votes
2answers
67 views

How to find out the reason a command/code was executed on Linux?

I have a complex embedded Linux software running on a gentoo derivative, on which a certain piece of code gets executed regularly every ~84 minutes. Sweeping through the main code to find places where ...
-1
votes
1answer
46 views

Which is the most precise command to get processes and system information? [closed]

I'm trying to evaluate performances of some active processes of mine on linux. Searching the internet I found that ps and top are the only command available for that. More precisely here, it says ...
1
vote
1answer
65 views

How to find out why a Java process died without a trace in Linux

A java process running in our SUSE Linux machine died without leaving a trace as to why it died. If it was killed with kill , it would have been logged and we would have known because the process ...
2
votes
1answer
100 views

What is the difference in CPU utilization between 'ps aux' and 'ps -ef'?

I use Ubuntu 12.04.1 Linux. I see a difference between %CPU and C output format of ps command for a process. It is not clearly noted in the ps man page. Man pages says: CODE HEADER ...
0
votes
0answers
11 views

What is the [rc0] kernel process?

I have several servers. A few of them are running ubuntu 12.04 LTS. I'm looking into an intermittent hanging issue, and noticed an [rc0] kernel process From ps -ef: ... root 1025 2 0 ...
1
vote
1answer
60 views

Track down process that has notty

I have a Linux server (Red Hat 2.6 kernel) which had a spike in load due to an Rsync process which seems to have forked many times, but the process was run by rsyncuser@notty I didnt see any cron job ...
2
votes
0answers
63 views

How to move process from one namespace to other?

This question is similar to my question about how to list namespaces. So in addtition, I'd like to know some information about moving processes from one namespace to other? E.g. I have processes of ...
8
votes
1answer
154 views

how to find out namespace of a particular process?

I already asked a question about how to list all namespaces in Linux, but there wasn't any correct and exact answers, so I want to find out a method which can help me to find out the namespace of PID ...
0
votes
2answers
110 views

How do I run two ongoing processes at once in linux/bash?

I would like to know how I can run two ongoing processes at the same time in Linux/bash. basically, I have a Node web server, and a MJPG-Streamer server. I want to run both these processes at once, ...
5
votes
2answers
91 views

Why do forked processes sometimes appear with brackets [] around their name in ps? [duplicate]

On a Linux system a C process is started on boot, which creates a fork of itself. It is not a kernal process or something. In most cases a ps -ef show both processes as expecxted, but sometimes it ...
9
votes
1answer
144 views

Why do I need dbus?

I recently removed dbus from my system (along with consolekit and polkit). I didn't notice any change (I was running it as system daemon and per-user from .xinitrc). However, many people claim that ...
0
votes
1answer
174 views

root permission denied on /proc/1/exe

I just performed a fresh ubuntu install and i am seeing the following in lsof: userA@az1:~$ lsof COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 ...
1
vote
2answers
129 views

How to terminate a background process in Linux when the pid is unknown?

I have a job dispatcher bash shell script containing below codes: for (( i=0; i<$toBeDoneNum; i=i+1 )) do while true do processNum=`ps aux | grep Checking | wc -l` ...
1
vote
2answers
191 views

Finding the PID of the process using a specific port?

I am installing hadoop on my Ubuntu system. When I start it, it reports that port 9000 is busy. I used netstat -nlp|grep 9000 to see if such a port exists and I got this: tcp 0 0 ...
9
votes
1answer
219 views

How can I track executables created by my user on Linux?

Using Linux, I would like to track the executables that are executed in my name, including the whole command line (in practice, every exec*() done as my own user). A program I do not control is ...
2
votes
2answers
82 views

Why do I see more processes in KVM than in OpenVZ?

I've got a 512mb Centos 6 VPS running on KVM. Now another VPS from a org. I manage is running on OVZ. When I type top on the KVM one, I get a whole list of all sort off processes. But when I do this ...
1
vote
1answer
62 views

Limiting processes by memory under Linux

We must launch several hungry processes on a Linux system. These processes often need several Go (~5Go) of memory to run (total memory: 16Go RAM + 2Go swap). At first, when the system was running ...
5
votes
3answers
227 views

Using `kill -s 0 $pid` vs `[[ -e /proc/$pid ]]` to detect if PID is running

One of the idioms often used to check if process is running is to use kill -s 0 $pid. My question is, does it have any upsides over using [[ -e /proc/$pid ]] construct? The script I'm writing is ...
1
vote
2answers
53 views

What information about a process is retrievable after it is terminated? [duplicate]

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?
1
vote
1answer
408 views

Modify 'Soft Limit' of 'Max processes'

I tried ulimit -u 2000 and ulimit -Su 2000 to modify the 'Max processes', and started up my program, but failed. I found file '/proc/pid/limit' is still: Max processes 1024 ...
2
votes
1answer
141 views

accessing stdin/stdout of a process started in another tty

I logged in to my linux physically(say tty1) and started a process that watches stdin for commands and has some stdout-put. How can I access/use this process from a SSH session?
5
votes
2answers
208 views

Processes in Linux

As I understand it, process descriptors are stored in a doubly linked list data structure. But a fork can create multiple children for the same process, so that makes me think that there is a tree ...
5
votes
2answers
160 views

Is there a way to really prioritize processes or make Linux respect their priorities?

I know there are process priorities like in other operating systems, going from -20 (most prio) to 19 (less prio) but Linux seems to ignore them. Right now I was building the kernel in the background ...
2
votes
2answers
127 views

How does a process handle the situation when it finds no memory to use?

What happens when a particular process finds that there is no memory to use? Will that process kill/restart another process to proceed their task ? Or what the process (that requires more memory) ...
4
votes
3answers
645 views

What's the difference between pkill and killall?

I know that pkill has more filtering rules than killall. My question is, what is the difference between: pkill [signal] name and killall [signal] name I've read that killall is more effective ...
3
votes
1answer
209 views

Linux: How to check whether a process is slowed down by other running processes

I have one process running on a RHEL 6.3 machine. Somehow this is taking a longer processing time than the same process running on another machine. How is it possible to know why this process is ...
3
votes
5answers
308 views

Is there a way to listen to process?

I want to know if there is a way to listen to a process in linux & unix - when it ends and what's the exit code of the process(script). I dont want to write a script that will run X seconds and ...
5
votes
2answers
427 views

Does linux kill heavy and long running background processes after they reach some threshold?

If I start a really heavy (memory/cpu intensive) running really long running process will the OS terminate it after a period of time arbitrarily? I.e. are there any limits beyond which the OS would ...
2
votes
2answers
132 views

a handy tool to measure memory consumption of a program [duplicate]

I develop a C code on Debian. I am looking for a program to monitor memory consumption of my code in real-time. The only value I care is the maximum RAM consumption, it should hold the value even if ...
2
votes
1answer
213 views

How to see process created by specific user in Unix/linux

I want to see list of process created by specific user or group of user in Linux Can I do it using ps command or is there any other command to achieve this?
2
votes
0answers
58 views

Linux child processes not being culled [closed]

This is causing significant problems for script portability between BSD and Linux. I am on a CentOS 6.4 where this happens. I have a nice compact test case: bash -c "inotifywait -mcr . | sed ...
0
votes
3answers
335 views

How can I start a process using cpulimit?

I am trying to use cpulimit for testing an app I'm developing under low resource conditions, and I need the process to start under the influence of cpulimit. It is not sufficient to start the program ...
-3
votes
2answers
143 views

Bash operator & not working [closed]

As per the bash reference, we can give a non-blocking command by ending it with an ampersand(&) character. However, when I try the below command its not working: python -m SimpleHTTPServer ...
3
votes
2answers
103 views

Current environmental variables of a process

This question relates to this answer. Is it possible to get the current (not initial) environmental variables of a process by making a child process and checking its initial environmental variables? ...
2
votes
4answers
819 views

How to kill a process which can't be killed without rebooting?

There are 5 processes which can't be killed by kill -9 $PID and executing cat /proc/$PID/cmdline will hang the current session. Maybe they're zombie processes. Executing ps -ef or htop will also hang ...
2
votes
1answer
398 views

what is the structure of a linux process? [closed]

what is the structure of a linux process? In linux there are processes executed on a address and which use system resources. Can anyone tell me the structure of a process and which parameter ...
3
votes
1answer
166 views

init: is it a user thread or a kernel thread?

init is the first task executed after kernel is loaded, right? Then who is its owner. also I can see [swapper/0] [swapper/1] ..... [swapper/7] having pid 0 PID PPID CPU TASK ST %MEM ...
5
votes
3answers
183 views

Determining the particular processor on which a process is running

I have access to an 8-core node of a Linux cluster. When logged in to the node, I can see a list of processors using this command: more /proc/cpuinfo In my 8-core node, the processors are numbered ...
3
votes
3answers
2k views

Fix “firefox is already running” issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line: kill ...
13
votes
5answers
2k 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...
4
votes
2answers
292 views

Turning off swapping for only one process with cgroups?

I would like to turn off swapping for only one process. Swap should work as usual for the other processes. How I can implement this with cgroups?
0
votes
1answer
171 views

Identify Tasks/Process which are 7 days old in linux

How can I identify the processes running since 7 days in Linux?
5
votes
3answers
208 views

Dynamic file content generation: Satisfying a 'file open' by a 'process execution'

I have a read-only file, F. A program, P, that I'm not the author of, needs to read F. I want the content of F to come from another 'generator' program, G, whenever P tries to read F (taking F to ...
5
votes
3answers
433 views

Can I pipe any two processes to each other?

In this page from The Design and Implementation of the 4.4BSD Operating System, it is said that: A major difference between pipes and sockets is that pipes require a common parent process to set ...
5
votes
5answers
311 views

Is a persistent zombie process sign of a bug?

(OS: Debian variant.) Having a process with zombie-status. The PPid belonged to a gvim process. The contents of /proc/[pid]/wchan is do_exit, /comm is sh and /cmdline is empty, /status is shown ...
1
vote
1answer
195 views

Do kernel counters for jiffies in state exist in Linux?

I am looking to get time/jiffie stats on the state of a daemon process. The states I'm referring to are mentioned in the Linux Kernel Proc Filesystem document. Running, Sleeping, uninterruptible ...
1
vote
1answer
112 views

Looking for /procfs documentation, describing values and units of measurement

Surprisingly, comprehensive documentation for /procfs is hard to find. For my specific question, I am looking at: cat /proc/1/statm (let's use pid=1 because it seems to be always there). I just ran ...
1
vote
2answers
219 views

How to decrease ps aux output to a few lines?

When my computer is slowing down, I usually run ps aux --sort -rss to find out which process consumes too much memory. There may be a lot of processes. How to see only a few ones?
1
vote
4answers
2k views

Show running processes with file name(s)?

I am using putty to connect my linux server which my sites are in. I can run # ps aux | less to show running processes. But I want to display which files running these processes ? I have also ...