Skip to contentSkip to conversation

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

DISCUSSION [email protected] 1 participant 1 message Jan 2, 2003

lore
Share & tools
lore
#0 lore raw

(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 ([email protected])