Logo Background

Monitor Unix Memory RSS And VSS

  • Keep a good practice in monitor your Unix system memory growth especially on memory RSS and VSS using glance on HP-UX. What if you don’t have the tools glance available for system monitoring?

    You can opt to use the command top, however I would love to use the command ‘UNIX95= ps -eo vsz,ruser,pid,args | sort -rn’ in any Unix variant as the output doesn’t change fast on screen.

    You can split the monitoring based on process name such as f60webmx (Oracle Forms session), java or LIB (Oracle Concurrent Manager session) by using the query as below.

    while true
    do
    UNIX95= ps -eo vsz,ruser,pid,args | sort -rn | grep f60webmx | grep applprod | head -20
    sleep 5
    clear
    done
    while true
    do
    UNIX95= ps -eo vsz,ruser,pid,args | sort -rn | grep java | grep applprod | head -20
    sleep 5
    clear
    done
    while true
    do
    UNIX95= ps -eo vsz,ruser,pid,args | sort -rn | grep LIB | grep applprod | head -20
    sleep 5
    clear
    done

    In every 5 second, the screen will be refresh to display the top 20 process with highest memory consumption.

    From the first column of the result, multiply it with 4096 and divide by 1024/1024 to get the result of memory in MB.

  1. #1 Ruben
    January 25, 2010 12:36 am

    Are you having high memory consumption in java process? Use the script to check on the JDBC connectivity if you are running on Oracle E-Business 11i or R12.

    select ‘Number of user sessions : ‘ || count( distinct session_id) How_many_user_sessions
    from icx_sessions icx where disabled_flag != ‘Y’
    and PSEUDO_FLAG = ‘N’
    and (last_connect + decode(FND_PROFILE.VALUE(‘ICX_SESSION_TIMEOUT’), NULL,limit_time, 0,limit_time,FND_PROFILE.VALUE(‘ICX_SESSION_TIMEOUT’)/60)/24) > sysdate and counter < limit_connects;

    select count(*), machine, process, module
    from v$session
    where program like 'JDBC%'
    group by machine, process, module order by 1 asc;

    Post ReplyPost Reply
  1. #2 Kusanagi
    February 4, 2010 8:06 pm

    Ruben,

    We had error on the Oracle E-Business Suite login page where the user saw the error as below.

    Request URI:/OA_HTML/AppsLocalLogin.jsp
    Exception:
    java.lang.OutOfMemoryError: Java heap space

    We found there’s high number of JDBC connection upon checking using your SQL.

    We restarted our Apache instance in periodic basis to flush the Java memory heap and set the concurrent memory growth by setting the 2 lines below in environment files:

    FDMXHEAP=500000000
    export FDMXHEAP

    The value of FDMXHEAP was set to 500MB and we still monitor on the issue. Let me know if you have any solution to share. Thanks

    Post ReplyPost Reply
Leave a Comment