pcp icon indicating copy to clipboard operation
pcp copied to clipboard

RFE: Improved per-process stack-referenced metric

Open myllynen opened this issue 4 years ago • 0 comments

From https://groups.io/g/pcp/message/24146:

" In pidstat(1) StkSize seems to be available as proc.memory.vmstack but I don't see a PCP metric corresponding to StkRef.

There is proc.smaps.referenced which is taken from /proc/PID/smaps_rollup but after reading pidstat.c I see pidstat StkRef is read from the Referenced value from the [stack] section of /proc/PID/smaps. proc.smaps.referenced sums the values of the process code and the libraries it is using while pidstat reports the value for the process code only.

The proc.memory.vmstack metric comes from a different place (/proc/pid/status VmStk line) but seems to be the same value. Unfortunately there's no quick way to get a stack-referenced value that I can see, we'd have to start parsing smaps (currently we only look at status and smaps_rollups which are more performant).

It's definitely not the same value, so not adequate as a stack referenced value - new code would be needed to provide that value as a metric I think. "

It might be helpful to provide the corresponding stack-referenced value as a per-process PCP metric.

Thanks.

myllynen avatar Apr 23 '21 07:04 myllynen