Solusi 1:
Dari manual:
The `%I' and `%O' values are allegedly only `real'
input and output and do not include those supplied
by caching devices. The meaning of `real' I/O reported
by `%I' and `%O' may be muddled for workstations,
especially diskless ones.
Jadi unit ada di I/Os. Mungkin kode sumbernya tahu apa artinya. Dari dokumentasi fungsi ringkasan di time.c:
...
I == file system inputs (ru_inblock)
...
O == file system outputs (ru_oublock)
...
ru_inblock dan ru_oblock berasal dari getrusage. Dari manual getrusage:
ru_inblock (since Linux 2.6.22)
The number of times the filesystem had to perform input.
ru_oublock (since Linux 2.6.22)
The number of times the filesystem had to perform output.
Itu tidak terlalu berguna, tetapi LKML menunjukkan tambalan yang sedang dibahas(https://lkml.org/lkml/2007/3/19/100) untuk menambahkan ru_inblock dan ru_oublock:
As TASK_IO_ACCOUNTING currently counts bytes, we approximate blocks
count doing : nr_blocks = nr_bytes / 512
Pemeriksaan pada kode sumber kernel saat ini (https://github.com/spotify/linux/blob/master/include/linux/task_io_accounting_ops.h) menunjukkan:
/*
* We approximate number of blocks, because we account bytes only.
* A 'block' is 512 bytes
*/
static inline unsigned long task_io_get_inblock(const struct task_struct *p)
{
return p->ioac.read_bytes >> 9;
}
dan
/*
* We approximate number of blocks, because we account bytes only.
* A 'block' is 512 bytes
*/
static inline unsigned long task_io_get_oublock(const struct task_struct *p)
{
return p->ioac.write_bytes >> 9;
}
Singkatnya, ya, masing-masing blok kira-kira berukuran 512 byte.
Solusi 2:
Saya akan menebak "input/output sistem file" berarti ukuran blok, jadi jika sistem file yang mendasarinya telah diformat dengan blok 512 byte, ia mengembalikannya, jika ada yang lain, maka itu.
Tapi ini hanya tebakan.