linux - How does the proc/diskstats work to present that values? And for proc/stat and meminfo? -
i trying diskstats data same way file does. there way reach values without reading file? how values placed there? there ".c" file processes data place on diskstats? , proc/stat , meminfo? (diskstats main concern)
there surely .c file , it's part of linux kernel. if want see how it's done can start unwinding e.g. here: http://lxr.free-electrons.com/source/block/genhd.c?v=3.8
reading procfs not worst method stats, that's it's made for. if want can try using iostat
util instead (see http://linuxcommand.org/man_pages/iostat1.html)
Comments
Post a Comment