Tuesday, July 19, 2011

solaris resmon

Salut Laurent,

Je viens de me rappeler avoir envoyé ce mail a Jacques il y a quelque temps pour des détails sur resmon sous Solaris.
Je joins le fichier exemple (solaris_resmon.c) qui se compile facilement avec:

gcc -o solaris_resmon solaris_resmon.c -lkstat

Le concentre de l’algo de resmon sous Solaris y est.
NB: Je tiens a rappeler que l’algo ne sort pas de mon cerveau (malade) mais du code source de top ;)

Maintenant pour retrouver ces chiffres avec des outils standards:
  • La memoire totale disponible se voit par exemple avec:
prtconf | grep Memory
  • La memoire disponible à l’ instant t peut se voir par exemple avec:
vmstat 1 10

sous la colonne “free” a partir de la 2eme ligne.

jerome


Hello Jacques,

The resmon conditions are here to detect over-utilization of the computer resources.
So, if the concerned resource is below the specified (or default) threshold, the resmon condition as shown by DISPLAY-PLATFORM-STATUS is set to TRUE, and as soon as the threshold has been reached, the resmon condition becomes FALSE, which results in the CE becoming "not fully operational": this is what the PM event shows.
When memory is reported to exceed 80% utilization like in the customer case, in no way this means that new calls would be rejected by SW. This only means that the machine memory is heavily used.
Now to check the calculation, this is unfortunately a bit more complicated under Solaris than under Linux. Under Linux, the information is read from /proc/meminfo. Under Solaris, the information is read from the kernel via the native kstat library.

Globally the formula for the memory is :
memory in use = 100 - 100 * available / total

To have an idea of how the amount of available memory and total memory are computed on Solaris, please have a look at the attached sample file which is an extract from the original resmon.c. You can compile it under

Solaris 10, and it will show you these two values for your machine.

Now, to turn this off, as explained in the resmon man-page, the operator

can specify
RESMON_MEMORY_THRESHOLD=0
in his omni_conf_info file.

Hope this helps.

Rgds,
jerome