---
title: "Android/Linux 内存监视"
author: "sharp2wing"
date: "2010-11-26T11:07:01Z"
tags: []
categories: ["移动开发"]
slug: "android-linux"
draft: false
lastmod: "2010-11-26T11:15:31Z"
id: 825268
url: "https://sharp2wing.iteye.com/blog/825268"
---

Android/Linux 内存监视
 
VSS - Virtual Set Size 虚拟耗用内存（包含共享库占用的内存） 
RSS - Resident Set Size 实际使用物理内存（包含共享库占用的内存） 
PSS - Proportional Set Size 实际使用的物理内存（比例分配共享库占用的内存） 
USS - Unique Set Size 进程独自占用的物理内存（不包含共享库占用的内存） 
一般来说内存占用大小有如下规律：VSS >= RSS >= PSS >= USS

Android has a tool called procrank (/system/xbin/procrank), which lists out the memory usage of Linux processes in order from highest to lowest usage. The sizes reported per process are VSS, RSS, PSS, and USS

#procrank

---查看当前系统进程的排序(PID,Vss,Rss,Pss,Uss,cmdline)

#top -m 10

---动态查看当前系统进程前10位(PID,CPU,Vss,Rss,cmdline)

ps: 
内核查看 #cat /proc/version
内存查看 #cat /proc/meminfo
CPU信息  #cat /proc/cpuinfo
系统负载 #cat /proc/loadavg