Map sar device names: Difference between revisions
Jump to navigation
Jump to search
(Created page with ""sar -d 5" is my favorite way to get disk latency numbers, but the device names it reports are just major, minor numbers. This isn't how I think about filesystems, so I need to …") |
No edit summary |
||
Line 1: | Line 1: | ||
"sar -d 5" is my favorite way to get disk latency numbers, but the device names it reports are just major, minor numbers. This isn't how I think about filesystems, so I need to map to a human-readable filesystem name to understand the latency numbers that are reported. | "sar -d 5" is my favorite way to get disk latency numbers, but the device names it reports are just major, minor numbers. This isn't how I think about filesystems, so I need to map to a human-readable filesystem name to understand the latency numbers that are reported. | ||
<h3>the output of sar -d 5 looks like this for me</ | <h3>the output of sar -d 5 looks like this for me</h3> | ||
<pre> | <pre> |
Revision as of 18:12, 23 March 2013
"sar -d 5" is my favorite way to get disk latency numbers, but the device names it reports are just major, minor numbers. This isn't how I think about filesystems, so I need to map to a human-readable filesystem name to understand the latency numbers that are reported.
the output of sar -d 5 looks like this for me
10:58:34 AM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 10:58:39 AM dev8-0 1.60 0.00 363.20 227.00 0.02 15.00 9.50 1.52 10:58:39 AM dev8-16 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev252-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev252-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev252-2 45.40 0.00 363.20 8.00 0.66 14.63 0.33 1.52 10:58:39 AM dev8-32 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev252-3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev252-4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev8-64 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:58:39 AM dev8-80 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 ^C
I get major/minor device numbers with "ls -lL /dev/" and read through looking for a match
I happen to already know the general range of devices that have traffic, so I've narrowed down my list, but the first time I did this, I went through all of /dev. In this example, I'm looking for the dev8-0 and dev252-2 since they are busy writing at the moment.
root@weasel:~# ls -lL /dev/sda* brw-rw---- 1 root disk 8, 0 Mar 23 08:06 /dev/sda brw-rw---- 1 root disk 8, 1 Mar 23 08:06 /dev/sda1 brw-rw---- 1 root disk 8, 2 Mar 23 08:06 /dev/sda2 brw-rw---- 1 root disk 8, 5 Mar 23 08:06 /dev/sda5 root@weasel:~# ls -lL /dev/dm* brw-rw---- 1 root disk 252, 0 Mar 23 08:06 /dev/dm-0 brw-rw---- 1 root disk 252, 1 Mar 23 08:06 /dev/dm-1 brw-rw---- 1 root disk 252, 2 Mar 23 08:06 /dev/dm-2 brw-rw---- 1 root disk 252, 3 Mar 23 08:06 /dev/dm-3 brw-rw---- 1 root disk 252, 4 Mar 23 08:06 /dev/dm-4
Here I see the device names of interest are /dev/sda and /dev/dm-2. Looking in /dev/mapper, I can see the friendly name for dm-2 is Ubuntu-root.
root@weasel:~# ls -l /dev/mapper total 0 crw------- 1 root root 10, 236 Mar 23 08:06 control lrwxrwxrwx 1 root root 7 Mar 23 08:06 netstore-netstore -> ../dm-0 lrwxrwxrwx 1 root root 7 Mar 23 08:06 netstore-store -> ../dm-1 lrwxrwxrwx 1 root root 7 Mar 23 08:06 rootback-rootback -> ../dm-4 lrwxrwxrwx 1 root root 7 Mar 23 08:06 Ubuntu-root -> ../dm-2 lrwxrwxrwx 1 root root 7 Mar 23 08:06 Ubuntu-swap_1 -> ../dm-3