- 论坛徽章:
- 0
|
10可用积分
内存去了哪里?
top 的输出:
- last pid: 15036; load averages: 0.07, 0.13, 0.15 20:59:17
- 126 processes: 125 sleeping, 1 on cpu
- CPU states: 97.0% idle, 1.0% user, 1.9% kernel, 0.1% iowait, 0.0% swap
- Memory: 4096M real, 363M free, 16G swap free
- PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
- 14980 root 1 59 0 2104K 1464K cpu0 0:00 0.46% top-3.5b8-sun4u
- 2011 root 1 0 0 2688K 1648K sleep 188:42 0.15% sample_hardware
- 1740 smp 1 59 0 32M 11M sleep 456:34 0.14% oamagent
- 1708 root 1 50 0 2136K 1680K sleep 95:42 0.07% spy.sh
- 1 root 1 59 0 904K 688K sleep 283:58 0.07% init
- 16596 root 1 59 0 2128K 1672K sleep 266:35 0.07% spy.sh
- 2009 smp 1 59 0 1864K 1096K sleep 42:17 0.05% instantwatcher.
- 310 root 7 59 0 4352K 3536K sleep 28:25 0.04% picld
- 518 root 27 59 0 6280K 5824K sleep 165:07 0.02% nscd
- 15035 root 1 0 0 1312K 1128K sleep 0:00 0.02% iostat
- 15036 root 1 0 0 1336K 1080K sleep 0:00 0.02% awk
- 15021 root 1 50 0 968K 696K sleep 0:00 0.02% sleep
- 869 info2 2 59 0 273M 257M sleep 54:25 0.02% oninit
- 901 info2 1 59 0 273M 3256K sleep 12:46 0.02% oninit
- 14900 root 1 59 0 968K 696K sleep 0:00 0.02% sleep
复制代码
内存使用率为超过90%
另外一个计算方法
- root# /usr/bin/ps -eao "pmem" | awk '{a+=$1} END {print a}'
- 40.7
复制代码
/usr/ucb/ps -axuww 的输出
USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND
.
.
.
计算%MEM 一列的总和也为40.7 这些都和top的显示结果不一样,内存去了哪里?
- root@ # prtdiag | more
- System Configuration: Sun Microsystems sun4u Sun Fire V440
- System clock frequency: 177 MHZ
- Memory size: 4GB
- ==================================== CPUs ====================================
- E$ CPU CPU Temperature Fan
- CPU Freq Size Impl. Mask Die Ambient Speed Unit
- --- -------- ---------- ------ ---- -------- -------- ----- ----
- 0 1593 MHz 1MB US-IIIi 3.4 - -
- 1 1593 MHz 1MB US-IIIi 3.4 - -
- ================================= IO Devices =================================
- Bus Freq
- Brd Type MHz Slot Name Model
- --- ---- ---- ---------- ---------------------------- --------------------
- 0 pci 66 PCI5 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 PCI5 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 MB pci108e,abba (network) SUNW,pci-ce
- 0 pci 66 PCI4 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 PCI4 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 MB isa/su (serial)
- 0 pci 33 MB isa/su (serial)
- 0 pci 33 MB isa/rmc-comm-rmc_comm (seria+
- 0 pci 33 MB pci10b9,5229 (ide)
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 MB pci108e,abba (network) SUNW,pci-ce
- 0 pci 66 MB scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 MB scsi-pci1000,30 (scsi-2) LSI,1030
- ============================ Memory Configuration ============================
- Segment Table:
- -----------------------------------------------------------------------
- Base Address Size Interleave Factor Contains
- -----------------------------------------------------------------------
- 0x0 2GB 4 BankIDs 0,1,2,3
- 0x1000000000 2GB 4 BankIDs 16,17,18,19
- Bank Table:
- -----------------------------------------------------------
- Physical Location
- ID ControllerID GroupID Size Interleave Way
- -----------------------------------------------------------
- 0 0 0 512MB 0,1,2,3
- 1 0 1 512MB
- 2 0 1 512MB
- 3 0 0 512MB
- 16 1 0 512MB 0,1,2,3
- 17 1 1 512MB
- 18 1 1 512MB
- 19 1 0 512MB
- Memory Module Groups:
- --------------------------------------------------
- ControllerID GroupID Labels
- --------------------------------------------------
- 0 0 C0/P0/B0/D0,C0/P0/B0/D1
- 0 1 C0/P0/B1/D0,C0/P0/B1/D1
- Memory Module Groups:
- --------------------------------------------------
- ControllerID GroupID Labels
- --------------------------------------------------
- 1 0 C1/P0/B0/D0,C1/P0/B0/D1
- 1 1 C1/P0/B1/D0,C1/P0/B1/D1
- ======== FRU Status =========
- -------------------------
- Fru Operational Status:
- -------------------------
- Location Status
- -------------------------
- SC okay
- PS0 okay
- PS1 okay
- HDD0 present
- HDD1 present
- HDD2 present
- HDD3 present
- root@smcp2 #
- root@smcp2 # prtdiag | grep MB
- 0 1593 MHz 1MB US-IIIi 3.4 - -
- 1 1593 MHz 1MB US-IIIi 3.4 - -
- 0 pci 66 MB pci108e,abba (network) SUNW,pci-ce
- 0 pci 33 MB isa/su (serial)
- 0 pci 33 MB isa/su (serial)
- 0 pci 33 MB isa/rmc-comm-rmc_comm (seria+
- 0 pci 33 MB pci10b9,5229 (ide)
- 0 pci 66 MB pci108e,abba (network) SUNW,pci-ce
- 0 pci 66 MB scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 MB scsi-pci1000,30 (scsi-2) LSI,1030
- 0 0 0 512MB 0,1,2,3
- 1 0 1 512MB
- 2 0 1 512MB
- 3 0 0 512MB
- 16 1 0 512MB 0,1,2,3
- 17 1 1 512MB
- 18 1 1 512MB
- 19 1 0 512MB
- root@smcp2 # prtdiag | more
- System Configuration: Sun Microsystems sun4u Sun Fire V440
- System clock frequency: 177 MHZ
- Memory size: 4GB
- ==================================== CPUs ====================================
- E$ CPU CPU Temperature Fan
- CPU Freq Size Impl. Mask Die Ambient Speed Unit
- --- -------- ---------- ------ ---- -------- -------- ----- ----
- 0 1593 MHz 1MB US-IIIi 3.4 - -
- 1 1593 MHz 1MB US-IIIi 3.4 - -
- ================================= IO Devices =================================
- Bus Freq
- Brd Type MHz Slot Name Model
- --- ---- ---- ---------- ---------------------------- --------------------
- 0 pci 66 PCI5 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 PCI5 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 MB pci108e,abba (network) SUNW,pci-ce
- 0 pci 66 PCI4 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 PCI4 scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 PCI2 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 MB isa/su (serial)
- 0 pci 33 MB isa/su (serial)
- 0 pci 33 MB isa/rmc-comm-rmc_comm (seria+
- 0 pci 33 MB pci10b9,5229 (ide)
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 33 PCI3 pci100b,35 (network) SUNW,pci-x-qge
- 0 pci 66 MB pci108e,abba (network) SUNW,pci-ce
- 0 pci 66 MB scsi-pci1000,30 (scsi-2) LSI,1030
- 0 pci 66 MB scsi-pci1000,30 (scsi-2) LSI,1030
- ============================ Memory Configuration ============================
- Segment Table:
- -----------------------------------------------------------------------
- Base Address Size Interleave Factor Contains
- -----------------------------------------------------------------------
- 0x0 2GB 4 BankIDs 0,1,2,3
- 0x1000000000 2GB
复制代码
没有遇到过此类问题,还需要什么信息,我一并贴上来,还有50%的内存去了哪里? |
最佳答案
查看完整内容
How did you get this result? The memory used in top's summary section inculde exec mem + file cache while 30% memory used from ps command is exec memory only.If you are using Solaris 9 or 10, echo ::memstat|mdb -k should give you a better reading of the memory usage.[ 本帖最后由 briangao 于 2007-10-17 19:12 编辑 ]
|