linux进程内存占用排序命令
发布网友
发布时间:2022-04-22 18:56
我来回答
共1个回答
热心网友
时间:2022-05-14 04:43
展开1全部linux进程内存占用排序命令今天查看linux服务器,想查看各个进程的占用率,就使用:[qhkf@116share
~]$
topPID
USER
PR
NI
VIRT
RES
SHR
S
%CPU
%MEM
TIME+
COMMAND29613
build
15
0
158m
7136
3720
S
2.0
0.1
0:00.27
svn29609
build
15
0
158m
7132
3720
S
2.3
0.1
0:00.70
svn29601
qhkf
15
0
12868
1260
820
R
0.3
0.0
0:00.09
top29598
oracle
15
0
1935m
15m
13m
S
0.0
0.2
0:00.00
oracle29596
oracle
15
0
1936m
27m
24m
S
0.0
0.3
0:00.03
oracle29582
qhkf
15
0
102m
3420
2252
S
0.0
0.0
0:00.04
vim29506
build
15
0
158m
7252
3724
S
2.3
0.1
0:03.76
svn但是没有按照内存排序,然后查了下,按一下shift
+
f
就可以出现排序的列Current
Sort
Field:
N
for
window
1:DefSelect
sort
field
via
field
letter,
type
any
other
key
to
return
a:
PID
=
Process
Id
shown
e
to
screen
width
or
your
b:
PPID
=
Parent
Process
Pid
field
order,
the
'<'
and
'>'
keys
c:
RUSER
=
Real
user
name
will
be
unavailable
until
a
field
d:
UID
=
User
Id
within
viewable
range
is
chosen.
e:
USER
=
User
Name
f:
GROUP
=
Group
Name
Note2:
g:
TTY
=
Controlling
Tty
Field
sorting
uses
internal
values,
h:
PR
=
Priority
not
those
in
column
display.
Thus,
i:
NI
=
Nice
value
the
TTY
&
WCHAN
fields
will
violate
j:
P
=
Last
used
cpu
(SMP)
strict
ASCII
collating
sequence.
k:
%CPU
=
CPU
usage
(shame
on
you
if
WCHAN
is
chosen)
l:
TIME
=
CPU
Time
m:
TIME+
=
CPU
Time,
hundredths*
N:
%MEM
=
Memory
usage
(RES)
o:
VIRT
=
Virtual
Image
(kb)
p:
SWAP
=
Swapped
size
(kb)
q:
RES
=
Resident
size
(kb)
r:
CODE
=
Code
size
(kb)
s:
DATA
=
Data+Stack
size
(kb)
t:
SHR
=
Shared
Mem
size
(kb)
u:
nFLT
=
Page
Fault
count
v:
nDRT
=
Dirty
Pages
count
w:
S
=
Process
Status
x:
COMMAND
=
Command
name/line
y:
WCHAN
=
Sleeping
in
Function
z:
Flags
=
Task
Flags
<sched.h>然后就可以选择自己喜欢的排序方式啦,例如选择N,看看那几个进程占用的内存大,接下来就可以分析啦PID
USER
PR
NI
VIRT
RES
SHR
S
%CPU%MEM
TIME+
COMMAND14101
oracle
15
0
1941m
613m
608m
S
0.0
7.7
2:25.78
oracle14095
oracle
15
0
1987m
521m
477m
S
0.0
6.5
2:24.58
oracle20477
oracle
15
0
1945m
483m
478m
S
0.0
6.1
0:24.79
oracle14522
oracle
15
0
1941m
427m
420m
S
0.0
5.4
2:20.59
oracle14105
oracle
15
0
1941m
268m
262m
S
0.0
3.4
3:46.04
oracle