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

learn more… | top users | synonyms (1)

2
votes
3answers
556 views

Why does a default Linux installation run more processes than a default OpenBSD installation?

If I ps -aux on Ubuntu (or any GNU/Linux distribution) without GUI I see ~100 processes running. If I ps -aux on OpenBSD without GUI, then I get ~10 processes. What is the explanation/reason for ...
4
votes
4answers
206 views

“Virtual” shell, ie. jailing an user inside a process after the (SSH) login

The title might not say much about the issue at hand so let me get straight to the point. Let's assume I have a casual user who can log in to the system via SSH into a bash shell. I also have a PHP ...
1
vote
1answer
120 views

Is there any way to attach latrace to an already-running process?

I want to trace a running multi-threaded process's library calls. As of 5 November 2012, there's only one way to get ltrace to fully support tracing multi-threaded processes: you must check out and ...
2
votes
2answers
3k 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?
2
votes
2answers
628 views

Is there any impact of reaping zombie processes?

I will execute following command for reaping zombie /usr/bin/preap $(ps -ef | grep defunct | grep -v grep | awk '{ print $2 }' | xargs) Is there any service impact of this approach ?
1
vote
1answer
412 views

Korn shell timeout/kill script

I am trying to write a simple Korn shell script to execute a loading process. The process occasionally runs into connectivity issues, so I need to kill it if it runs too long. I have been trying the ...
3
votes
1answer
3k views

Understanding ps elapsed time format for long running processes

I'm using a ps command as part of an exercise to identify processes running longer than a given threshold. I'm using the following template to get the elapsed time for a know process command: ps -eo ...
4
votes
2answers
178 views

How to kill a process giving it a number of seconds before a doing the forced kill?

I do have the PID of the process to be killed but I do want to give it the chance to die peacefully, without doing a -9. Expected behaviour: check if PID is still running for up to ten seconds and do ...
6
votes
1answer
447 views

Files bigger than max(off64_t) on Solaris, eg “/proc/../as”

How do I read or seek from a file that's bigger than the maximum off64_t? The problem arises because the address space of a process is represented in the /proc/.../as file, which is a huge sparse file ...
3
votes
1answer
900 views

When do jiffies increment? How a process runs in a jiffy?

I know that jiffies length is selected at kernel compile time and it is defaulted to 250 (4ms). Source: man 7 time - The Software Clock, HZ, and Jiffies I wonder what happens inside a jiffy. What are ...
5
votes
1answer
315 views

root owned program with setuid bit on

Ping is a a program owned by root with the user id bit set. $ ls -l `which ping` -rwsr-xr-x 1 root root 35752 Nov 4 2011 /bin/ping As I understand it, if a user runs the ping process, then the ...
8
votes
6answers
5k views

Kill many instances of a running process with one command

This is one of the questions that has troubled me often. Suppose I have thousand or more instances of any process(for e.g. say the process vi) running. How do I kill them all in one single shot/one ...
2
votes
4answers
150 views

How to find out what is this process for?

I have this 'java' process running for 3 hours ( I guess ). I didn't see it before and I wonder how could I find out where it's coming from? Here is a screenshot: EDIT: ok I figured it out, it's ...
5
votes
3answers
940 views

Silently start task in background

I know that you can use this to start a process in the background, without getting the notification when the process is put in the background and when it is done like so: (command &) &> /dev/null ...
0
votes
1answer
850 views

What is the advantage of using pthreads in Linux?

I read somewhere that Linux threads are really implemented as processes in the kernel since with today's hardware and on the Linux platform, the thread model is inefficient compared to the process ...
3
votes
0answers
141 views

Can I get WCHAN from ps on Mac OS X 10.7.4?

From the manual it seems that ps -AO wchan should tell me what everything is sleeping on, but everything comes up as -. (And nwchan as 0). Did they do away with the old sleep()/tsleep() interface in ...
5
votes
3answers
998 views

How to poll existence of a background script correctly

I have a problem with the following kind of script: #!/bin/sh long_running_script.sh & while [ `pidof long_running_script.sh` ] do echo "." sleep 1 done The sript will ...
2
votes
2answers
1k views

Find the PID of top CPU/MEM usage, save to a shell variable

Is there any way to get the PID of the top CPU/MEM usage, I need to use that in a script, top command doesn't seem to work for it.
8
votes
1answer
540 views

Negatives of running processes with real-time priority?

The question is as the title says, are there any downsides of running processes with real-time priority (chrt -f 99)? My hypothesis is that this combined with an affinity will ensure that any ...
0
votes
1answer
294 views

Where can I see the processes running at startup?

I'm using backtrack5 R2 and sometimes when I log in the information showed says that There is 1 zombie process, where can I see what process is running?
5
votes
1answer
2k views

Find processes using a network interface

I'm trying to find a way to safely shutdown a network interface, i.e. without disturbing any processes. For this I need to find out what processes are currently using that interface. Tools like ss, ...
3
votes
3answers
323 views

Prevent users from killing processes that they own

I have started some processes (window based) from user's .bashrc file. I want to prevent users from killing those processes. Is there a way to transfer the process to superuser so that a normal user ...
1
vote
1answer
2k views

How to know maximum memory usage of a process? [duplicate]

Possible Duplicate: Measuring RAM usage of a program I have a process, which is quite short-running (about 10 minutes), but memory heavy. I want to know how much memory does the process ...
3
votes
1answer
551 views

How do I detach a process from its parent? [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? The problem is that the process is not a job inside of my active shell (as I've logged in from ...
2
votes
1answer
441 views

What process created this window with no PID associated? [duplicate]

Possible Duplicate: What process created this X11 window? I need to kill a process that spawned a window which seems to have no PID associated with it. At least that is what xdotool says: ...
2
votes
2answers
132 views

How to constrain the resources an application can use on a linux web server

This is the situation: I have a PHP/MySQL web application that does some PDF processing and thumbnail creation. This is done by using some 3rd party command line software on the server. Both kinds of ...
2
votes
0answers
120 views

How to find current chroot jail path on Linux <2.6.26

While running kernel 2.6.26 or newer it's possible to get the path of the current chroot jail by comparing the mountinfo of the current process and the init process. Is there a way to get the same ...
2
votes
1answer
333 views

How to log processes in daemon-mode?

I would like to save the standard output of the program motion in a text file. If I don't use motion in daemon-mode I would simply do it by: motion > log.txt But what is the equivalent when I ...
2
votes
2answers
737 views

`[java] <defunct>` with defunct children -> Any way to collect them?

Relating to question : What if 'kill -9' doesn't work? I have following situation : zombie process with threads, not collected by init : [root@Arch64]# ps auxH | grep java gwpl 569 ...
4
votes
1answer
2k views

mmap() failed: Cannot allocate memory - how do I find out who's complaining?

mmap() failed is popping up in my .xsession-errors in bursts. But there's no indication about what application it is failing with. How do I look into this after it has happened? I usually discover the ...
11
votes
3answers
296 views

Where to find explanation of kernel processes?

I want to know about kernel processes, like [migration], [kswapd], etc. Where are kernel processes like these documented?
4
votes
2answers
626 views

Why is `sudo pkill -HUP -f “nginx: master process”` returning code 129 and no output

I'm trying to trigger a reload of the Nginx master process by using pkill and sudo. The server reloads fine, but I was just curious if anyone knows why the command sudo pkill -HUP -f "nginx: master ...
3
votes
1answer
442 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 ...
11
votes
2answers
910 views

Is there an upper limit to the number of zombie processes you can have?

I used to work with an HP-UX system and the old admin told me there is an upper limit on the number of zombie processes you can have on the system, I believe 1024. Is this a hard fact ceiling? I ...
0
votes
1answer
292 views

Giving input to background processes

Is there any way to give input to background processes or which run as daemon processes? I was coding some Puppet configuration files and I had to push them to some remote machine. For that purpose I ...
4
votes
2answers
2k views

Detailed Per-Process Profiling

I am looking for a way to profile a single process including time spent for CPU, I/O, memory usage over time and optionally system calls. I already know callgrind offering some basic profiling ...
24
votes
4answers
3k views

Save entire process for continuation after reboot

I developed an algorithm for a fairly hard problem in mathematics which is likely to need several months to finish. As I have limited resources only, I started this on my Ubuntu 12.04 (x86) laptop. ...
4
votes
1answer
1k views

Difference between poll_s and ep_poll WCHAN in ps output

When I issue ps -elf|grep python for example on my system, I see these: 1 S 1000 6020 6008 0 80 0 - 9914 poll_s Jul12 ? 00:00:01 python manage.py run_gunicorn -t 3600 -w 8 -b ...
3
votes
1answer
441 views

Rationale for making user space text segment start at 0x8048000

I read somewhere that (at least since Linux v. 2.6) all user-space code is placed at load address 0x8048000 in the virtual memory address space. My own observations confirm this. I have done a cat ...
4
votes
2answers
1k views

Linux running slow with 0 swap left

Our Linux server is responding very slowly. top doesn't show any excessive CPU usage. I noticed that even though there's about 5GB of free memory, the system is using all of swap with no free swap ...
13
votes
3answers
3k views

How to kill a process with a single command?

I want to kill a process, after finding the id in a single step. I currently use these two commands: pidof <name> kill <#number_which_is_result_of_command> How can I write a single ...
10
votes
2answers
2k views

tmux session lost in unknown pts, cause and possible solution?

I was trying to re-attach to a long-running tmux session to check up on a python web-application. However tmux attach claims that there is no running session, and ps shows a tmux process (first line), ...
3
votes
2answers
724 views

How can I kill the top CPU/IO process quickly?

I find that sometimes my Linux will stop responding, so I need to switch to another terminal with CtrlAltF2, and type a command to kill the top CPU usage process or top IO usage process, so that the ...
3
votes
1answer
330 views

bash: disable new process PID message

It may look like this: [2] 2847. I guess the first digit is just an enumeration of processes created from the shell. The second is the PID. Anyway, I never care about that information so it is just ...
2
votes
1answer
161 views

How can I log what software I use the most?

I really like using open source software and would like to help fund further development. Unfortunately, I have limited funds to do so. Being somewhat greedy, I would like to donate to the projects I ...
15
votes
3answers
623 views

Limiting a specific shell's internet bandwidth usage

I want update my linux in one shell but by default wget or axel in updater use all the bandwidth. How can I limit the speed in this shell? I want other shells to have a fair share, and to limit ...
9
votes
3answers
6k views

How to see how many context switches a process makes?

I want to see if my process makes a lot of context switches. I also want to see how manpulating task groups affects the number of context switches.
10
votes
4answers
401 views

In bash, what are potential negative consequences of pausing a process with control-z?

Using bash, one can pause a process with control-z. However, are there any general circumstances or guidelines to beware of where a process would not behave well with being paused? My specific ...
2
votes
2answers
261 views

Quick and dirty way to run a process more than once

I am looking for very simple bash script that would allow me to launch a process a few times. What's essential to me is that after the processes terminate, everything will clean up automatically. ...
1
vote
2answers
1k views

Kill all processes related to an application

I have two processes that are temporarily spawned and I need to kill them. Here are the processes from ps aux david 38329 0.0 5.0 3916476 104624 s002 S 11:33AM 0:17.43 ...