Re: [LAD] [OT] bash vs disk activity

From: Patrick Shirkey <pshirkey@email-addr-hidden>
Date: Wed Oct 10 2007 - 05:49:43 EEST

On Tue, 2007-10-09 at 15:02 +0200, Marc-Olivier Barre wrote:
> On 10/9/07, Patrick Shirkey <pshirkey@email-addr-hidden> wrote:
> > Hi,
> >
> > Does anyone here have a bash script that will monitor disk activity or
> > accurately provide a progress bar of a simple file copy?
> >
> > I have a script that transfers data to a usb device using
> >
> > cp -a /xxx /usb_device &
> >
> > But it falls over with reporting back the actual amount of data that has
> > been transferred. It seems that the copy command doesn't return the
> > actual amount transferred to disk but more the amount it has queued to
> > transfer.
> >
> > For example if I transfer 200mb to a usb disk the copy command takes
> > about 30 seconds before it returns and the data takes about 5 minutes
> > before it is actually finished being transferred and the device is
> > unmountable.
> >
> > How would I track the 5 minutes of data transfer with bash?
>
> Hi,
>
> AFAIK I don't see how you could do that with anything than a low-level
> API, let alone bash... Although I may be wrong... Surprise me !
>

Maybe if I parse the output from iostat/vmstat and compare it in a
loop...

-- 
Patrick Shirkey
Boost Hardware Ltd.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Wed Oct 10 08:15:03 2007

This archive was generated by hypermail 2.1.8 : Wed Oct 10 2007 - 08:15:03 EEST