From 0e18ecdc8ae189011a6f634d94b272c7fb8de5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20DAVID?= Date: Fri, 30 Jun 2017 12:48:16 +0200 Subject: [PATCH] systemadmin plugin: Fix head line sorting Inside `pscpu` and `pscpu10` aliases, remove sorting of the head line --- plugins/systemadmin/systemadmin.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index 8c263335..337bef81 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -37,8 +37,8 @@ alias mkdir='mkdir -pv' alias psmem='ps -e -orss=,args= | sort -b -k1,1n' alias psmem10='ps -e -orss=,args= | sort -b -k1,1n| head -10' # get top process eating cpu if not work try excute : export LC_ALL='C' -alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1 -nr' -alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1 -nr | head -10' +alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr' +alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10' # top10 of the history alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'