On 29/01/2008, Pietro Cerutti <[EMAIL PROTECTED]> wrote:
> Hi list,
>
> I'm trying to get device IO status (i.e. read and written bytes) by
> using the devstat interface, and I wrote this small program (mostly
> inspired by the gkrellm2 port freebsd.c system-dependent module).
[snip]
>
> Now, I sup
Pietro Cerutti wrote:
>
> printf("%s%d\t%.2lf MB\t%.2lf MB\n", d_stat->device_name,
> d_stat->unit_number,
> d_stat->bytes[1] / d_stat->block_size / MB,
> d_stat->bytes[2] / d_stat->block_size / MB);
yes, it should have been d_stat->bytes[DEVSTAT_READ]
Hi list,
I'm trying to get device IO status (i.e. read and written bytes) by
using the devstat interface, and I wrote this small program (mostly
inspired by the gkrellm2 port freebsd.c system-dependent module).
#include
#include
#include
#include
#include
#define MB ((double)(1024.0 * 1024.
3 matches
Mail list logo