[HPADM] redirecting sar output

From: Richard L. Rhodes (rhodesr@firstenergycorp.com)
Date: Thu Nov 14 2002 - 03:28:41 EST


Hi Everyone,

I'm trying to do some peformance tuning on a process that uses lots
of disk i/o. The process gives lots of information about it's run,
but I've also been trying to get sar info for the entire system while
the porcess is running.

In other words, I want to run sar only for one iteration of the
porcess, save the output, then startup another sar and iteration of
the process. The problem is that sar runs for an amount of time
(interval length times number if intervals), and I can't tell how
long the process will run.

I've been trying to do something like the following:

        sar -bu 5 1000 > sar1.lst &
        time myprogram arg1 > myprogram1.lst
        kill <sar process> (grep a ps list for sar and kill it)

        sar -bu 5 1000 > sar2.lst &
        time myprogram arg2 > myprogram2.lst
        kill <sar process> (grep a ps list for sar and kill it)

        ... repeat ...

This doesn't work. It seems that if sar is killed, no output is
written to the redirected file. I've tried redirection, piping, and
piping through a named pipe - all have the same result. This also
appears to be the case if you have sar save sampling data to a file.
Only if sar is allowed to end normally will it write it's data out.

I'm interested in an explanation of this behavior as well as ideas on
now to gather cpu and disk i/o information for an undetermined amount
of time.

Thanks

Richard Rhodes
FirstEnergy Corp
rhodesr@firstenergycorp.com

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:22 EDT