I am trying to capture process id of a process which has been started through the execution of a shell script
above is the simple script file called swings.sh
When i execute swings.sh , script internally creates another java process.
I need the process id of the newly created java process and not the process id of the shell script.
Actually when i execute shell script, java process does not return until the java application is closed thru the application's exit button.so the command next to " java -cp ${CLASSPATH} Sample " does not get executed until the invoked java process is closed thru application's exit button.
In this case how can i get the process id of the java process simultaneoulsy when executing the shell script. (something like... java process should be daemon process and next line should be executed once the java process is started)
Suppose if i execute following command alone independently after running the above script without the last line in a different console , I get the process id of the newly created java process.
My requirement is to execute shell script as well as get the process id of the java process on a single run of the shell script.
Kindly shed some light on getting the process id of the java process when executing the script.
I am storing this PID in another file for the very reason ,when java application hangs up, sometimes even after pressing ctrl+C, the process is not exiting
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues:
1. Monitor all Processes parallelly.... (5 Replies)
Hi All,
I was out not working on unix from quite sometime and came back recently. I would really appreciate a help on one of the issue I am facing....
I am trying to kick off the CodeNameProcess.sh in PARALLEL for all the available codes. The script runs fine in parallel.
Let say there are... (1 Reply)
I have two set of questions.
1) To skip killing some process automatically.
2) To kill other process and capture their log.
I have set of process, some needs to be killed gracefully and others should be skipped.
Listed are the process.
adm 1522... (1 Reply)
Hi,
I'm gonna launch a process from my 'C' code. I'm gonna launch it a few times. I would like to capture the PID of that process each time I launch. I have to copy the each PIDs into a 'C' variable and I have to kill all of them when I exit from the 'C' code.
My requirement is
int... (3 Replies)
Hi,
I just wonder I need to write a script where I can check if a particular process is consuming X amount of CPU. I was thinking of using the ps command but doesn't seems to work. Any ideas. Thanks. (2 Replies)
i'm looking to have my script capture it's own process name while running.
i'm going to use this in the output of the script to track which script produced which output file(s).
when i run:
ps -ef | grep processname
i only get as results a ps -ef listing for the grep inside my... (6 Replies)
Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it
This is how we execute the script (and this is the requirement) ... (2 Replies)
Guys
we all know what command 'COLUMNS=2047 /usr/bin/ps –eo pid,ppid,uid,user,args' does.It prints 5-column output for the running processes on a AIX box.
Here is simple thing i need:
I need to insert this tabular data in a db2 table.
How do i need?
I have created table with these five... (0 Replies)
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted.
Thanks in advance
Regards,
pradeep kulkarni.
:mad: (13 Replies)
I am newbie to unix shells world.
I am trying to capture a background process id into a file so that it can be killed later.
this process is basically a java program running in background as:
java TestApp &
this returning process id immediately. So how can i redirect that pid into a file.... (1 Reply)