from https://www.ludovicocaldara.net/dba/real-memory-usage-on-linux/ cat mem.sh #!/bin/bash username=`whoami` username=oracle sids=`ps -eaf | grep "^$username" | grep pmon | grep -v " grep " | awk '{print substr($NF,10)}'` total=0 for sid in $sids ; do pids=`ps -eaf | grep "^$username" | grep -- "$sid" | grep -v " grep " | awk '{print $2}'` mem=`pmap $pids 2>&1 | grep "K " | sort | awk '{print $1 " " substr($2,1,length($2)-1)}' | uniq | awk ' BEGIN { sum=0 } { sum+=$2} END {print sum}' ` echo "$sid : $mem" total=`expr $total + $mem` done echo "total : $total" ./mem.sh ugaryd : 6790308 ugary : 9707680 irac1 : 23071180 total : 39569168
Search This Blog
Total Pageviews
Monday, 14 October 2024
Oracle Instances memory consumption on Linux
Subscribe to:
Post Comments (Atom)
Oracle DBA
anuj blog Archive
- ► 2011 (362)
No comments:
Post a Comment