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

learn more… | top users | synonyms

5
votes
2answers
362 views

Suggestions needed to debug why ps -ef gets stuck

A few of my processes consume 100% cpu. I'm trying to figure out which scripts are causing it I tried running strace ps -ef: open("/proc/PID/status", O_RDONLY) = 6 read(6, "Name:\textract\nState:\tR ...
4
votes
1answer
361 views

Is it possible to send a keyboard event to a background script that's expecting user interaction? (Using 'read')

Ex: $read & [1] 15139 [1]+ Stopped $jobs -l [1]+ 15139 Stopped (tty input) read
3
votes
1answer
892 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. ...
16
votes
2answers
4k views

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | ...
4
votes
3answers
4k views

when does the system send a SIGTERM to a process?

My server program received a SIGTERM and stopped (with exit code 0). I am surprised by this, as I am pretty sure that there was plenty of memory for it. Under what conditions does linux (busybox) send ...
13
votes
1answer
2k views

per process swapiness for linux

/proc/sys/vm/swappiness is nice but i want a knob that's per process like /proc/$PID/oom_adj so that i can make certain processes less likely than others to have any of their pages swapped out unlike ...
15
votes
3answers
11k views

Where can I see a list of kernel killed processes?

Is there some way I can check which of my processes the kernel has killed? Sometimes I log onto my server and find that something that should've run all night just stopped 8 hours in and I'm unsure if ...
6
votes
2answers
863 views

Is it possible to transfer a running process to your terminal? [duplicate]

Possible Duplicate: How can I pause up a running process over ssh, disown it, associate it to a new screen shell and unpause it? It is fairly easy to disown a process, or make it run ...
9
votes
1answer
4k views

How to suspend and resume proccesses like bash does

this question is a follow-up to: How to suspend and resume proccesses I have started firefox from a bash session in gnome-terminal. The proccess tree looks like this: $ ps -e -o pid,ppid,cmd -H ...
7
votes
3answers
3k views

Understanding top and load average

I'm observing a high load average on a certain machine (about 9) in all three load fields. I understand load as the number of processes in state "run" / currently desiring CPU time. Am I correct at ...
16
votes
5answers
22k views

Determining what process is bound to a port

I know that using the command: lsof -i TCP (or some variant of parameters with lsof) I can determine which process is bound to a particular port. This is useful say if I'm trying to start ...
3
votes
1answer
612 views

Difference between process group and job?

What's the difference between a process group and a job? If I type pr * | lpr then is it both a process group as well a job? What exactly is the difference between a process group ID and a job ID? ...
1
vote
1answer
763 views

Kill child-parent processes in a single command

I connect to Internet using sudo wvdial on Fedora 14. The terminal needs to be kept working. My requirement is to run yum update in a separate terminal, then kill wvdial & its parent terminal and ...
11
votes
4answers
2k views

Is it possible to find the path of a running program?

I have a xmms2d process running, but two possible executable files (in different directories, both in the executable path) that could have spawned it. I suspect that one of those is corrupted, because ...
16
votes
5answers
7k views

How can I close a terminal without killing its children (without running `screen` first)?

sometimes I run an app in the gnome-terminal, but then I suddenly have to restart gnome or something. I guess the answer to the question is also useful then I want to disconnect from SSH where ...
3
votes
2answers
873 views

How to trace a process to original user?

Say, on a Solaris server, user1 logs in, switches to someother user, say sruser, using su - and then starts a process of id X. And then another user user2 logs in, switches to sruser the same way and ...
1
vote
2answers
467 views

How can I disable /proc pseudo-filesystem on a shared Linux environment?

Is it possible to disable the /proc pseudo-filesystem to prevent w, ps, top, etc, from showing what other users are doing? Of course, I still want "everything else" to work correctly. Is there a ...
19
votes
3answers
793 views

Can other users view the arguments passed to a command?

If I invoke a command with arguments like so: bob@bob-pc:~$ command -arg1 -arg2 ...can other users view the arguments passed to the command?
28
votes
5answers
23k views

How to check how long a process has been running?

I would like to avoid doing this by launching the process from a monitoring app.
9
votes
2answers
5k views

Linux: Writing a watchdog to monitor multiple processes

A few years ago, a coworker came up with an elegant solution for a watchdog program. The program ran on Windows and used Windows Event objects to monitor the process handles (PID’s) of several ...
3
votes
2answers
725 views

Using top to see processes run by a user on behalf of sudo

If I run top -u username I will see all the processes by a particular user. Is there a way to also see all the processes that the user called via sudo?
3
votes
2answers
717 views

Questions on Linux kernel internals

I was reading "Linux device drivers, 3rd edition" and faced a few kernel items I don't quite understand. Hope gurus on this forum will help me out. Does the Linux kernel internally operate with ...
52
votes
3answers
27k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem ...
14
votes
3answers
14k views

How can I pause/resume rsync

How can I pause an rsync that's running? First time I did Ctrl+C to kill it and used the -P flag to run again. Is this prone to corrupt the current file transfer? Second time I simply put MacOS to ...
9
votes
3answers
16k views

Bash script to find and kill a process with certain arguments?

I want a script which kills the instance(s) of ssh which are run with the -D argument (setting up a local proxy). Manually, I do ps -A | grep -i ssh, look for the instance(s) with -D, and kill -9 ...
124
votes
12answers
74k views

What if 'kill -9' does not work?

I have a process I can't kill with kill -9 <pid>. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option.
4
votes
2answers
433 views

retrieving names of all open pdf files (in evince or otherwise)

I constantly have many PDF files open. These are usually downloaded using chrome and immediately opened using evince. I sometimes want to persist the state of all my open PDF files, so I could ...
1
vote
1answer
253 views

Release a port owned by third party application?

I have been consulted about any way to release a port owned by a third party application that is listening to it. Say the application uses sockets and is listening for an specific port the root now ...
2
votes
2answers
909 views

How can I make a process I start during an SSH session run after the session has ended? [duplicate]

Possible Duplicate: Keep SSH Sessions running after disconnection. I have a process which is basically a web-server, I start it during an SSH session. However, when I leave the session (by ...
13
votes
5answers
4k views

What process created this X11 window?

Given an X11 window ID, is there a way to find the ID of the process that created it? Of course this isn't always possible, for example if the window came over a TCP connection. For that case I'd ...
5
votes
3answers
556 views

Is it possible to support multiple processes without support for Virtual memory?

Is it possible to support multiple processes without support for virtual memory? I would like to know more about it if so.
4
votes
1answer
1k views

How do I tell a script to wait for a process to start accepting requests on a port?

I need a command that will wait for a process to start accepting requests on a specific port. Is there something in linux that does that? while (checkAlive -host localhost -port 13000 == false) ...
23
votes
5answers
34k views

How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
3
votes
3answers
2k views

Discovering the number of running and blocked processes in Mac OS X

In Linux, I could discover the number of running and blocked processes running grep "procs_running" /proc/stat and grep "procs_blocked" /proc/stat Is there a way to do it in Mac OS X? ...
12
votes
3answers
2k views

Can I limit a process to a certain amount of time / CPU cycles?

We have a script which runs on our web servers, triggered by customer action, which initiates a unix process to generate some cache files. Because this process acts upon files supplied by our ...
6
votes
2answers
188 views

How can I chase a program who is rising up my laptop's temperature?

After 40 days of non-upgrading I came back from a trip and I decided to dist-upgrade my Debian Sid box. Everything went fine but after rebooting I noticed that the temperature was 15°C over its ...
11
votes
4answers
3k views

After fork(), where does the child begin its execution?

I'm trying to learn UNIX programming and came across a question regarding fork(). I understand that fork() creates an identical process of the currently running process, but where does it start? For ...
19
votes
2answers
4k views

What is the difference between a job and a process?

What is the difference between a "job" and a "process"?
60
votes
8answers
21k views

How can I disown a running process and associate it to a new screen shell?

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back. One way I thought of doing that was to transfer its ownership to a screen shell, ...
53
votes
6answers
29k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
28
votes
4answers
48k views

How can I get a full process list in solaris, without truncated lines?

Is there a way to generate a full process listing in solaris, without truncated lines? I've tried the ps command, with the following arguments: -f Generates a full listing. ...
3
votes
2answers
383 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, I have a runaway ruby process - I know exactly how I trigger it. Point is, it got me thinking about runaway processes (CPU usage or memory usage). How would one ...
1
vote
1answer
261 views

Recording and charting boot process information in Linux

I need to write a command line tool that records the boot process information in Linux, and then renders it in a chart format (a textual chart would do). How do I programmatically obtain the this boot ...
2
votes
2answers
1k views

Killing a running process in an Ubuntu machine remotely from a windows machine which is in LAN

Is it possible to kill a process running in an Ubuntu machine from a Windows (XP) machine remotely connected via LAN? I can kill the process in a windows machine from a remote windows machine (in ...
5
votes
2answers
22k 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 ...
17
votes
4answers
4k views

How do I find out which processes are preventing unmounting of a device?

Sometimes, I would like to umount a usb device, but I get a drive is busy error. How do I find out which processes or programs are accessing the device?
7
votes
2answers
2k views

How to kill both process and subprocess?

I asked a question to know how to get multiple lines of message from Python's subprocess module. The problem is that in the course of testing, I had to kill the python process that runs gnuchess ...
5
votes
1answer
3k views

Execute Nohup command with input

In UNIX, I have a process that I want to run using nohup. However this process will at some point wait at a prompt where I have to enter yes or no for it to continue. So far, in UNIX I have been doing ...
12
votes
3answers
4k views

What would cause ps to report uid instead of username?

I have Eucalyptus installed on my Linux machine, and I've noticed that for processes owned by the eucalyptus user, ps reports the userid instead of the username. For example: $ sudo -i -u eucalyptus ...
4
votes
3answers
1k views

How do I get a mapping of Pid to Port?

I have a process which I need to run on a specific port. I have started some other process on that port and I need to kill it. Unfortunately, I don't remember the name/pid of the other process so I ...