mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
bug fix, have to reverse sort orders too, sigh...
This commit is contained in:
parent
211cba3a5f
commit
fe066bf62f
15
inxi
15
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=""
|
||||
|
|
Loading…
Reference in a new issue