diff --git a/inxi b/inxi index e7a4110..a72e02f 100755 --- a/inxi +++ b/inxi @@ -3202,7 +3202,18 @@ get_partition_data_advanced() get_ps_data() { eval $LOGFS - local array_length='' reorder_temp='' i=0 + local array_length='' reorder_temp='' i=0 head_tail='' + + # bummer, have to make it more complex here because of reverse sort + # orders in output, pesky lack of support of +rss in old systems + case $1 in + -rss) + head_tail='head' + ;; + %cpu) + head_tail='tail' + ;; + esac # throttle potential irc abuse if [[ $B_RUNNING_IN_SHELL != 'true' && $PS_COUNT -gt 5 ]];then @@ -3210,7 +3221,7 @@ get_ps_data() fi IFS=$'\n' # note that inxi can use a lot of cpu, and can actually show up here as the script runs - A_PS_DATA=( $( ps aux --sort $1 | grep -v 'inxi' | tail -n $PS_COUNT | gawk ' + A_PS_DATA=( $( ps aux --sort $1 | grep -Ev "($SCRIPT_NAME|%CPU)" | $head_tail -n $PS_COUNT | gawk ' BEGIN { IGNORECASE=1 appName=""