Skip to main content

Posts

Showing posts from May, 2019

awk output number manipulation example: calculate etc

example 1: calculate shared memory usage  # ipcs -m|awk '$5 ~ /^[0-9]/ {print $5}'|xargs | sed -e 's/ /+/g' | bc example 2: find process which locks ASM disk # lsof /dev/oracleasm/vote0|awk '$2 ~ /^[0-9]/ {print $2}'|sed 's/ /,/g'|xargs ps -fp UID        PID  PPID  C STIME TTY      STAT   TIME CMD oracle    1426     1  0 Apr30 ?        Ss     0:29 ora_rbal_db1_1 oracle    1463     1  0 Apr30 ?        Ss     0:28 ora_rbal_db2_1