can iostat _really_ behave like top ?
Dan Nelson
dnelson at allantgroup.com
Sat Jul 8 17:29:39 UTC 2006
In the last episode (Jul 08), Ensel Sharon said:
> When I run `top`, I get a single screen (ncurses ?) that refreshes itself
> _in place_.
>
> However, when I run iostat in "top mode":
>
> iostat -h -w 1
>
> it does not refresh in place, rather it creates line after line,
> eventually scrolling off the screen, etc.
>
> Is there any way to use iostat like top, so I can have a single,
> constantly refreshing screen to look at once in a while ?
How about something like:
iostat -h -w 1 | sed -e "/tty/s/^/$(echotc cl)/"
to insert a clearscreen whenever the header is printed (i.e. the device
ordering changes or 20 lines are printed)
Then again, what do you have against scrolling? With your original
command, not only do you see the last screenful of stats even when
devices change order, but you can scroll back and see farther back if
you want to.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-questions
mailing list