Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362749
| From | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC] mm: why cat /proc/pid/smaps | grep Rss is different from cat /proc/pid/statm? |
| Date | 2016-03-22 15:00 +0100 |
| Message-ID | <rfv0K-5cK-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
[root@localhost c_test]# cat /proc/3948/smaps | grep Rss
Rss: 4 kB
Rss: 4 kB
Rss: 4 kB
Rss: 796 kB
Rss: 0 kB
Rss: 16 kB
Rss: 8 kB
Rss: 12 kB
Rss: 132 kB
Rss: 12 kB
Rss: 4 kB
Rss: 4 kB
Rss: 4 kB
Rss: 4 kB
Rss: 12 kB
Rss: 0 kB
Rss: 4 kB
Rss: 0 kB
[root@localhost c_test]# cat /proc/3948/statm
1042 173 154 1 0 48 0
173 means Rss is 173*4kb=692kb, right?
so why it is different from the sum(1020kb) of "cat /proc/pid/smaps | grep Rss"?
my test code is
...
int main()
{
sleep(1000);
return 0;
}
the kernel version is v4.1
Thanks,
Xishi Qiu
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC] mm: why cat /proc/pid/smaps | grep Rss is different from cat /proc/pid/statm? Xishi Qiu <qiuxishi@huawei.com> - 2016-03-22 15:00 +0100
Re: [RFC] mm: why cat /proc/pid/smaps | grep Rss is different from cat /proc/pid/statm? Xishi Qiu <qiuxishi@huawei.com> - 2016-03-30 09:20 +0200
Re: [RFC] mm: why cat /proc/pid/smaps | grep Rss is different from cat /proc/pid/statm? Xishi Qiu <qiuxishi@huawei.com> - 2016-03-30 11:50 +0200
csiph-web