This will list processes as expected. Remember that ps shows memory size in kilobytes.
ps -u 1000 -o pid,user,stime,rss \
| awk '{if($4 > 50000 && $4 < 100000){ print $0 }}' \
| sort -n -k 4,4
Command output:
3407 luis.mu+ 10:30 51824
3523 luis.mu+ 10:30 66108
3410 luis.mu+ 10:30 71060
3595 luis.mu+ 10:30 74340
3609 luis.mu+ 10:30 77772
18550 luis.mu+ 16:47 93616
In that case it's showing only 4 fields for user id 1000. To show all processes use
ps -e -o pid,user,stime,rss
From the ps(3)
man page under STANDARD FORMAT SPECIFIERS
:
rss
resident set size, the non-swapped physical memory that a task has used (inkiloBytes)
If you want to show more fields, check the man page and add fields to -o
option.