Re: [DNG] measure memory usage

2020-08-23 Thread g4sra via Dng
On 22/08/2020 16:03, Hendrik Boom wrote: > On Sat, Aug 22, 2020 at 10:47:53AM +0100, g4sra via Dng wrote: >> Your query does not make sense to me. >> >> On 21/08/2020 21:23, Hendrik Boom wrote: >>> Is there a way for process to ask about its own memory usage? >>> >>> Something perhaps like the C f

Re: [DNG] measure memory usage

2020-08-22 Thread Hendrik Boom
On Sat, Aug 22, 2020 at 10:47:53AM +0100, g4sra via Dng wrote: > Your query does not make sense to me. > > On 21/08/2020 21:23, Hendrik Boom wrote: > > Is there a way for process to ask about its own memory usage? > > > > Something perhaps like the C functions that were available in the dark >

Re: [DNG] measure memory usage

2020-08-22 Thread marcxdv
> On Friday 21 August 2020 at 22:23:16, Hendrik Boom wrote: > > > Is there a way for process to ask about its own memory usage? > > Assuming the process knows its own PD, try the 24th value in /proc/PID/stat ... or just /proc/self/stat regards marc ___

Re: [DNG] measure memory usage

2020-08-22 Thread g4sra via Dng
Your query does not make sense to me. On 21/08/2020 21:23, Hendrik Boom wrote: > Is there a way for process to ask about its own memory usage? > > Something perhaps like the C functions that were available in the dark > ages on other computer systems that could tell how much memory had > been

Re: [DNG] measure memory usage

2020-08-21 Thread Ludovic Bellière
I use the following > > watch -n 30 "ps --sort=-rss -eo pmem,rss,vsz,comm|grep ${software} >> > ${OUTPUT}" Where ${software} is a string and ${OUTPUT} is a file. I use the data stored in the file to plot graphs. Otherwise, Andy's correct: /proc/${pid}/stat will contain everything you need. On

Re: [DNG] measure memory usage

2020-08-21 Thread Antony Stone
On Friday 21 August 2020 at 22:23:16, Hendrik Boom wrote: > Is there a way for process to ask about its own memory usage? Assuming the process knows its own PD, try the 24th value in /proc/PID/stat See man proc for details. Antony. -- I conclude that there are two ways of constructing a sof

[DNG] measure memory usage

2020-08-21 Thread Hendrik Boom
Is there a way for process to ask about its own memory usage? Something perhaps like the C functions that were available in the dark ages on other computer systems that could tell how much memory had been allocated but not freed so far? Or some reasonable surrogate? Yes,I know there are admin