Mapping entries from /proc/partitions to devices - Linux

This is a discussion on Mapping entries from /proc/partitions to devices - Linux ; Hi, I maintain a simple tool to monitor disk IO (a Nagios plugin, see https://trac.id.ethz.ch/projects/nag...i/check_diskio for details). In systems where it is available I read information from /proc/ diskstats and use the 'name' field to identify the device. In systems ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Mapping entries from /proc/partitions to devices

  1. Mapping entries from /proc/partitions to devices

    Hi,

    I maintain a simple tool to monitor disk IO (a Nagios plugin, see
    https://trac.id.ethz.ch/projects/nag...i/check_diskio for
    details).

    In systems where it is available I read information from /proc/
    diskstats and use the 'name' field to identify the device.

    In systems where it is not available I get information from /proc/
    partitions/ but there the names of the device use the ide/bus#/target#/
    lun# format. How can I find the mapping between the bus/target/luns
    and the corresponding device entry in /dev/?

    On my system I have an entry for ide/bus0/target0/lun0 which
    corresponds to hda but I did not find a place in /proc where I can
    find this information.

    Many thanks for any hint.

    Matteo


  2. Re: Mapping entries from /proc/partitions to devices

    Teo wrote:
    > Hi,
    >
    > I maintain a simple tool to monitor disk IO (a Nagios plugin, see
    > https://trac.id.ethz.ch/projects/nag...i/check_diskio for
    > details).
    >
    > In systems where it is available I read information from /proc/
    > diskstats and use the 'name' field to identify the device.
    >
    > In systems where it is not available I get information from /proc/
    > partitions/ but there the names of the device use the ide/bus#/target#/
    > lun# format. How can I find the mapping between the bus/target/luns
    > and the corresponding device entry in /dev/?
    >
    > On my system I have an entry for ide/bus0/target0/lun0 which
    > corresponds to hda but I did not find a place in /proc where I can
    > find this information.
    >
    > Many thanks for any hint.
    >
    > Matteo
    >


    My /proc/partitions isn't anything like you describe but maybe
    you can correlate entries using major/minor numbers.

  3. Re: Mapping entries from /proc/partitions to devices

    > On my system I have an entry for ide/bus0/target0/lun0 which
    > corresponds to hda but I did not find a place in /proc where I can
    > find this information.


    Do these entries help?: /dev/disk/{by-id,by-label,by-path,by-uuid}
    (particularly /dev/disk/by-path)

    --

+ Reply to Thread