/proc/partitions statistics: how to find block size?

From: jfontain@free.fr
Date: Thu Jan 02 2003 - 07:59:08 EST


(please CC me as I am not subscribed: apologies...)

First I wish to thank very much those who wrote the 'Per partition statistics in
/proc/partitions' patch, now available in 2.4.20. It is a very useful feature IMHO.
I am using it to write a new module for the modular monotoring software moodss
(http://jfontain.free.fr/moodss/).

Now, from /proc/partitions, I can find the number of blocks per partition or
disk, but what I also need is the size of each disk, or the block size of each
disk, so that I could display the size in bytes for each disk, which would be
more user friendly.

Is there a way to find that information within the /proc filesystem or by any
other mean (that has to work for any disk type (IDE, SCSI, USB, ...)).

Many thanks in advance and sorry for posting here, but I really need expert
advice...

Happy New Year,

Jean-Luc (jfontain@free.fr)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:17 EST