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

learn more… | top users | synonyms (1)

1
vote
1answer
244 views

List of killed processes HP-UX

Is there a file similar to the one in this answer http://unix.stackexchange.com/a/10078/5027 to determine the processes which were killed, in a certain time, for example, yesterday, in HP-UX?
1
vote
1answer
243 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 ...
6
votes
4answers
1k views

How do I start a process with a nice value of -20 and not give it root privilege?

I would like to start a process with a nice value of -20. This requires me to use a command like - sudo nice -n -20 matlab. However, this starts matlab as root too. Is there a way to have matlab as ...
0
votes
0answers
31 views

Pass process ownership to another shell [duplicate]

I didn't hear of anything like this, but It might be possible. I often end up starting a process on a server and midway realizing that I would like to suspend that process and continue it inside a ...
1
vote
1answer
134 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
78 views

Tracking which files are used by program

I am looking for a way to track which files are used by program installer(InstallAnywhere). I cannot use lsof because as far as I know it works on active processes and I want a tool which will work ...
1
vote
2answers
243 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
4k 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 ...
2
votes
2answers
178 views

End process from another SSH window

I forgot to use screen and I have a task that has been running for quite some time, and I do not want to lose the saved data. Basically Ctrlc will end the task and save the data if I am on the same ...
0
votes
1answer
192 views

Move terminal emulator process from xorg to tty? [duplicate]

Is it possible (and if so, how?) to move a process from a terminal emulator running in X to a different virtual terminal, so that I can restart the X server without killing the process running in the ...
1
vote
2answers
808 views

How to watch pgrep?

When running a pgrep command with watch it does not only show the actual pgrep output, but also the watch process as well. Example: watch pgrep -lf donothing will show 3 processes, although ...
3
votes
2answers
298 views

Where is the virtual memory stored on hard drive?

If a process wants to access a memory address that is not in physical memory, the OS outsources a page frame from physical memory to the hard drive for later use. Where on the hard drive is this data ...
11
votes
4answers
2k views

Block network access of a process?

Is it possible to block the (outgoing) network access of a single process?
3
votes
5answers
3k views

kill a group of processes with negative PID

kill -TERM -PID is supposed to kill PID and all its child processes. but this doesn't work on openSUSE, it always tell me that no such process -PID no matter what PID i use. So if the negative PID ...
1
vote
2answers
2k views

How to know if a background job is finished?

I invoke a script (do_something) in background via another script (do_manythings) as below. nohup do_something & How would I know in the parent script (do_manythings) that the job invoked ...
1
vote
2answers
419 views

Invoke a command/script disconnected from the controlling terminal?

I'm investigating the behaviour of a script that is normally run as an automated process (e.g. cron, Jenkins). The script can (eventually) invoke commands that behave differently (seeking user input) ...
11
votes
3answers
14k views

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a ...
1
vote
1answer
122 views

What rules govern the parent-child relationship of processes launched by shell across a pipe?

#!/bin/ksh # start_service: start the service my_server_executable 2>&1 | my_pipe_following_shell_script & exit 0 After I run the above start_service script from command line, it is ...
3
votes
3answers
967 views

What after exec() in ls command. Is the parent process printing the output to the console or the child?

I have a simple doubt on execution of the command ls. As per my understanding from the research I have done on the internet, I understood the below points. When we type ls command shell interprets ...
11
votes
4answers
493 views

Is there a top-like command that shows the network bandwidths and file accesses of running processes

For example, we'd like to see: PROCESS IF TX RX FILE(regular) R/W prog1 eth0 200kB/s 12kB/s -- -- wlan0 12kB/s 100kB/s -- ...
7
votes
3answers
935 views

Elegantly get list of descendant processes

I would like to get a list of all the processes that descend (e.g. children, grand-children, etc) from $pid. This is the simplest way I've come up with: pstree -p $pid | tr "\n" " " |sed "s/[^0-9]/ ...
4
votes
1answer
4k views

Linux : See CPU usage by a process for the last second

vmstat 1 Above will print virtual memory statistics each seconds. It will also show the CPU utilization for last second. I have a web server at hand which runs httpd and MySQL. I need to find how ...
5
votes
1answer
3k views

Elegantly get list of children processes

I would like to get a list of all the processes whose parent is $pid. This is the simplest way I've come up with: pstree -p $pid | tr "\n" " " |sed "s/[^0-9]/ /g" |sed "s/\s\s*/ /g" Is there any ...
3
votes
1answer
3k views

What does kill 0 do actually?

In the man page, it says: kill [ -s signal | -p ] [ -a ] [ -- ] pid ... pid... Specify the list of processes that kill should signal. Each pid can be one of five things: 0 All ...
1
vote
2answers
848 views

multiple background processes in a script

Suppose if i have a situation in which some files need to be copied and it takes long time so i would have to go for parallel processing of the file copy. for example it may look like this for i in ...
4
votes
4answers
5k views

Running multiple nohup commands in background

Got two commands cmd1 and cmd2. Of the two, cmd2 takes longer to finish. Need to run cmd2 and then cmd1. Tried to run them in following way: bash$ (nohup ./cmd2>result2 &) && nohup ...
2
votes
3answers
1k views

Why does Firefox refuse to die despite killing it with pkill -9?

I am issuing the following command to kill Firefox on my Red Hat Linux box: [subhrcho@slc04lyo ~]$ pkill -9 -f firefox [subhrcho@slc04lyo ~]$ However, when I try to invoke Firefox through ...
0
votes
2answers
156 views

Which process updates /proc/scsi/scsi?

I wrote C that displays info about my hardware on ubuntu. Now I wonder how I can make it more flexible such as querying the hardware directly instead of the file the os updates. So I think I can look ...
19
votes
1answer
1k 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
131 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 ...
7
votes
1answer
497 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?
3
votes
4answers
528 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 ...
15
votes
2answers
519 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
88 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 ...
12
votes
2answers
2k 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 ...
4
votes
2answers
4k 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 ...
1
vote
3answers
5k 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 ...
5
votes
3answers
2k 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
392 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 ...
6
votes
1answer
367 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
98 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
426 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 ...
4
votes
2answers
988 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
146 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
457 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 ...
6
votes
3answers
250 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?
3
votes
2answers
924 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 ...
5
votes
1answer
2k 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
295 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 ...
4
votes
1answer
502 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 ...