#!/bin/bash dmesg > /tmp/dmesg init0=`cat /tmp/dmesg | grep -i -e "i915_init\|PM:.*complete\|00:02.0+" |grep secs |grep initcall |awk '{print $(NF-1)}'` a1=`cat /tmp/dmesg | grep -i -e "i915_init\|PM:.*complete\|00:02.0+" |grep -B1 -i -e "PM: suspend of devices complete"|grep "call 0000" |awk '{print $(NF-1)}'` a2=`cat /tmp/dmesg | grep -i -e "i915_init\|PM:.*complete\|00:02.0+" |grep -B1 -i -e "PM: noirq suspend of devices complete"|grep "call 0000" |awk '{print $(NF-1)}'` a3=`cat /tmp/dmesg | grep -i -e "i915_init\|PM:.*complete\|00:02.0+" |grep -B1 -i -e "PM: noirq resume of devices complete"|grep "call 0000" |awk '{print $(NF-1)}'` a4=`cat /tmp/dmesg | grep -i -e "i915_init\|PM:.*complete\|00:02.0+" |grep -B1 -i -e "PM: resume of devices complete"|grep "call 0000" |awk '{print $(NF-1)}'` init=`awk 'BEGIN{printf "%.3f\n",'${init0}'/'1000'}'` sus=`awk 'BEGIN{printf "%.3f\n",('${a1}'+'${a2}')/'1000'}'` resume=`awk 'BEGIN{printf "%.3f\n",('${a3}'+'${a4}')/'1000'}'` echo init time="$init" echo suspend time ="$sus" echo suspend resume time="$resume"