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:
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
Generating RPM packages
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)
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Arjan van de Ven <email@example.com> Victor Rodriguez <firstname.lastname@example.org>
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