3 # This script shows the ionice value for all processes by adding this value
5 type ionice
&>/dev
/null ||
{ echo "ionice not available" >&2; exit 1; }
7 /bin
/ps
-e -o pid
,nice
,args |
8 while read pid nice rest
13 #printf %13s' ' IONICE
15 echo " PID IONICE NI COMMAND"
17 ionice_value
=$
(ionice
-p "$pid" 2>/dev
/null |
sed -n 's/:.* /\//p')
18 if [ -z "$ionice_value" ]
23 printf %13s
' ' $ionice_value