Древние бояны, чтобы не забыть… SHM segsize.

ipcs -ma | grep "^m " | sort -n -k 10 | awk '{print $10}' | while read num ; do echo -n "SHM Mb:  " ; echo -n `echo "$num/1024/1024" | bc` ; echo " Mb" ; done

Верный способ:

ipcs -ma | grep "^m " | sort -n -k 10 | awk '{print "Mem SEGSZ " $10/1024/1024 " Mb"; sum+=$10} END {print "Total SEGsize "sum/1024/1024" Mb"}'

В бою все средства хороши 😉

Leave a Reply