mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
shutils/cgroups: Use busybox ps
to fix output format
Different `ps` implementations (e.g. Android vs GNU) have different default columns and process selections.
This commit is contained in:
parent
3dd4ea69b4
commit
0dc65bddb6
@ -9,6 +9,7 @@ GREP=${GREP:-$BUSYBOX grep}
|
|||||||
SED=${SED:-$BUSYBOX sed}
|
SED=${SED:-$BUSYBOX sed}
|
||||||
CAT=${CAT:-$BUSYBOX cat}
|
CAT=${CAT:-$BUSYBOX cat}
|
||||||
AWK=${AWK:-$BUSYBOX awk}
|
AWK=${AWK:-$BUSYBOX awk}
|
||||||
|
PS=${PS:-$BUSYBOX ps}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# CPUFrequency Utility Functions
|
# CPUFrequency Utility Functions
|
||||||
@ -156,7 +157,7 @@ cgroups_tasks_move() {
|
|||||||
|
|
||||||
[ "x$FILTERS" = "x" ] && exit 0
|
[ "x$FILTERS" = "x" ] && exit 0
|
||||||
|
|
||||||
PIDS=`ps | $GREP $FILTERS | $AWK '{print $2}'`
|
PIDS=`$PS -o comm,pid | $GREP $FILTERS | $AWK '{print $2}'`
|
||||||
PIDS=`echo $PIDS`
|
PIDS=`echo $PIDS`
|
||||||
echo "PIDs to save: [$PIDS]"
|
echo "PIDs to save: [$PIDS]"
|
||||||
for TID in $PIDS; do
|
for TID in $PIDS; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user