1
vote
1answer
34 views

How to find out process that uses file but is not using at the moment?

Background I, as well as many other people according to Apple's support forums, am having some trouble with the audio settings on my Mac. Whenever the computer sleeps or powers off, the audio resets ...
2
votes
2answers
89 views

java app running in screen starts a process and this child is NOT in screen

I'm running a spigot server in screen, it is a java app. When it crashes and goes down gracefully it calls a restart script as a last action. This script simply contains a java -jar spigot.jar. The ...
1
vote
0answers
19 views

Reusing _kill completion in .bashrc fails

I'm trying to extend bash completion alias perf-connect-process="perf record -p"; alias pperf=perf-connect-process; complete -F _kill perf-connect-process; complete -F _kill pperf; by reusing the ...
0
votes
1answer
67 views

How to name a process for command and kill it later by name?

I need to make a short aux bash script to clear the logcat buffer and output afterwards in a file (new process). The problem is that at every run I need to kill the previous process which dumps in ...
0
votes
1answer
46 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 ...
7
votes
2answers
408 views

How can I determine if an application is not responding?

I have an application on OSX that repeatedly goes into a Not Responding state and has to be force killed. I was hoping to automate it, but when inspecting the process with ps I don't see anything ...
3
votes
1answer
364 views

Does “ulimit -Su” limit the number of user processes created in interactive login subshells and tmux sessions created therein?

A few months ago, I wrote a set of bash scripts utilizing tmux to create a simple IDE on an AIX 7.1 server. There is a bug in one of my scripts that will sometimes generate user processes very rapidly ...
0
votes
2answers
985 views

Bash processes - reattach process started in background

Is there a way to reattach to a specific terminal a process that was started from terminal with &? For instance, I started Kate by: kate & and now I want to reattach the process to a given ...
3
votes
1answer
518 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 ...
0
votes
2answers
192 views

Start java process with different names?

I have 2 eclipse and 2 servers running If i make a ps -C java i see something like: 2460 pts/1 00:03:08 java 2908 pts/3 00:00:05 java 3045 pts/4 00:00:17 java 3284 pts/3 00:01:40 java ...
2
votes
1answer
308 views

Is it possible to kill a loop in bash without killing the instance of bash running the loop?

Suppose I execute (in an interactive bash shell) a loop that spawns a bunch of processes in sequence, such as the following. for i in `seq 15 42`; do if [ -f F$i.flv.mp3 ]; then play F$i.flv.mp3; fi; ...
0
votes
2answers
924 views

Find pid of a certain ssh instance

There can be more than one instance of ssh running: $ ps aux | grep ssh cpn 6098 0.0 0.0 58196 2032 ? S 10:08 0:01 ssh cz -nNCTR 5433:localhost4:5432 root 6313 0.0 0.0 ...
2
votes
3answers
1k views

What's a reliable technique for killing background processes on script termination?

I use shell scripts to react to system events and update status displays in my window manager. For example, one script determines the current wifi status by listenining to multiple sources: ...
1
vote
2answers
415 views

Interfacing strace with Process Name instead of PID

How do I implement a wrapper script pstrace in bash that changes the interface of [sudo] strace -c -p [PID] to [sudo] pstrace -c -p [PROCESS-NAME] similar to how killall [PROCESS-NAME] is ...
3
votes
1answer
700 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 ...
1
vote
0answers
45 views

Is this a bug in top?

This command line: top -l 3 -n 10 -o "vprvt" For some reason there are two processes that consistently creep up in the second sample's output regardless of their actual VPRVT size, and they do not ...
6
votes
3answers
5k views

How to automatically restart a linux background process if it fails?

I have a process which is executed by init.d script on the background. Eg: case "$1" in start) /bin/myprocess & stop) killall myprocess restart) killall ...
0
votes
2answers
452 views

Daemon <||> Process control differences

With respect to this excellent post: http://stackoverflow.com/questions/958249/whats-the-difference-between-nohup-and-a-daemon I would like to ask the following: After launching an application from ...
4
votes
4answers
9k views

bash process uses 90% CPU, comes back on computer restart

I’ve replaced the old HDD of my late 2008 unibody MacBook (8 GB of RAM, running OS X 10.7.4) with an OCZ Vertex 3 SSD. After doing this, I've installed Lion and restored my data from a Time Machine ...
2
votes
1answer
621 views

What does 'select processes without controlling ttys' mean?

For the following command: ps x What does x achieve? The documentation specifies 'select processes without controlling ttys' but I don't understand what this means.
2
votes
1answer
70 views

How to only show new processes in Activity Monitor?

Is there any way to make Activity Monitor only show new processes? Can you do this in Terminal instead?
2
votes
3answers
270 views

How to suspend bash within bash

Is it possible to suspend a bash that was invoked by another bash? For example, if I use su to become a different user but want to switch back to my own user for a moment. For another example, in an ...
1
vote
1answer
147 views

Quitting dozens of the same process in OS X Terminal

Whenever I'm testing a python class I'm working on, I initiate and re-initiate python a lot to refresh the updates I make to the code. When I close the Terminal window later, I get a window that says ...
0
votes
2answers
821 views

Trying to kill processes by name, but remains one..why?

I'm trying to kill all my mysqld process. But remains one, why? javier@javier-mbp:~$ ps aux | grep mysqld root 913 0.0 0.0 4220 704 ? S 16:11 0:00 /bin/sh ...
7
votes
2answers
3k views

What is cmd's equivalent to Bash's & (ampersand) for running a command without waiting for it to terminate?

In bash: java -jar jarfile1.jar & java -jar jarfile2.jar & The ampersand lets you launch the first program, and then do another one while the first is still running. How do I do this in ...
1
vote
2answers
150 views

Can the interactivity of a process be determined programmatically?

Is it possible to determine whether or not a given running process is interactive or merely daemon-like (i.e. an actual daemon, or a tail -f, or similar) using scripting or any other language? If so, ...
5
votes
1answer
4k views

Getting “-bash: fork: Resource temporarily unavailable” in OSX

I seem to run into problems with the max. number of processes every so often. Anyone know what is best practice for fixing this? Running OSX 10.6 on a MacBook Pro i7. ulimit -a returns these values: ...
0
votes
1answer
127 views

Make background jobs available in parent shell

Sometimes I start several processes by using another script (in my case Ruby). I call this script from a terminal running bash. I would like to start those processes in the script in the background ...
1
vote
2answers
1k views

Background process and SIGHUP

My understanding is that a program that is associated with a BASH terminal will receive the SIGHUP signal if that terminal is closed. This usually will terminate the program. I also know that you ...
3
votes
2answers
2k views

Process not Listed by PS or in /proc/

I'm trying to figure out how to operate a rather large Java program, 'prog'. If I go to its /bin/ dir and configure its setenv.sh and prog.sh to use local directories and my current user account. Then ...
9
votes
1answer
2k views

Leave bash script running on remote terminal while not logged in?

I have a bash script that takes several hours to run. While it's running, I would like to do other things, which may involve logging out or disconnecting from the internet (my script runs network ...
2
votes
3answers
1k 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 ...
1
vote
2answers
564 views

kill process but fail

I am running a bash script as a background job. The bash script calls a time-consuming executable. If I am not wrong, the running of the bash script is the parent process and the running of the ...
2
votes
3answers
1k views

Starting a bash background process on OS X

I’m using a modification of Paul Biggar’s LaTeX build system. The core of this system is just a bash script that executes an infinite loop. The question is, how do I run this script? At the moment I ...
23
votes
4answers
2k views

Difference between “a=b” and “export a=b” in bash

What's the difference between: a=b and export a=b In bash? I understand that they both define environment variables, but I don't fully understand the difference.