Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
12 votes
5 answers
13k views

Why a fork is often followed by an exec?

Why "a fork is often followed by an exec"? Can't you just create a new process in UNIX?
alexander.sivak's user avatar
0 votes
1 answer
231 views

See htop tree evolve in slow-motion

Using htop and its tree view (trigger by t or F5) one can see processes by parenthood, and layout the relations between them as a tree. Is there a way to see how the process tree evolves in slow ...
Michael's user avatar
  • 103
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/$$/...
vikram singh's user avatar
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 ...
frans's user avatar
  • 1,139
2 votes
0 answers
1k views

Multiple Processes listening on Port 22? How is this possible?

I have a Solaris 10 Server that has SSH enabled, I wanted to find out which specific process is responsible for opening the socket that listens for the port 22. I used the PFiles utility to loop over ...
EvilSapphire's user avatar
0 votes
0 answers
234 views

Why Solaris Message Queue Getting Full?

I am using below Solaris operating system - uname -a SunOS dcapp 5.11 11.3 sun4v sparc sun4v. I have created 3 message queues here. Suppose message queue names are AAA ( process a) BBB ( process ...
Prasad Jayathilake's user avatar
0 votes
1 answer
71 views

How to scan/log already running processes on Unix

you can use ps to list running processes, but I would like to know if there is a way to inspect the running processes to any level of detail. for example, maybe there is a way to see every assembly ...
user10869858's user avatar
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 ...
user avatar
-2 votes
1 answer
2k views

What is the difference between a Service and a Process? [duplicate]

From a unix admin standpoint what is the difference please between those terminologies : Service, Process, Thread, Task, Job, Daemon ?
sasuke_X220's user avatar
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 ...
Michael's user avatar
  • 347
1 vote
1 answer
347 views

Recall Disowned Process Mac

I'm doing some neural network training and my process needed to run for about 20 hours. Following some bad advice elsewhere I disowned my process to keep it running when I put my macbook air to sleep. ...
theideasmith's user avatar
4 votes
1 answer
235 views

What happens when I try to use kill with a process id inferior to -1?

I’m studying for an exam and I’m not sure at all about what happens if I use kill with a pid < -1. Am I allowed to end processes of a group in which I’m not included? Which processes are ...
alberto's user avatar
  • 327
1 vote
1 answer
82 views

Why the process of sleep command is always in sleep status?

Why the process of sleep command is always in sleep status ? Sleep status means waiting for I/O right ?
faressoft's user avatar
  • 413
0 votes
0 answers
165 views

Why creating a process is a two-step process (fork-exec)?

I'm studying Tanenbaum's "Modern Operating Systems" book and he's explaining that: The reason for this two-step process is to allow the child to manipulate its file descriptors after the fork but ...
ddmichael's user avatar
  • 387
5 votes
1 answer
2k views

The OSX Process that won't die

I've got a process on OSX 10.9.5 that just won't die. I have tried kill PID kill -9 PID sudo kill -9 PID killall sshfs killall -9 sshfs sudo killall -9 sshfs Activity monitor / select process / Force ...
David Waters's user avatar
0 votes
1 answer
51 views

Create a new process and make it use more than 10% CPU?

Really odd question I know. It's to help demonstrate my university coursework. I'm going to be killing processes that are using more than 10% of the CPU.
ritch's user avatar
  • 103
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 ...
Marcus Thornton's user avatar
11 votes
2 answers
21k views

How to get list of all child process spawned by a script

Context: Users provide me their custom scripts to run. These scripts can be of any sort like scripts to start multiple GUI programs, backend services. I have no control over how the scripts are ...
irraju's user avatar
  • 221
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 ...
Johannes's user avatar
  • 277
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?
AndreaNobili's user avatar
  • 7,261
2 votes
2 answers
133 views

Monitoring a process

I'm reading documentation on supervisor, and it quotes: It’s often difficult to get accurate up/down status on processes on UNIX. Pidfiles often lie. Supervisord starts processes as ...
Trent Gm's user avatar
  • 260
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 ...
quick-'s user avatar
  • 1
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 ...
Firegun's user avatar
  • 313
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 ...
xwhyz's user avatar
  • 181
4 votes
1 answer
451 views

Stop wget but allow convert-links

I'm running a wget command with a rather deep recursion depth. The deep recursion depth is needed to get the files I want, but I don't want to wait for the operation to complete. I see that I can ...
lmat - Reinstate Monica's user avatar
1 vote
2 answers
971 views

Kill a process in Unix

When I execute theps -fea | grep ssh-agent command, I get the following output: tomcat 29057 14086 0 Jan 09 ? 0:00 ssh-agent oracle 1964 14086 0 Nov 26 ? 0:00 ssh-...
japuentem's user avatar
  • 119
3 votes
2 answers
5k views

flag to 'ps' command that can filter on arguments?

I know the argument "-C" which can filter on the command. But in my scenario I may have some processes with the same process name and different args. How to filter on these args? (I know I could ...
knocte's user avatar
  • 6,211
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 ...
Shiplu Mokaddim's user avatar
2 votes
4 answers
591 views

Does running the 'find' command fork a new process?

When I type find in unix a shell, is a new process created (to handle the find operation) or not? And why?
user avatar
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 ...
user avatar
2 votes
1 answer
2k views

Why is process not being displayed by TOP

I am running a Mathematica script (this question probably doesn't fit in Mathematica.SE however) and I know that it generally takes up a lot of RAM and loads up my cores. However, althought pgrep ...
dearN's user avatar
  • 211
0 votes
1 answer
323 views

My sleeping process accepts TCP connections?

After sending the STOP signal to a process, it stops working as expected, but still accepts TCP connections. So is it working anyhow?
Holy Sheet's user avatar
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 ...
Kumar Alok's user avatar
  • 1,653
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 ...
stratis's user avatar
  • 159
13 votes
5 answers
58k views

How to find and stop a process on a Mac

How can I find the process id and stop the process that is running on port 8080 on a Mac? On Ubuntu this works: ps -aux and I can find the process and run: kill -9 pid ps -aux didn't seem to work,...
codecompleting's user avatar
3 votes
1 answer
688 views

Child processes remain after quitting screen

I'm seeing some strange screen behavior on OSX. When I quit screen, child processes are not killed. $ screen $ tail -f (or some long running process inside screen) Then, I kill the current screen ...
joepestro's user avatar
17 votes
3 answers
38k views

What is the main purpose of the swapper process in Unix?

What is the main purpose of the swapper process in Unix? Swapper process has the PID 0 and I guess it is the first process that loads. Can anyone throw more light on this topic?
Gaara's user avatar
  • 351
1 vote
1 answer
148 views

Why does Unix deliver signals this way?

In Unix, when signals are posted, and the receiving process is running more than one thread, at first a thread is chosen to carry out the signal handling routine. I don't understand why that is ...
wnrph's user avatar
  • 3,695
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 ...
kynan's user avatar
  • 3,566
1 vote
1 answer
509 views

Getting the name of the previous process

I'm trying to generate notifications when certain commands finish execution. I'm trying to use xmessage or notify-send to generate this notification. Right now, I'm trying it this way: command; ...
Utkarsh Sinha's user avatar
112 votes
16 answers
114k views

How can I trigger a notification when a job/process ends?

The place I work at has commands that take a long time to execute. Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a ...
Utkarsh Sinha's user avatar
10 votes
2 answers
8k views

What's the Unix command-line symbol for "the PID of the last suspended process"?

In an interactive console like irb, sometimes something will go wrong and the console becomes unresponsive. One solution is to suspend the process, then kill it. To suspend the process, I can press ...
Nathan Long's user avatar
  • 27.1k
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. ...
nopcorn's user avatar
  • 16.9k
0 votes
1 answer
482 views

How to identify whether a process is hanging?

In unix, if we see that some process is utilizing more cpu time, then how to identify if that process is hanging or not?
user avatar
8 votes
2 answers
12k views

Auto-restart process on crash [duplicate]

I have a Java server process which runs native code and the possibility of the entire process crashing due to a problem in native code is always there. Is there any mechanism offered by *nix operating ...
sasuke's user avatar
  • 453
56 votes
8 answers
68k views

How to run commands as in a queue

I need to do a lot of copying of various files to various folders. I can add all my copy commands to a bash script and then run that, but then I must wait until it finishes if I want to add more ...
Svish's user avatar
  • 40.6k
8 votes
3 answers
8k views

How to find which Tmux session a process belongs to?

Case in point is editing a configuration file in vim and inadvertently leaving it open. Then you go about your business, switch around in different Tmux sessions, eventually edit the same file from ...
lkraav's user avatar
  • 1,279
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!
Pez Cuckow's user avatar
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 ...
Jack's user avatar
  • 2,001
52 votes
1 answer
118k views

In UNIX, what are the Ss, Sl, and Ssl proccess types I see with ps aux?

When doing a ps aux command, I see some process listed as Ss, Ssl and Sl. What do these mean? root 24653 0.0 0.0 2256 8 ? Ss Apr12 0:00 /bin/bash -c /usr/bin/python /var/...
JiminyCricket's user avatar