tech:top-batch
Lister la table des process dans un fichier txt avec top
top -n 1 -b > /tmp/processtable.txt top -b -n 1 -o '%CPU' |sed 1,7d getCpu="$(top -b -n2 -d10 | awk '/PID USER/ {getline;printf "Process: %s, cpu: %s %\n",$12,$9}' | tail -1)" typeset -i cpu="$(echo $getCpu | awk -F"," '{print $2}'| awk -F":" '{print $2}' | awk '{print $1}')"
tech/top-batch.txt · Dernière modification : de 127.0.0.1
