Libraryless. Click here for Pure Java version (3334L/21K).
1 | static long linux_rawRSSTotalFromSMAPS() {
|
2 | ret linux_rawRSSTotalFromSMAPS(processID_int()); |
3 | } |
4 | |
5 | static long linux_rawRSSTotalFromSMAPS(int pid) {
|
6 | S text = loadTextFile("/proc/" + pid + "/smaps");
|
7 | MultiMap<S> mm = colonPropertiesToCIMultiMap(text); |
8 | long rss = 0; |
9 | for (S s : mm.get("rss"))
|
10 | rss += parseFirstLong(s); |
11 | ret rss*1024; |
12 | } |
Began life as a copy of #1025540
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025541 |
| Snippet name: | linux_rawRSSTotalFromSMAPS |
| Eternal ID of this version: | #1025541/1 |
| Text MD5: | a7fc729c497ca77ab649336a214d949d |
| Transpilation MD5: | c1d464887cf9b53b00a1ca4f0abcdb1a |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-03 11:27:46 |
| Source code size: | 355 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 449 / 637 |
| Referenced in: | [show references] |