Michael Lam
asked on
how to tell memory useage of my app in a Mac
i am introducing caching to one of my apps (it calls various service methods to access data from DB), and i want to find out how much extra physical memory it takes. i have tried the activity monitor and also this:
$ Ps -ef | grep dsp
716566150 3234 1070 0 5:41PM ttys000 1:43.18 /Library/Java/JavaVirtualM achines/jd k1.7.0_51. jdk/Conten ts/Home/bi n/java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_soc ket,server =y,suspend =n,address =5005 -server -Xms128M -Xmx512M -XX:+HeapDumpOnOutOfMemory Error -XX:PermSize=128M -Dcom.sun.management.jmxre mote -Ddsp-env=osgi -Djava.net.preferIPv4Stack =true -Djava.security.egd=file:/ //dev/uran dom -Djava.endorsed.dirs=/Libr ary/Java/J avaVirtual Machines/j dk1.7.0_51 .jdk/Conte nts/Home/j re/lib/end orsed:/Lib rary/Java/ JavaVirtua lMachines/ jdk1.7.0_5 1.jdk/Cont ents/Home/ lib/endors ed:/Users/ 212353126/ GIA150/dsp -k-1.5.0/l ib/endorse d -Djava.ext.dirs=/Library/J ava/JavaVi rtualMachi nes/jdk1.7 .0_51.jdk/ Contents/H ome/jre/li b/ext:/Lib rary/Java/ JavaVirtua lMachines/ jdk1.7.0_5 1.jdk/Cont ents/Home/ lib/ext:/U sers/21235 3126/GIA15 0/dsp-k-1. 5.0/lib/ex t -Dkaraf.instances=/Users/2 12353126/G IA150/dsp- k-1.5.0/in stances -Dkaraf.home=/Users/212353 126/GIA150 /dsp-k-1.5 .0 -Dkaraf.base=/Users/212353 126/GIA150 /dsp-k-1.5 .0 -Dkaraf.data=/Users/212353 126/GIA150 /dsp-k-1.5 .0/data -Djava.io.tmpdir=/Users/21 2353126/GI A150/dsp-k -1.5.0/dat a/tmp -Djava.util.logging.config .file=/Use rs/2123531 26/GIA150/ dsp-k-1.5. 0/etc/java .util.logg ing.proper ties -Dkaraf.startLocalConsole= true -Dkaraf.startRemoteShell=t rue -classpath /Users/212353126/GIA150/ds p-k-1.5.0/ lib/karaf- jaas-boot. jar:/Users /212353126 /GIA150/ds p-k-1.5.0/ lib/karaf. jar org.apache.karaf.main.Main
716566150 3408 3182 0 5:59PM ttys004 0:00.00 grep dsp
but i am not sure what all the results mean. for example, what is the memory usage? is it possible to break the usage down to a finer level, e.g. by thread or service call? also is there a way to log the usage?
$ Ps -ef | grep dsp
716566150 3234 1070 0 5:41PM ttys000 1:43.18 /Library/Java/JavaVirtualM
716566150 3408 3182 0 5:59PM ttys004 0:00.00 grep dsp
but i am not sure what all the results mean. for example, what is the memory usage? is it possible to break the usage down to a finer level, e.g. by thread or service call? also is there a way to log the usage?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ps -meo %mem -o command|more