来来的爸爸不睡觉

no-sleep Lailai's father
星期五 十二月 21, 2007

finding memory leaks for Solaris applications

using ksh, to find leaks in 'iostat' utility

LD_PRELOAD=libumem.so;UMEM_DEBUG=default;UMEM_LOGGING=transaction; 
export LD_PRELOAD UMEM_DEBUG UMEM_LOGGING
truss -fT exit -t \!all -s \!all /usr/bin/iostat -xYn > /dev/null
<<displays pid ##### at exit time>>>
echo "::findleaks -d" | mdb -p `pgrep iostat`;prun `pgrep iostat`
[]

example of fmdump -t [time]

for gettimeopt function:
bash-3.2# truss -fT exit -t \!all -s \!all /fmdump -t 10:20:11 > /dev/null
102205: _exit(0)
bash-3.2# echo "::findleaks -vd" |mdb -p 102205;prun 102205 
[]

Memory Leak Testing Steps for fmdump

bash-3.2# truss -fT exit -t \!all -s \!all /fmdump -e -n class=*scsi* -n ena=b > /dev/null
 << pid #>>
bash-3.2# echo "::findleaks -vd" |mdb -p <<pid #>>;prun <<pid #>>

评论:

Thanks buddy ,this helped me.

-- Chandan

发表于 chandan 在 2008年01月08日, 03:17 下午 GMT+08:00 #

发表一条评论:
  • HTML语法: 禁用

归档
链接
引用