Swapping

Hi Guys

I am using SPARC-T4 (chipid 0, clock 2998 MHz), SunOS 5.10 Generic_150400-38 sun4v.

How do I see if the server was doing some swapping like yesterday?

I had a java application error with java.lang.OutOfMemoryError, now I want to check if the server was not doing some swapping at that time.

Thanks in advance

You need some kind of monitoring in place to go back in time and see what happens... For example something like sar .

Collecting System Activity Data Automatically (sar) - Oracle Solaris Administration: Common Tasks

You might have a look in the sar output if your system uses sar - which may or may not be the case.

Otherwise, you might have some performance monitoring tool running and might find information in its output.

Otherwise, i suppose you are out of luck: you can see the current swapping - quite detailedly so - in the vmstat output, but the figures from yesterday are not there (and to my knowledge anywhere saved). In this case you might set up something - log vmstat to a file, start sar , etc.. - and wait until the problem occurs again.

I hope this helps.

bakunin

Also, check out system logs.

If the memory pressure was extra high, you should messages from various services like :
[some service] : Unable to fork, not enough space ....

Are you running your java program inside application servers (websphere, glashfish, tomcat etc.) or from command line ?
Perhaps a JVM -xmx increase could help in either case ?
What is your app / program doing ?

I doubt you ran out of memory on t4 bare metal, you run out of memory inside your JVM.

You can quickly monitor it in a terminal with the vmstat command

vmstat 2

pi and po columns are page-in and page-out, that is nearly identical with swapping

vmstat -S 2

displays the exact figures in si and so columns (swap-in and swap-out).
Note that the first line in the vmstat output is the average since system boot.
Every subsequent line is the current activity (average of the 2 seconds interval).