Having just configured Munin for statistics logging on my gentoo server (hardened profile), I am noticing that my "Available entropy" is consitently in the 200-300 range. This seems way to low, so I checked it manually using the command

$ cat /proc/sys/kernel/random/entropy_avail

Odd. Consistently very low values in Munin and practically filled up when checking manually. After thinking about the problem for a while I came to the conclusion that the problem is probably that I'm using Adress Space Layout Randomization which is using the entropy when running commands/programs. Since Munin runs a whole slew of programs all the entropy is used up, and Munin then measures how much entropy there is, resulting in the low values.

Does anyone have any experience with this? How can this be avoided?

  • Provide more entropy? I don't know much about the /dev/random entropy interface, but I'll bet there are knobs to frob. Turn on every source that might be apropos. – dmckee --- ex-moderator kitten Mar 15 '10 at 0:00
  • @dmckee: Yeah, I'm trying to do that, but still, the large amount of new processes around measuring-time will still skew the results downwards. I would like to avoid that. – Simon Lindgren Mar 15 '10 at 9:49

Another similar solution would be to a new entropy plugin that

  1. prints the previously cached result.
  2. forks.
  3. sleeps for, say, 3 minutes.
  4. extracts the entropy using the original entropy Munin plugin and saves it to cache.

The good thing about this solution is that it would not require you to involve cron.

Since Munin plugins usually are run every fifth minute this would mean your entropy would be 2 minutes delayed but it certainly sounds a lot better than incorrect data.

  • Since asking this question i've found collectd (collectd.org) which uses in-process plugins. Not a solution if the goal is to use munin, but might be worth a look. – Simon Lindgren Nov 3 '10 at 11:51

Looks to be solved in version 1.4.3

  • I'm using 1.4.5, and the issue still seems to apply, do you have a source for that statement (fixed issue, commit, etc.)? – Simon Lindgren Nov 3 '10 at 11:39

I see you haven't received an answer. In case you are right that the entropy is shown wrong because of all the other processes you could call your entropy munin plugin through a cronjob script and cache its result to file. You then modify the original Munin entropy plugin to just return the previously cached result. It's worth a shot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.