All Questions
19 questions
1
vote
0
answers
376
views
what does 0 link means in bash file descriptor?
Each process uses a set of open files in linux . Now bash ( a shell ) is also a process which uses different file descriptor for standard input output.
If I find some file descriptors :
ls -l /proc/$$/...
0
votes
0
answers
273
views
How to detect which process accesses a file?
I'm trying to reword this question: Is it possible to monitor which process accesses a given file/directory (on a Linux system)?
Background: on a regular basis I'm detecting file access to a certain ...
0
votes
1
answer
2k
views
Why Unix child processes inherit [most] parent process attributes
Learning about how Unix processes work, and noticed that child processes inherit most of the attributes (including file descriptors) from the parent process. I also just learned about exec and how it ...
13
votes
3
answers
7k
views
How to find ancestor chain of a process?
I can do ps -o "pid,ppid,args" -p my_pid to find the parent of my_pid.
I can continue ps -o "pid,ppid,args" -p previously_found_ppid in a loop until get to ppid=1.
However, I bet, there is a single ...
0
votes
1
answer
952
views
How to stop and continue the process
I used
ps -fT pid
to manage a bunch of process forked from the specified pid.
Now I want to modify some settings so I want to stop the processes whose pid is in ps -fT pid. After the modification I ...
1
vote
3
answers
2k
views
Running a script where you append the errors to file and use nohup
The script works!
First I type this in my CLI: php worker.php >>/home/xxx/log 2>&1
Then, I want it to run as its own process or whatever, so I add an & at the end, like this: php ...
359
votes
11
answers
800k
views
If I know the PID number of a process, how can I get its name?
If I have the PID number for a process (on a UNIX machine), how can I find out the name of its associated process?
What do I have to do?
0
votes
1
answer
60
views
Create a logging program
I want to create a program that logs all the processes started by the user and confirms after they are started. I don't want to log all the syscalls and other daemon processes. I have initially ...
20
votes
4
answers
20k
views
What does kill 0 do actually?
In the man page, it says:
0 All processes in the current process group are signaled
And I tried like this:
$ man kill &
[1] 15247
$
[1]+ Stopped man kill
$ kill ...
8
votes
2
answers
43k
views
kill - no process found
when I list my processes I have:
root@adam-ThinkPad-T410:~# ps -e | grep signals
11641 pts/0 00:00:00 signals
11642 pts/0 00:00:00 signals
11643 pts/0 00:00:00 signals
but when I ...
5
votes
1
answer
5k
views
What is session leader in `ps ax`
See the command bellow
# ps ax | grep bitlbee
2271 ? Ss 0:00 /usr/bin/bitlbee -s mysql -c /root/config.conf
3930 ? S 0:00 /usr/bin/bitlbee -s mysql -c /root/config.conf
See ...
0
votes
1
answer
790
views
What is a child process?
I have an error in my error logs that I am trying to figure out but I don't know what to be looking for when it says Child Process.
I understand that its a process done by a parent, but that's an ...
137
votes
4
answers
238k
views
What is effect of CTRL + Z on a unix\Linux application
I was curious and confused that what exactly is the behaviour of ctrl+z.
I know, If a process in running in foreground, and we press ctrl+z, it goes to background.
But what exactly happens?. Does it ...
0
votes
2
answers
901
views
Daemon <||> Process control differences
With respect to this excellent post:
https://stackoverflow.com/questions/958249/whats-the-difference-between-nohup-and-a-daemon
I would like to ask the following:
After launching an application ...
71
votes
15
answers
150k
views
ps: How can i recursively get all child process for a given pid
How can I get the entire process tree spawned by a given process displayed as a tree and only that tree i.e. no other processes?
The output could e.g. look like
4378 ? Ss 0:10 SCREEN
...
2
votes
2
answers
3k
views
How does 'strace' work?
Recently, I was using mv to move a large amount of files from my hard drive to a flash drive. I forgot to add a verbose flag so I had no idea "where" the move was at and how many transfers remained.
...
1
vote
3
answers
12k
views
Monitor average CPU usage and RAM usage on one process linux
Is there any way to monitor one process' CPU usage and RAM usage over time on linux? I am trying to change to a cheaper VPS and need to work out what level of CPU and RAM I need!
51
votes
4
answers
73k
views
How do you find the parent process of a zombie process?
How do you find the parent process of zombie processes?
When the child process is something where the parent is not entirely obvious...
Is there some way to list processes in tree format or ...
3
votes
3
answers
3k
views
how to stop bash from printing alerts?
When killing a process with kill -9 $PID &>/dev/null in a script, a message is still printed to the terminal after the next command terminates. How do you stop this behaviour?
For example
...