mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 14:01:20 +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:
		| @@ -9,6 +9,7 @@ GREP=${GREP:-$BUSYBOX grep} | ||||
| SED=${SED:-$BUSYBOX sed} | ||||
| CAT=${CAT:-$BUSYBOX cat} | ||||
| AWK=${AWK:-$BUSYBOX awk} | ||||
| PS=${PS:-$BUSYBOX ps} | ||||
|  | ||||
| ################################################################################ | ||||
| # CPUFrequency Utility Functions | ||||
| @@ -156,7 +157,7 @@ cgroups_tasks_move() { | ||||
|  | ||||
| 	[ "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` | ||||
| 	echo "PIDs to save: [$PIDS]" | ||||
| 	for TID in $PIDS; do | ||||
|   | ||||
		Reference in New Issue
	
	Block a user