查看內存相關參數
free --help
查看內存使用情況
free -h
total 總的內存,used已經使用的內存 free還有多少可用內存
------------------------------------------------------------------------------------------------------------------------------------------------------------------
查看各個進程的內存使用情況
ps命令可以實時的顯示各個進程的內存使用情況。Reported memory usage information includes %MEM (percent of physical memory used), VSZ (total amount of virtual memory used), and RSS (total amount of physical memory used)。你可以使用 “–sort”選項對進程進行排序,例如按RSS進行排序:
ps aux --sort -rss
-------------------------------------------------------------------------------
linux如何查看垃圾回收GC的情況,包括fullGC次數和耗時