Know programs in cache

I have this situation with RAM and SWAP at the moment:

$ free -h
             total       used       free     shared    buffers     cached
Mem:          7,7G       7,5G       159M       100M        75M       5,9G
-/+ buffers/cache:       1,5G       6,1G
Swap:         7,9G       408M       7,5G

And I was wondering ...

Is there any way to find out which programs / data are stored in RAM and / or from which process they come from?

My idea is that since they are reused, there must be a way to “identify” them.
But my knowledge is really too small to know how to do this.

Thank you in advance.

+4
source share
1 answer

Is there any way to find out which programs / data are stored in RAM and / or from which process they come from?

http://hoytech.com/vmtouch/ vmtouch. , . , . :

, :

$ vmtouch -v  /usr/share/dict/linux.words
/usr/share/dict/linux.words
[                                                          ] 0/1210

           Files: 1
     Directories: 0
  Resident Pages: 0/1210  0/4M  0%
         Elapsed: 0.000169 seconds

:

$ tail -n 10000 /usr/share/dict/linux.words >/dev/null
$ vmtouch -v  /usr/share/dict/linux.words
/usr/share/dict/linux.words
[                                                        oO] 24/1210

           Files: 1
     Directories: 0
  Resident Pages: 24/1210  96K/4M  1.98%
         Elapsed: 0.000152 seconds

vmtouch frist nmap , mincore, , :

man mincore:

mincore() , , () ( ), . , addr .

+1

Source: https://habr.com/ru/post/1540569/


All Articles