Can anybody tell me a unix command that开发者_StackOverflow中文版 can be used to find the number of memory accesses that took place in a given interval. vmstat, top and sar only give the amount of physical memory space occupied/available .. But do not give the number of memory of accesses in a given interval
If I understand what you're asking, such a feature would almost certainly require hardware support at a very low level (e.g. a counter of some sort that monitors memory bus activity). I don't think such support is available for the common architectures supported by Unix or Linux, so I'm going to go out on a limb and say that no such Unix command exists.
The situation is somewhat different when considering memory in units of pages, because most architectures that support virtual memory have dedicated MMU hardware which operates at that level of granularity, and can be accessed by the operating system. But as far as I know, the sorts of counter data you'd get from the MMU would represent events like page faults, allocations, and releases, rather than individual reads or writes.
精彩评论