vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| cnwy@263.net schreef: > I want to get the total memory usage. > I have tried topas, > MEMORY > Real,MB 15808 > % Comp 28.5 > % Noncomp 72.4 > % Client 72.4 > > PAGING SPACE > Size,MB 8192 > % Used 1.2 > % Free 98.7 > > but don't know which one is it. try this scripts, then you see the real memory usage: #!/bin/ksh clear echo "`/usr/bin/svmon -G `">xx cat xx|grep memory|awk '{print $2"\t"$3"\t"$4}'>mem_frames cat xx|grep pg |awk '{print $3"\t"$4}'>mem_pages echo "Real memory Usage" echo "-----------------------------" cat mem_frames|while read size inuse free do rsize=$(printf "%s\n" 'scale =5; '$size'/1024/1024*4' | bc) rinuse=$(printf "%s\n" 'scale =5; '$inuse'/1024/1024*4' | bc) rfree=$(printf "%s\n" 'scale =5; '$free'/1024*4' | bc) percent=$(printf "%s\n" 'scale =3; '$inuse'/'$size'*100' | bc) echo "Total Installed : $rsize GB" echo "Total Used : $rinuse GB" echo "Total Free : $rfree MB" echo "REAL MEMORY USAGE : % : $percent" echo "-----------------------------" done echo "" cat mem_pages|while read pgsize pginuse do paging_size=$(printf "%s\n" 'scale =5; '$pgsize'/1024*4' | bc) paging_used=$(printf "%s\n" 'scale =5; '$pginuse'/1024*4' | bc) percent2=$(printf "%s\n" 'scale =3; '$pginuse'/'$pgsize'*100' | bc) echo "Paging Space Usage" echo "-----------------------------" echo "Total Pg Space : $paging_size MB" echo "Pg Space Used : $paging_used MB" echo "Percent Used PAGING : $percent2" echo "-----------------------------" done # |
| ||||
| cnwy@263.net wrote: > I want to get the total memory usage. > I have tried topas, > [snip] > but don't know which one is it. What is your definition of "total memory usage"? If you simply look for "non-free" physical memory, or, "active virtual memory" (that is, the amount of virtual memory being used for all programs, regardless in ram or paging space, excluding file cache), then "vmstat" is the easiest tool, and you can run it as any user. See, http://publib.boulder.ibm.com/infoce...ds6/vmstat.htm (check the description for "avm" and "fre") To help you better understand the overall picture: http://publib.boulder.ibm.com/infoce...m_overview.htm Tao |