[General] Any linux gurus?

Devin Boyer boyerd at gmail.com
Wed Dec 11 17:45:24 CST 2013


Try something like "strace -T myapp" or "strace -T -c myapp"; they'll show
the system calls being made and the amount of time spent in each.  It's
slightly different information than iostat, but it may be useful in
figuring out what and where your program is performing io access.


On Wed, Dec 11, 2013 at 3:37 PM, Stephan Henning <shenning at gmail.com> wrote:

> No, iostat will normally just dump to the terminal window, but I'd like to
> pipe it's output to a file so I can parse it later.
>
> My end goal here is to be able to generate a log of iostat output while I
> run this program, I'm trying to determine exactly how hard this program is
> hitting my harddrive and at what points during it's run does it access the
> drive the most frequently.
>
> I've done something similar in bash before, but it is rather clunky.
>
> I'll take a look at exec and see if I can use it.
>
>
> On Wed, Dec 11, 2013 at 4:46 PM, David <ainut at knology.net> wrote:
>
>>  Do you need to do anything with the results or just need them displayed?
>> If you need to manipulate the results, consider using Perl,
>> or if C or C++,
>> in your 'exec' call, pipe the output to a file, then just read that file
>> into your program.
>> Ain't UNIX great?
>>
>>
>> David M.
>>
>>
>> Stephan Henning wrote:
>>
>>  I'd like to take some metrics with iostat while I have a specific
>> program running, is there a way to wrap iostat around another program (it
>> is called from the command line) so that iostat ends when the program
>> finishes running?
>>
>>  I know I can do it with a bash script, but I'm hoping for a more elegant
>> solution.
>>
>>
>> _______________________________________________
>> General mailing listGeneral at lists.makerslocal.orghttp://lists.makerslocal.org/mailman/listinfo/general
>>
>>
>>
>> _______________________________________________
>> General mailing list
>> General at lists.makerslocal.org
>> http://lists.makerslocal.org/mailman/listinfo/general
>>
>
>
> _______________________________________________
> General mailing list
> General at lists.makerslocal.org
> http://lists.makerslocal.org/mailman/listinfo/general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.makerslocal.org/pipermail/general/attachments/20131211/a3a25b53/attachment.html>


More information about the General mailing list