Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

HP-UX reading memory of java process

  • 29-05-2006 03:00PM
    #1
    Registered Users, Registered Users 2 Posts: 7


    I wanna return the memory used from a JAVA process using a shell script.

    Now i thought i could use the following:
    ps -uusername -o vsz, comm | grep java

    Which returns:
    182332 java

    it seems to just return a size that is not the same as the one if i do a top command. Why is this how should i proceed what option to use help greatly appreciated

    If i look at top command the process has following details:
    CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %
    6 ? 25057 username 152 20 1945M 583M run 489:24 4.69 4.68 java
    I thought about top | grep java | grep username but not liking it.

    To make it more fun using HP-UX.

    Any ideas how i go about this?


Advertisement