Find the memory size of the /usr partition

Hello,
how can you read out the memory size of the /usr partition and trigger an alarm if a value is less than a value?

mic_

Hi @mic,

Here’s an example that you can modify to do what you’re trying to do with the usr memory

SETSYS INF, "LOAD"
USRFree$ = GETSYS INF, "DskUsrFree"
USRFree_Int% = Val  USRFree$
IF USRFree_Int% > 20000 THEN   // 20 MB remains
  LOGEVENT " More than 20 MB left in USR Memory", -1
Endif
If USRFree_Int% > 100000 AND USRFree_Int% < 20000 THEN // 10 MB remains
  LOGEVENT "20 MB Memory Low", -1
Endif
ELSE 
  LOGEVENT "USR Memory Low", -1
ENDIF

-Tim

Hi @Tim_hms

Thank you, that’s what I was looking for.

-mic

You’re welcome, let me know if there’s more questions on this.

-Tim