[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: monitorare utilizzo di RAM



On 29/04/2016 23:33, gerlos wrote:

Volendo usare roba più "elementare" [...]  (1234 è
il pid del processo):

$ cat /proc/1234/status | grep Vm
VmPeak:    43904 kB
VmSize:    42880 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:     13716 kB
VmRSS:     13700 kB
VmData:    34344 kB
VmStk:       136 kB
VmExe:       384 kB
VmLib:      6740 kB
VmPTE:        32 kB
VmPMD:         0 kB
VmSwap:        0 kB

$ man ps
[...]
NOTES
This ps works by reading the virtual files in /proc. This ps does not need to be setuid kmem or have any privileges to run. Do not give this ps any special permissions.

CPU usage is currently expressed as the percentage of time spent running during the entire lifetime of a process. This is not ideal, and it does not conform to the standards that ps otherwise
       conforms to.  CPU usage is unlikely to add up to exactly 100%.

The SIZE and RSS fields don't count some parts of a process including the page tables, kernel stack, struct thread_info, and struct task_struct. This is usually at least 20 KiB of memory that is always resident. SIZE is the virtual size of the process (code+data+stack).
[...]

interessante, questa cosa del non tener conto di page tables, ... non la sapevo.

Secondo me è meglio usare ps...

Ciao
Davide

--
Dizionari: http://linguistico.sourceforge.net/wiki
Strumenti per l'ufficio: https://www.libreoffice.org
GNU/Linux User: 302090: http://counter.li.org
Non autorizzo la memorizzazione del mio indirizzo su outlook


Reply to: