[Crash-utility] Thoughts on swap_usage Crash extension?

Aaron Tomlin atomlin at redhat.com
Mon Jan 28 15:13:54 UTC 2013


Hi,

This is a trivial crash extension to report the actual swap consumption of each user process.
What do you think, any suggestions [1]?

For example:

	crash> ps tuned
	   PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
	   1237      1  20  ffff8805418d7500  IN   0.0  174728   1664  tuned
	crash> vm -p 1237 | grep SWAP | wc -l
	974
	crash> extend swap_usage.so
	./swap_usage.so: shared object loaded
	crash> swap_usage | grep tuned
	 1237   3896	tuned
	crash> p/d 974 << 2
	$3 = 3896
	crash>

Thanks,
Aaron
---
[1]: https://github.com/aktlin115/crash-extension/blob/f5667ca9e4a521c0aaa31303fb74c169ac0b0efd/swap_usage.c




More information about the Crash-utility mailing list