March 10, 201016 yr I noticed the following variables are not being reported by a status command to /proc/mdcmd: diskNumReads: diskNumWrites: diskNumErrors: They were still there in 4.4.2. Was removing them intentional? I also noticed that total size (diskSize) is reported, but free space is not. Tom, could we get a "diskFree" added to the /proc/mdcmd status output??? Thanks in advance!
March 10, 201016 yr I noticed the following variables are not being reported by a status command to /proc/mdcmd: diskNumReads: diskNumWrites: diskNumErrors: They were still there in 4.4.2. Was removing them intentional? I also noticed that total size (diskSize) is reported, but free space is not. Tom, could we get a "diskFree" added to the /proc/mdcmd status output??? Thanks in advance! I think the diskNumErrors will still show errors if they occur, but the other statistics have not been reported from mdcmd for quite a while. They are instead reported from the /sys/block/XXX/stat file. The code in unmenu.awk does this: function GetReadWriteStats(theDevIndex, cmd) { cmd="cat /sys/block/" disk_device[theDevIndex] "/stat 2>/dev/null" cmd | getline disk_reads[theDevIndex] = $1 disk_writes[theDevIndex] = $5 close(cmd) } You are interested in the first and fifth fields in the "stat" file under /sys/block/XXX. As far as free space. the "md" device has no concept of a file-system. It only knows the size of the partition it is affiliated with. There is no way for it to show free space, to it all the bits are being used. You can only get free space from the "df" command. Joe L.
March 10, 201016 yr I found the old post I made. Tom stopped using the fields in the mdcmd output on release 4.4.2 See here: http://lime-technology.com/forum/index.php?topic=2533.msg20216#msg20216 where I questioned the differences since I them had to change unMENU to use the same fields as unRAID under /sys/block. And here for Tom's answer: http://lime-technology.com/forum/index.php?topic=2533.msg20256#msg20256 Joe L.
March 10, 201016 yr Author I found the old post I made. Tom stopped using the fields in the mdcmd output on release 4.4.2 That's what I get for not paying attention However, the number from /proc/diskstats and /sys/block/mdX/stat do not agree with what is reported in emhttp..... not even close.
March 10, 201016 yr I found the old post I made. Tom stopped using the fields in the mdcmd output on release 4.4.2 That's what I get for not paying attention However, the number from /proc/diskstats and /sys/block/mdX/stat do not agree with what is reported in emhttp..... not even close. That;s because empttp (and unMENU) is reporting the I/O of the /sys/block/sdX/stat, not the "md" device. The numbers agree with what emhttp is showing.
March 10, 201016 yr Author That;s because empttp (and unMENU) is reporting the I/O of the /sys/block/sdX/stat, not the "md" device. The numbers agree with what emhttp is showing. Only if you've never cleared the stats. /sys/block/sdX/stat is only reset at boot. It looks like unRAID is snapshotting the values when you "clear stats", and subtracting the snapshot from the live ones.
March 10, 201016 yr That;s because empttp (and unMENU) is reporting the I/O of the /sys/block/sdX/stat, not the "md" device. The numbers agree with what emhttp is showing. Only if you've never cleared the stats. /sys/block/sdX/stat is only reset at boot. It looks like unRAID is snapshotting the values when you "clear stats", and subtracting the snapshot from the live ones. I don't think I've ever "cleared stats" and therefore, never noticed the behavior you just described. Very Interesting. I'll bet you are right. To confirm, re-start emhttp and see if it still does the math to subtract the prev. values. killall emhttp emhttp &
March 10, 201016 yr Author To confirm, re-start emhttp and see if it still does the math to subtract the prev. values. Yup. I do clear stats often when working on various things, to see how much activity a disk sees (and which disks) when I run something.
Archived
This topic is now archived and is closed to further replies.