Name: psstop
Owner: Clear Linux* Project for Intel Architecture
Description: null
Created: 2016-11-28 22:35:07.0
Updated: 2018-04-12 22:36:06.0
Pushed: 2018-04-16 22:25:02.0
Homepage: null
Size: 40
Language: C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be at least partially in main memory during execution. As a developer and user, it is necessary to know the amount of memory consumed by every process in execution. PSSTOP helps to get this information in an accurate way.
PSSTOP gets the memory of each process from:
/proc/PID/smaps
The /proc/PID/smaps is an extension based on maps, showing the memory consumption for each of the process's mappings. For each mapping, there is a series of lines such as the following:
Size: 1084 kB
Rss: 892 kB
Pss: 374 kB
Shared_Clean: 892 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 0 kB
Referenced: 892 kB
Anonymous: 0 kB
AnonHugePages: 0 kB
ShmemPmdMapped: 0 kB
Shared_Hugetlb: 0 kB
Private_Hugetlb: 0 kB
Swap: 0 kB
SwapPss: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
PSSTOP tracks the amount of memory from the process's proportional share of this mapping (Pss) and the proportional swap share of the mapping (SwapPss).
Others tools like ps do not provide accurate detail about which processes are consuming the memory on our system. Depending on how you look at it, ps is not reporting the real memory usage of processes. What it is really doing is showing how much real memory each process would take up if it were the only process running.
autoreconf --install
./configure
make
make install
make dist
rpmbuild -ta psstop*.tar.gz
psstop
[...]
0 Kb: (sd-pam) (24051)
1122 Kb: tmux: server (31523)
4 Kb: bash (31524)
4 Kb: bash (31525)
4 Kb: vim (31684)
Total is 14958Kb (174 processes)
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Arjan van de Ven <arjan@linux.intel.com>
Victor Rodriguez <victor.rodriguez.bahena@intel.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later of the License