On 01/04/2017 05:09 PM, Craig Small wrote:
I've just updated the manual pages to document the pids API. I was
looking through and saw we have two ways of accessing the information,
reap and get. Looking across all the structures, this is what we have:
diskstats: get(vmstat) and reap(unused)
meminfo: get(unused)
pids: get(pgrep,pidof) and reap(w,skill,top,ps)
slabinfo: get(unused) and reap(slabinfo,vmstat)
stat: get(unused) and reap(top)
vmstat: get(unused)
To me it seems a little odd to have two functions that almost do the
same thing. Do you think it might be worthwhile to convert the
duplicates to just use reap and retire the get function for the ones
that have a duplicate? It would only mean changing vmstat, pgrep and
pidof and none of them are doing anything special.
Might be even worth just using the reap functionality but calling it
get, but that's a second step.