Advertisement
grahamperrin

FreeBSD: output from a suggested vmstat command

Aug 29th, 2022
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. It is possible to measure the resident memory set:
  2.  
  3. $ vmstat -o | awk 'NR>1 { t[$7] += $1 } \
  4. END { for (i in t) printf "%s %d\n",i,t[i] }'
  5.  
  6. The rows have the following meaning:
  7. df = default (not assigned a specific pager)
  8. sw = swap
  9. df = virtual
  10. vn = vnode
  11. ph = heap
  12. md = memory device
  13.  
  14. This will be reported in number of pages, so it needs to be multiplied by the
  15. page size of the architecture which can be found via:
  16.  
  17. $ sysctl -n hw.pagesize
  18.  
  19. -- Daniel Ebdrup Jensen <debdrup@FreeBSD.org>
  20. % su -
  21. Password:
  22. root@mowa219-gjp4-8570p-freebsd:~ # sh
  23. # vmstat -o | awk 'NR>1 { t[$7] += $1 } \
  24. > END { for (i in t) printf "%s %d\n",i,t[i] }'
  25. 0
  26. dv 4
  27. vn 205016
  28. ph 905
  29. review 0
  30. md 7551
  31. sw 1098641
  32. # exit
  33. root@mowa219-gjp4-8570p-freebsd:~ # sysctl -n hw.pagesize
  34. 4096
  35. root@mowa219-gjp4-8570p-freebsd:~ # sh
  36. # vmstat -o | awk 'NR>1 { t[$7] += $1 } \
  37. END { for (i in t) printf "%s %d\n",i,t[i] }'
  38. 0
  39. dv 4
  40. vn 204191
  41. ph 905
  42. review 0
  43. md 7583
  44. sw 1106698
  45. #
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement