Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Solaris I can use mpstat to see the smtx (i.e., spins on mutex or in other words locks not acquired on the first try) value. This value increasing indicates that swap is being hit too frequently and indicates that you need more RAM.

The output of mpstat on Linux is not at all like Solaris. Is there any way I can see this (or an equivalent/related) value?

share|improve this question

closed as not a real question by psusi, vonbrand, Thor, jasonwryan, rahmu Apr 12 '13 at 0:18

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I fail to see a relation between "frequently spins on mutex" and "needs more RAM"... To answer such a question I'd look at what sar (also part of sysstat) says about swap traffic for both operating systems. – vonbrand Feb 9 '13 at 20:47
I also do not see a relationship between smtx and ram shortages... maybe OP was thinking about Scan Rate? The Question needs to be clarified - is the OP looking for a way to identify ram shortages or for a way to understand internal application contention? – Johan Mar 6 '13 at 7:49
Voting to close since question seems abandoned and was never clarified. – psusi Apr 11 '13 at 18:35

I would look at the number of major page faults reported by "sar -B" the higher they are, then the more you're swapping. Here's an article that describes a few different methods.

share|improve this answer

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