A process is an instance of a computer program that is being executed.
3
votes
2answers
99 views
What does the term static variable mean in unix speak?
From the section 2.7 of the book - The Linux programing Interface named Process memory layout :
Data is defined as the
static variables used by the program.
What is the significance of the word ...
2
votes
2answers
89 views
What does d signify in processes like syslogd and httpd?
Why there is a "d" after the name of processes like syslogd and httpd ? What is its significance ?
1
vote
3answers
281 views
How does the set-user-ID mechanism work in Unix?
Can someone please explain the set-user-ID mechanism in Unix ? What was the rationale behind this design decision? How is it different from effective user id mechanism ?
1
vote
3answers
177 views
I want to kill all processes that result from the following command
The following command will display all the PID's running for vmstat1:
ps -ef | grep "vmstat 1" | awk '{ print $2 }'
My question is, how do I kill them all, if there's like 20 of them at once?
0
votes
2answers
133 views
receiving command as a parameter in bash
I have a following simple script called single-instance that executes the given command if there is no process under that command running. If I hard-code the command after the else statement, it has ...
1
vote
2answers
81 views
What's the mechanism that a process listening to localhost refuses to process a request to its LAN IP address?
The private IP address of my machine is 192.168.44.182. If I started a process using
nc -l localhost 20000
Then this process won't handle requests sent to 192.168.44.182.
Since the process ...
2
votes
1answer
71 views
vim not shown in fuser
First use Vim to edit a file, say /tmp/A.
Assuming that vim process is the only one that accesses /tmp/A, then use "ctrl+z" to suspend the process, and execute
fuser /tmp/A
Then you see nothing ...
11
votes
4answers
351 views
How can I find which process sends data to a specific port?
I have a service, keeping a certain port open.
I'm getting data to it, that I neither expect nor want to get, and I'm trying to pin-point the source of this data. So how can I find which process that ...
1
vote
0answers
36 views
Modify environment variable in a running process [duplicate]
Possible Duplicate:
change environment of a running process
Is there a trick to modify an environment variable in a running process?
I need to add a repository at the end of PATH. I have ...
2
votes
1answer
50 views
remotely query text file associated with an instance of vi
I have opened several text files (a.txt, b.txt, c.txt, ...) in different sessions of vi launched from different instances of a bash shell. Having then accessed that machine remotely, I wish to ...
0
votes
2answers
333 views
Get PID of a function executed in the background
#!/bin/bash
function abc() # wait for some event to happen, can be terminated by other process
{
sleep 3333
}
echo "PID: $$"
abc &
echo "PID: $$"
I need to retrieve the pid of this function, ...
18
votes
4answers
726 views
What's the difference between running a program as a daemon and forking it into background with '&'?
What are the practical differences from a sysadmin point of view when deploying services on a unix based system?
2
votes
1answer
366 views
Stuck process: is it a bad sign?
Sometimes a few process are in a stuck state. For example:
PID COMMAND %CPU TIME #TH #WQ #POR #MREGS RPRVT RSHRD RSIZE VPRVT VSIZE PGRP PPID STATE
99357 plugin-container ...
3
votes
3answers
316 views
What process is sending TCP SYNs on Solaris 10?
Some process on my Solaris 10 machine is sending TCP SYNs to a remote machine. The remote machine never responds, so the connection is not established. How do I find out what process is initiating ...
1
vote
2answers
141 views
How to run linux process and come back to it later?
I'm trying to run a minecraft server on linux. Running the server starts an important interactive session. I can run the server in the background by appending & at the end of the command and log ...
1
vote
2answers
138 views
How to stop a infinite running process (ztail) started by a ssh session after that session is closed
I have a peculiar problem. My server supports multiple ssh session simultaneously, so that multiple admins can manage (via command line interface) it simultaneously. We have a command which calls ...
11
votes
4answers
480 views
Is there a program that can send me a notification e-mail when a process finishes?
I am a computational scientist, and I run a lot of lengthy calculations on Linux. Specifically, I run molecular dynamics (MD) simulations using the GROMACS package. These simulations can take days ...
2
votes
3answers
245 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 ...
3
votes
3answers
141 views
“Virtual” shell, ie. jailing an user inside a process
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
66 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 ...
1
vote
2answers
369 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
213 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
210 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
863 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
103 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
230 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
356 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 ...
4
votes
1answer
175 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 ...
4
votes
6answers
838 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
130 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 ...
4
votes
3answers
228 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
311 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
97 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 ...
4
votes
3answers
292 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
505 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.
0
votes
1answer
178 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?
3
votes
1answer
521 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, ...
0
votes
0answers
107 views
Unable to use SIP over VPN, how to find out why
I am doing a VPN access using openvpn utility to connect to my private network. However I cannot use my SIP soft-phone service (which uses a private domain) even if I am connected to that private ...
3
votes
3answers
179 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 ...
0
votes
1answer
928 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 ...
2
votes
1answer
235 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 ...
1
vote
1answer
219 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
89 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
92 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
151 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
0answers
395 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 ...
3
votes
1answer
944 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 ...
9
votes
3answers
227 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?
3
votes
2answers
274 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
181 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
...