Diff
1diff --git a/plugins/systemadmin/README.md b/plugins/systemadmin/README.md
2index edca4d87de515ab6f736f9c76d2573e910378be2..243db03f2e8cf786c9620850bcbb5d88d316bb91 100644
3--- a/plugins/systemadmin/README.md
4+++ b/plugins/systemadmin/README.md
5@@ -16,8 +16,8 @@ plugins=(... systemadmin)
6 | clr | `clear; echo Currently logged in on $TTY, as $USER in directory $PWD.` | Clears the screen and prints the current user, TTY, and directory |
7 | path | `print -l $path` | Displays PATH with each entry on a separate line |
8 | mkdir | `mkdir -pv` | Automatically create parent directories and display verbose output |
9-| psmem | `ps -e -orss=,args= \| sort -b -k1,1n` | Display the processes using the most memory |
10-| psmem10 | `ps -e -orss=,args= \| sort -b -k1,1n \| head -10` | Display the top 10 processes using the most memory |
11+| psmem | `ps -e -orss=,args= \| sort -b -k1 -nr` | Display the processes using the most memory |
12+| psmem10 | `ps -e -orss=,args= \| sort -b -k1 -nr \| head -10` | Display the top 10 processes using the most memory |
13 | pscpu | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr` | Display the top processes using the most CPU |
14 | pscpu10 | `ps -e -o pcpu,cpu,nice,state,cputime,args \|sort -k1 -nr \| head -10` | Display the top 10 processes using the most CPU |
15 | hist10 | `print -l ${(o)history%% *} \| uniq -c \| sort -nr \| head -n 10` | Display the top 10 most used commands in the history |
16diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh
17index ded25c3a9c11bdcca3195c1623eab9d123b12d84..03064c0350a3d45605604949c381b126170004d9 100644
18--- a/plugins/systemadmin/systemadmin.plugin.zsh
19+++ b/plugins/systemadmin/systemadmin.plugin.zsh
20@@ -25,8 +25,8 @@ alias clr='clear; echo Currently logged in on $TTY, as $USER in directory $PWD.'
21 alias path='print -l $path'
22 alias mkdir='mkdir -pv'
23 # get top process eating memory
24-alias psmem='ps -e -orss=,args= | sort -b -k1,1n'
25-alias psmem10='ps -e -orss=,args= | sort -b -k1,1n| head -10'
26+alias psmem='ps -e -orss=,args= | sort -b -k1 -nr'
27+alias psmem10='ps -e -orss=,args= | sort -b -k1 -nr | head -10'
28 # get top process eating cpu if not work try excute : export LC_ALL='C'
29 alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr'
30 alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10'