Why do you want iostat to continue running on the server? You are redirecting its output to a file?
In the script you can try:
#===================================
nohup iostat 1 100 1>> "iostat_output.log" 2> "iostat_output.log"
#===================================
The two arguments for iostat are:
1 number of seconds between each measure
100 number of times to measure
But be careful, if you run it twice and the first time has not yet finished, the log file will be a mess.
Regards.
---------- Post updated at 11:28 ---------- Previous update was at 11:27 ----------
Ops! An error, the line can be:
In the script you can try:
#===================================
nohup iostat 1 100 1>> "iostat_output.log" 2> "iostat_output.log" &
#===================================
no im still having the same problem....i still have to press ctrl c on client server to quit.....or it quits automatically when i kill iostat on server
---------- Post updated at 09:53 AM ---------- Previous update was at 09:45 AM ----------
ssh is waiting for the termination of iostat on the destination server only then ssh exiting on its own on the client machine and comes to prompt
---------- Post updated at 10:52 AM ---------- Previous update was at 09:53 AM ----------
managed to do it by adding this to the ssh
---------- Post updated at 10:53 AM ---------- Previous update was at 10:52 AM ----------
Look that you need to change the variable: ${logFile} to point to the path of the log file.
I validated the execution, and after the remote call finished, the "iostat_output.log" continue increasing which means the iostat command was executing still.
---------- Post updated at 13:21 ---------- Previous update was at 13:09 ----------
The trick in the command is the: "&" sign, which means the script can continue to execute without needing to wait for this command finish to execute. It is the same as I sent you!
I am running the gaussian program on UNIX with bash and I want to form a script that will email me once the output life terminates either "normal termination" or "false" I just started learning this last week so could you let me know how to go about this.:b: (13 Replies)
http://ep.yimg.com/ay/iercomputer/ibm-39j5022-ultra320-scsi-adapter-dual-channel-pci-x-fc5736-3.gif
I have bought this controller.
Simple and fast question: I will put on this controller a external LTO tape,which is terminated with a terminator.
I have to put another terminator on PCI-controller... (1 Reply)
So, I'm writing a shell script to help automate a process I'm doing. Basically I want to take input from the user for 2 variables, then create a file that consists of:
Variable1,Variable2
Constant1
Constant2
..
Constant2000
then run an awk script. I'm pretty new to unix though, and so... (11 Replies)
Hi
I have a Shell script that needs to execute a command at the
End of the excursion of other script And I cant get a handel
On the trap command. And that is if the trap command
Is the proper way to go
this is a extract of the script
MYHOST=`hostname| cut -d. -f1`
echo $MYHOST
... (4 Replies)
I'm writing a script to archive data. First, the files are all rsync'd to the archive directory via NFS mounts(I know not the most efficient, but the only choice in this situation), then I use md5sum to validate the transfers. During execution of the script, it will exit for no apparent reason. It... (6 Replies)
Hi All,
I was reading the man page of snprintf function and it saids that snprintf adds a null terminator at the end of the string, but I remember once someone told me that snprintf doesn't guarantee the insertion of a null terminator character.
What do you think? Does anyone have experience... (4 Replies)
hi
i m writin a program in which i keep track of all the child processes the program has generated and if a child process has an abnormal termination i need to do certain task related to that child process.
for handlin child process i used waitpid:
temp_cpid=waitpid(-1,&stat,WUNTRACED);
... (4 Replies)
Hello all,
Here is the problem:
A ksh script (let's call it abc.sh) gets kicked off from a menu program using "nohup abc.sh &". The process ID of abc.sh can be recieved (pid=$!).
abc.sh runs an Oracle PL/SQL script (it creates a child process).
In order to stop the abc.sh (and the child)... (5 Replies)
I'm having trouble with Abnormal Termination errors. What are they, what causes them and how can I prevent them from happening? Are they application specific? (2 Replies)