#NEWLINE# def get_cpu_average( self ) : #NEWLINE# #INDENT# pidfile = ( ( self . mainnet and '.dash/dashd.pid' ) or '.dash/testnet/testnet3/dashd.pid' ) #NEWLINE# cmd = ( "top -p `cat $HOME/%s` -n1 | awk '/ dashd /{print $10}'" % pidfile ) #NEWLINE# cpu = ( subprocess . check_output ( cmd , shell = True ) . rstrip ( '\n' ) or 100 ) #NEWLINE# return self . cpu_pct ( pidfile )