Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12322

Read from /proc/$PID/smaps is slow

$
0
0

We need to monitor memory usage of our high-loaded service every minute by cron.

For this we are reading /proc/PID/smaps and somehow parse it.

But we are encountering timing problems exactly every minute. When monitoring cron is turned off, there is no timing problems.

Only expensive and suspicious operation in our code is that reading of /proc/PID/smaps.

Is there in Linux kernel any lock/mutex/something else while reading smaps?

And is there any other more transparent method to detect memory usage?


Viewing all articles
Browse latest Browse all 12322

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>