When using DTrace to track I/Os to disks under the sd/ssd driver, it's easy 
enough to  get the major/minor device number of the disk being targeted for I/O:

fbt:ssd:ssdstrategy:entry,
fbt:sd:sdstrategy:entry
{
  io_start[(struct buf *)arg0] = timestamp;
}

fbt:ssd:ssdintr:entry,
fbt:sd:sdintr:entry
/ io_start[(this->buf = (struct buf *)((struct scsi_pkt *)arg0)->pkt_private)]
  != 0 /
{
  this->un = ((struct sd_xbuf *) this->buf->b_private)->xb_un;
  this->major = getmajor(this->buf->b_edev);
  this->minor = getminor(this->buf->b_edev);

  @max_ms[this->major, this->minor] =
    max((timestamp - io_start[this->buf])/1000000); /* convert ns to ms */

  io_start[this->buf] = 0;
}

We can even get device names in the form of 'ssdXXX', which unfortunately 
aren't that helpful.

How can we map major/minor numbers or device names to their /dev/[r]dsk/... 
symlinks in DTrace?   That would make the output more intuitive, at least to us.

Gordon Marler
[EMAIL PROTECTED]


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to