I have done plenty of STFW and some RTFM, but I cannot find a clear solution to my challenge
Goal:
My goal is to have a script(of any language, preferably shell/bash/anything that can run things on unix), which will kill specific unix terminal windows for me. Killing just the process itself does not satisfy my case requirements and nor does killing terminal on process end. Also running everything in one terminal is not the case.
Background:
I am working on a massive scale db-plugin tester. It spawns 2 new terminals per each db - one for db and one for app(app needs db specific settings) it's tested against. There is 35 dbs in the collection and therefore I am in danger of having 70 terminals hanging on my screen. The spawned terminals cannot automatically shutdown on process end - in case an error occurs and debugging will need to take place(those terminals contain vital logs). After my tester is done with one db and everything ends happily, it should proceed to the next db. It would be very useful if it could dispose of all the terminals that are no longer needed when it proceeds to the next db. In fact, I believe it is vital to be able to do it.
Details:
The command I use to spawn each new process looks like this:
Note there is plenty of shell commands before and after each spawn, i.e. init and cleanup operations
Any sort of clues is much appreciated. Also feel free to suggest any change in my design/code that could make my goal more realistic.
Thank you
@Update
Problem Solved!
Okay I finally have it figured out.
To all those with the same problem, look at
It spawns killable gnome-terminals with unique PIDs
Hi,
Do anybody experience to write a bash script in order to kill a specific process (java) after certain time of running?
eg.
java java.jar task_run.txt
I will run a java program (java.jar) which will run a long list of process (task_run.txt) one by one.
I plan to terminate the java... (5 Replies)
Good afternoon
I need to KILL a process in a single command sentence, for example:
kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'`
That sentence Kills the process ID corresponding to the program CAL255.4ge.
However it is possible that the same program... (6 Replies)
Hi,
I've a script which kills all process, but i need a script shell script(sh), where it'll kill process on that particular terminal. below is example
TY=`tty`
for P in $TY
do
`kill -9 $P 2>/dev/null`;
done
echo "test process killed"
break
... (3 Replies)
Hellooooooo ;)
Today I've created a script that does some things (not important).
And for fun I want that it kills the terminal from which I launch it. (too lazy to press Alt-F4 lol)
So I write
#!/bin/bash
kill $PPID
but it doesn't work ... while if in my xterm I launch another xterm... (8 Replies)
Hi
I have the process to kill regulary, but the PSID is dymatic change and not sure how to kill the specific process ID
Check the tradekast_rvd is running , if such process, kill the els process id
ps -e f |grep tradekast_rvd
ps -ef |grep els
then I kill els process id
... (2 Replies)
i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine.
then last week i wrote capture.sh and it... (2 Replies)
Hi,
I need to kill processes from a specific location for Linux, HP, AIX and Solaris.
My problem is to be able to identify the location of the running processes.
I've tried with a simple "ps -fu username | grep mylocation" but if the process command has been run directly from the location,... (2 Replies)
Good morning!
I am using a shell script to back up user email files to a remote location. The problem is, one (and apparently more than one) users have the symbol "@" in their password. As you can see from the line:
/sbin/mount_smbfs... (5 Replies)
I have a application ID and many users in the team are using this id. I dont want the people to check whati am running with the id from my terminal. is there a way to kill history get back from my console to everybody so thatwhat ever i type in my console cant be seen from other users who are... (5 Replies)