A process is an instance of a computer program that is being executed.
3
votes
3answers
219 views
What's the best way to determine the working directory for UNIX process using 'ps'?
I am running a Ruby command line script (rufus.sh)which ultimately calls Thread.new, which spawns a UNIX process as shown below. I run this script for more than 1 directory as the output of the ps ...
3
votes
1answer
142 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 ...
10
votes
4answers
535 views
What is the difference between running a executable just by name and by appending a dot /slash before it?
This is the output from ls -all command :
-rwxr----- 1 subhrcho dba 3600 Nov 13 17:26 jdev
-rw-r----- 1 subhrcho dba 1566 Nov 13 17:26 jdev-Darwin.conf
-rw-r----- 1 subhrcho dba 347 Mar 6 2009 ...
0
votes
3answers
252 views
What is the difference between ps and top command?
What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?
-3
votes
2answers
353 views
Please explain this output of ps -ef command?
A part of the output from the ps -ef command is given below :
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 2012 ? 00:00:01 init [3]
root 2 ...
0
votes
0answers
26 views
How can I see a process' thread count? [duplicate]
Possible Duplicate:
Is there a way to see details of all the threads that a process has in Linux?
I want to see the thread count which belongs to a process in linux. What command should I ...
1
vote
3answers
195 views
What happens to suspended jobs in unix?
We can issue CTRL+Z to suspend any jobs in Unix and then later on bring them back to life using fg or bg. I want to understand what happens to those jobs that are suspended like this ? Are they ...
1
vote
1answer
68 views
Please explain the output from the jobs command
When I ran jobs command I see the following output :
[1] - Suspended ./startWebLogic.sh
[2] + Suspended (signal) top
What does -/+ indicate in the second column ?
...
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
69 views
Can I add to my groups in the current (shell) process?
If I add myself to a group, it applies only to newly launched processes. Actually it's more restricted than that; it seems to apply only to new logins. I'm not sure what the exact mechanism is, but ...
1
vote
1answer
73 views
How to ensure a process has started reading a file before continuing?
I'm trying to write a command to test that data is written to a file. My first approach was:
Start reading in the background.
Write some data to the file.
Wait for the reader to find a result.
...
3
votes
5answers
2k views
Drop Process Privileges
I have a process that gets started by a damon running as root, now I want to "downgrade" this process's privileges to those of your average user. Is this possible? If yes how?
PS: Running unix on a ...
1
vote
1answer
434 views
What is kondemand?
I have searched the web for the answer of this question but couldn't find a clear answer. Best answer I found was as follows:
kondemand is a kernel thread that belongs to the ondemand governor of
...
1
vote
2answers
102 views
How to view commandline of processes executed in last 10 seconds
Is there a view to log and list down the processes executed in last 10 seconds ?
I especially want to trace the command line.
2
votes
1answer
97 views
Can I transfer running process from dead ssh [duplicate]
Possible Duplicate:
How can I disown a running process and associate it to a new screen shell?
I have started (as expected) a long copy process from ssh shell (putty) which died due to ...
0
votes
0answers
96 views
Very large values for utime and stime for foo. Is foo still running?
I am running a program foo
It has been running for close to 30 days now (even more)
Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the ...
1
vote
1answer
87 views
Application in terminal still running but not directly accessible [duplicate]
Possible Duplicate:
How to suspend and bring a background process to foreground
I have kind of an odd problem which I haven't encountered before. Here's what I did:
I started an ...
1
vote
1answer
153 views
What's the difference between lsof and fuser -uvm
Both shows the number of files we're using.
Yet they both shows different results.
root@host [~]# lsof /home4
root@host [~]# lsof /home2
root@host [~]# lsof /home4
Then we got
fuser -uvm /home4
...
0
votes
1answer
83 views
What does m represents in VIRT column using TOP command
When we run top command it shows all the processes information. But under VIRT column there is m written against some values what does that m represents, is it MB . If yes then why it is only showing ...
1
vote
3answers
134 views
Killing all the process of a command except first process
I am sometimes stuck in a situation where a script/command kept in Cron runs more than once because of some reasons (the first instance is not completed fully, the second instance of the same process ...
4
votes
6answers
836 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 ...
3
votes
2answers
249 views
What is meant by stack in connection to a process?
From the book Advanced programming in the Unix environment I read the following line regarding threads in Unix like systems
All the threads within a process share the same address space, file
...
3
votes
1answer
126 views
How to know which commands are executed when I do something in GUI
This is for academic purpose. I want to know which commands are executed when we do something in GUI, for example creating a folder. I want to show that both the mkdir shell command and create folder ...
2
votes
1answer
111 views
Program stall under user but runs under root
I am running R job under a normal user john and root. Interestingly, the program stalls under john user but runs quickly under root. Using strace, I found that when john runs the R, the process stalls ...
9
votes
1answer
236 views
How do I monitor opened files of a process in realtime?
I know I can view the open files of a process using lsof at that moment in time on my Linux machine. However, a process can open, alter and close a file so quickly that I won't be able to see it when ...
1
vote
3answers
160 views
How to view output for ALL processes simultaneously?
I know that you can connect to various background processes to watch their console output, but is there a way to view the output of all processes at once? Likely it would scroll quickly and be hard to ...
2
votes
4answers
395 views
How to view the output of a running process in another bash session?
I have left a script running on a remote machine from when I was locally working at it. I can connect over SSH to the machine as the same user and see the script running in ps.
$ ps aux | grep ...
2
votes
1answer
272 views
What is the `ucond` process state?
When debugging a program I saw that top -U username showed the following:
39769 eigenein 107 98 0 179M 38448K ucond 19 0:00 0.00% program
What does it mean that a process in the ...
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 ?
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
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?
29
votes
4answers
12k 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 ...
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
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
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, ...
5
votes
4answers
959 views
Suspend/resume single process to/from disk
On occasion, we would like to suspend memory-intensive processes on our Ubuntu and OS X servers to temporarily free up some RAM for other jobs. If all we were worried about was CPU usage, a simple ...
18
votes
4answers
725 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
365 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
3answers
2k views
Why is apache2 showing up a defunct in the process list?
When I run top I see one line that doesn't look too good:
2475 www-data 20 0 0 0 0 Z 1 0.0 0:00.19 apache2 <defunct>
Why is this process <defunct> and what should I ...
11
votes
4answers
479 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 ...
1
vote
2answers
137 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 ...
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 ...
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
2answers
368 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?


