[20190321]smem的顯示缺陷.txt

来源:https://www.cnblogs.com/lfree/archive/2019/03/21/10572332.html
-Advertisement-
Play Games

[20190321]smem的顯示缺陷.txt1.smem 加入-m參數顯示存在缺陷,map的信息不全:# smem -tk -m -U oracle -P "oraclepeis|ora_"Map PIDs AVGPSS PSS/u01/app/oracle/product/10.2.0/db_1 ...


[20190321]smem的顯示缺陷.txt

1.smem 加入-m參數顯示存在缺陷,map的信息不全:

# smem -tk -m -U oracle -P "oraclepeis|ora_"
Map                                       PIDs   AVGPSS      PSS
/u01/app/oracle/product/10.2.0/db_1/dbs/    15        0        0
[vdso]                                     308        0        0
[vsyscall]                                 308        0        0
/lib64/libaio.so.1.0.1                     308     3.0K     1.1M
/lib64/libnsl-2.12.so                      308     7.0K     2.1M
/lib64/ld-2.12.so                          308     7.0K     2.1M
/u01/app/oracle/product/10.2.0/db_1/lib/   308     7.0K     2.1M
/u01/app/oracle/product/10.2.0/db_1/lib/   308     7.0K     2.1M
/lib64/libdl-2.12.so                       308     7.0K     2.1M
/lib64/libnss_files-2.12.so                308     7.0K     2.2M
/lib64/libpthread-2.12.so                  308     7.0K     2.2M
/lib64/libm-2.12.so                        308     7.0K     2.3M
/lib64/libc-2.12.so                        308    12.0K     3.7M
/u01/app/oracle/product/10.2.0/db_1/lib/   308    14.0K     4.2M
/u01/app/oracle/product/10.2.0/db_1/lib/   308    21.0K     6.5M
/u01/app/oracle/product/10.2.0/db_1/lib/   308    21.0K     6.5M
/u01/app/oracle/product/10.2.0/db_1/lib/   308    32.0K     9.7M
/u01/app/oracle/product/10.2.0/db_1/lib/   308    56.0K    17.1M
[stack]                                    308    80.0K    24.1M
/u01/app/oracle/product/10.2.0/db_1/lib/   308   103.0K    31.2M
/u01/app/oracle/product/10.2.0/db_1/bin/   308   127.0K    38.3M
<anonymous>                                308   242.0K    72.8M
[heap]                                     308   466.0K   140.5M
/dev/zero                                  308   561.0K   168.9M
/u01/app/oracle/product/10.2.0/db_1/lib/   308   589.0K   177.4M
/u01/app/oracle/product/10.2.0/db_1/lib/   308     1.4M   417.1M
/SYSV94f021f8                              308     2.8M   876.1M
-----------------------------------------------------------------
27                                        8023     6.5M     2.0G

--//Map部分顯示寬度不足.可以加寬到80.很容易修改python的腳本,我不懂python,看一下源代碼就可以了.
--//修改前註意備份!!

# diff -Nur  smem.ORG smem
--- smem.ORG    2019-03-21 11:18:59.117243470 +0800
+++ smem        2013-03-28 11:01:07.000000000 +0800
@@ -330,7 +330,7 @@
     pt = maptotals(p)

     fields = dict(
-        map=('Map', lambda n: n, '%-80.80s', len,
+        map=('Map', lambda n: n, '%-40.40s', len,
              'mapping name'),
         count=('Count', lambda n: pt[n]['count'], '% 5s', sum,
                'number of mappings found'),

# smem.ORG -tk -m -U oracle -P "oraclepeis|ora_"
Map                                                                               PIDs   AVGPSS      PSS
/u01/app/oracle/product/10.2.0/db_1/dbs/hc_peis.dat                                 15        0        0
[vdso]                                                                             151        0        0
[vsyscall]                                                                         151        0        0
/lib64/libaio.so.1.0.1                                                             151     3.0K   588.0K
/u01/app/oracle/product/10.2.0/db_1/lib/libclsra10.so                              151     7.0K     1.1M
/lib64/libnsl-2.12.so                                                              151     7.0K     1.1M
/lib64/libnss_files-2.12.so                                                        151     7.0K     1.1M
/u01/app/oracle/product/10.2.0/db_1/lib/libskgxn2.so                               151     7.0K     1.1M
/lib64/libdl-2.12.so                                                               151     7.0K     1.1M
/lib64/ld-2.12.so                                                                  151     7.0K     1.1M
/lib64/libpthread-2.12.so                                                          151     7.0K     1.1M
/lib64/libm-2.12.so                                                                151     8.0K     1.2M
/lib64/libc-2.12.so                                                                151    14.0K     2.2M
/u01/app/oracle/product/10.2.0/db_1/lib/libdbcfg10.so                              151    15.0K     2.2M
/u01/app/oracle/product/10.2.0/db_1/lib/libocrb10.so                               151    22.0K     3.4M
/u01/app/oracle/product/10.2.0/db_1/lib/libskgxp10.so                              151    22.0K     3.4M
/u01/app/oracle/product/10.2.0/db_1/lib/libocr10.so                                151    34.0K     5.0M
/u01/app/oracle/product/10.2.0/db_1/lib/libocrutl10.so                             151    61.0K     9.0M
[stack]                                                                            151    97.0K    14.4M
/u01/app/oracle/product/10.2.0/db_1/lib/libhasgen10.so                             151   110.0K    16.3M
/u01/app/oracle/product/10.2.0/db_1/bin/oracle                                     151   222.0K    32.8M
<anonymous>                                                                        151   265.0K    39.2M
[heap]                                                                             151   488.0K    72.0M
/u01/app/oracle/product/10.2.0/db_1/lib/libnnz10.so                                151   640.0K    94.4M
/dev/zero                                                                          151   950.0K   140.1M
/u01/app/oracle/product/10.2.0/db_1/lib/libjox10.so                                151     1.5M   221.0M
/SYSV94f021f8                                                                      151     5.8M   880.7M
---------------------------------------------------------------------------------------------------------
27                                                                                3941    10.2M     1.5G

--//PIDS表示查詢的進程數量,它是將PSS平均分攤到各個用戶.
--//SYSV94f021f8表示共用記憶體段.

# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x94f021f8 32768      oracle     640        1176502272 151
              
--//key=0x94f021f8,不過後面的PSS如果計算的不是很清楚感覺應該是1176502272/1024/1024 = 1122M.難道不過全部載入嗎?
--//nattch表示連接使用共用記憶體段的進程數.正好151可以與smem顯示的PIDS對上.不再生產系統折騰,換測試機器測試.

2.測試環境:

# smem -tk -m -U oracle -P "oraclebook|ora_"
Map                                                                               PIDs   AVGPSS      PSS
/SYSV00000000                                                                       26        0        0
/SYSVe8a8ec10                                                                       26        0        0
/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/hc_book.dat                           21        0        0
[vdso]                                                                              26        0        0
[vsyscall]                                                                          26        0        0
/lib64/libnss_dns-2.5.so                                                             1    24.0K    24.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnque11.so                           6     5.0K    30.0K
/lib64/libresolv-2.5.so                                                              1    35.0K    35.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libclsra11.so                         26     4.0K   104.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocrutl11.so                        26     4.0K   104.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libskgxn2.so                          26     4.0K   104.0K
/usr/lib64/libaio.so.1.0.1                                                          26     4.0K   104.0K
/usr/lib64/libnuma.so.1                                                             26     4.0K   104.0K
/lib64/libdl-2.5.so                                                                 26     8.0K   208.0K
/lib64/libnsl-2.5.so                                                                26     8.0K   208.0K
/lib64/librt-2.5.so                                                                 26     8.0K   208.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libdbcfg11.so                         26     8.0K   208.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnfsodm11.so                        26     8.0K   208.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libskgxp11.so                         26     8.0K   208.0K
/lib64/libnss_files-2.5.so                                                          26     8.0K   212.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocrb11.so                          26     9.0K   234.0K
/lib64/libpthread-2.5.so                                                            26     9.0K   237.0K
/lib64/ld-2.5.so                                                                    26    10.0K   260.0K
/lib64/libm-2.5.so                                                                  26    12.0K   328.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocr11.so                           26    14.0K   364.0K
/lib64/libc-2.5.so                                                                  26    22.0K   581.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libcell11.so                          26    69.0K     1.8M
[stack]                                                                             26    82.0K     2.1M
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libhasgen11.so                        26   162.0K     4.1M
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnnz11.so                           26   231.0K     5.9M
[heap]                                                                              26   418.0K    10.6M
/dev/zero                                                                           26   793.0K    20.1M
/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle                                26     1.3M    35.1M
<anonymous>                                                                         26     1.6M    42.4M
---------------------------------------------------------------------------------------------------------
34                                                                                 809     4.9M   126.1M
--//奇怪在共用記憶體段使用0.

# ipcs -m
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 349011969  oracle    640        12582912   26
0x00000000 349044738  oracle    640        633339904  26
0xe8a8ec10 349077507  oracle    640        2097152    26

3.關閉hugepages看看.
vm.nr_hugepages = 0
vm.nr_overcommit_hugepages = 0

# grep -i page /proc/meminfo
AnonPages:        249336 kB
PageTables:        18228 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB

# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 349208577  oracle    640        12582912   22
0x00000000 349241346  oracle    640        633339904  22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xe8a8ec10 349274115  oracle    640        2097152    22

# smem -tk -m -U oracle -P "oraclebook|ora_"
Map                                                                               PIDs   AVGPSS      PSS
/SYSVe8a8ec10                                                                       22        0        0
/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/hc_book.dat                           20        0        0
[vdso]                                                                              22        0        0
[vsyscall]                                                                          22        0        0
/lib64/libnss_dns-2.5.so                                                             1    24.0K    24.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnque11.so                           4     6.0K    24.0K
/lib64/libresolv-2.5.so                                                              1    35.0K    35.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libclsra11.so                         22     4.0K    88.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocrutl11.so                        22     4.0K    88.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libskgxn2.so                          22     4.0K    88.0K
/usr/lib64/libaio.so.1.0.1                                                          22     4.0K    88.0K
/usr/lib64/libnuma.so.1                                                             22     4.0K    88.0K
/lib64/libdl-2.5.so                                                                 22     8.0K   176.0K
/lib64/libnsl-2.5.so                                                                22     8.0K   176.0K
/lib64/librt-2.5.so                                                                 22     8.0K   176.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libdbcfg11.so                         22     8.0K   176.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnfsodm11.so                        22     8.0K   176.0K
/lib64/libnss_files-2.5.so                                                          22     8.0K   179.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocrb11.so                          22     9.0K   198.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libskgxp11.so                         22     9.0K   198.0K
/lib64/libpthread-2.5.so                                                            22     9.0K   200.0K
/lib64/ld-2.5.so                                                                    22    10.0K   220.0K
/lib64/libm-2.5.so                                                                  22    12.0K   281.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocr11.so                           22    14.0K   308.0K
/lib64/libc-2.5.so                                                                  22    22.0K   492.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libcell11.so                          22    70.0K     1.5M
[stack]                                                                             22    73.0K     1.6M
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libhasgen11.so                        22   166.0K     3.6M
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnnz11.so                           22   232.0K     5.0M
[heap]                                                                              22   420.0K     9.0M
/dev/zero                                                                           22   572.0K    12.3M
/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle                                22     1.6M    34.4M
<anonymous>                                                                         22     1.8M    38.6M
/SYSV00000000                                                                       22     4.0M    88.6M
---------------------------------------------------------------------------------------------------------
34                                                                                 686     9.1M   198.0M

--///SYSV00000000那行PSS=88.6M.
SYS@book> select /*+ full(A) */ count(*) from sh.sales a;
  COUNT(*)
----------
    918843

[root@gxqyydg4 IP=100.78 /etc ] # smem -tk -m -U oracle -P "oraclebook|ora_"
Map                                                                               PIDs   AVGPSS      PSS
/SYSVe8a8ec10                                                                       22        0        0
/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/hc_book.dat                           20        0        0
[vdso]                                                                              22        0        0
[vsyscall]                                                                          22        0        0
/lib64/libnss_dns-2.5.so                                                             1    24.0K    24.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnque11.so                           4     6.0K    24.0K
/lib64/libresolv-2.5.so                                                              1    35.0K    35.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libclsra11.so                         22     4.0K    88.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocrutl11.so                        22     4.0K    88.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libskgxn2.so                          22     4.0K    88.0K
/usr/lib64/libaio.so.1.0.1                                                          22     4.0K    88.0K
/usr/lib64/libnuma.so.1                                                             22     4.0K    88.0K
/lib64/libdl-2.5.so                                                                 22     8.0K   176.0K
/lib64/libnsl-2.5.so                                                                22     8.0K   176.0K
/lib64/librt-2.5.so                                                                 22     8.0K   176.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libdbcfg11.so                         22     8.0K   176.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnfsodm11.so                        22     8.0K   176.0K
/lib64/libnss_files-2.5.so                                                          22     8.0K   179.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocrb11.so                          22     9.0K   198.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libskgxp11.so                         22     9.0K   198.0K
/lib64/libpthread-2.5.so                                                            22     9.0K   200.0K
/lib64/ld-2.5.so                                                                    22    10.0K   220.0K
/lib64/libm-2.5.so                                                                  22    12.0K   282.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libocr11.so                           22    14.0K   308.0K
/lib64/libc-2.5.so                                                                  22    22.0K   492.0K
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libcell11.so                          22    70.0K     1.5M
[stack]                                                                             22    76.0K     1.6M
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libhasgen11.so                        22   166.0K     3.6M
/u01/app/oracle/product/11.2.0.4/dbhome_1/lib/libnnz11.so                           22   232.0K     5.0M
[heap]                                                                              22   420.0K     9.0M
/dev/zero                                                                           22   642.0K    13.8M
/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle                                22     1.6M    35.0M
<anonymous>                                                                         22     1.8M    38.7M
/SYSV00000000                                                                       24     6.0M   143.7M
---------------------------------------------------------------------------------------------------------
34  &nb

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • Windows系統是一個消息驅動的OS,什麼是消息呢?下麵從不同的幾個方面講解一下。 1、消息的組成:一個消息由一個消息名稱(UINT),和兩個參數(WPARAM,LPARAM)。當用戶進行了輸入或是視窗的狀態發生改變時系統都會發送消息到某一個視窗。例如當菜單轉中之後會有WM_COMMAND消息發送 ...
  • 在如今的互聯網時代,隨著軟體開發複雜度的不斷提高,軟體開發和發佈管理也越來越重要。目前已經形成一套標準的流程,最重要的組成部分就是持續集成(Continuous Integration,CI)及持續部署、交付(CD)。在此,我們來以一個案例初步瞭解 CI 流程。那麼什麼是 CI 呢?簡單來講,CI ...
  • 1、使用cat命令進行文件的縱向合併 1)掌握使用cat命令的縱向合併 a)例如:使用cat命令將test1、file1.txt和file2這三個文件縱向合併為file文件的命令為: cat test1 file1.txt file2>file b)例如:使用cat命令將file1.txt文件的內容 ...
  • 使用ssh登錄伺服器的時候,需要輸入ip地址、埠、用戶名、密碼等信息,比較麻煩,容易輸錯。還好,通過客戶端和伺服器的配置參數,可實現免密碼快速登錄。伺服器可通過保存客戶端的公鑰,用於驗證客戶端的身份,從而省去輸入密碼的步驟。客戶端也可通過配置伺服器參數來簡化登錄命令。本文主要是記錄了ssh面密碼快 ...
  • 在自己電腦上安裝一個mysql資料庫並啟動,碰到一些問題,總結一下 1、下載免安裝版mysql資料庫,百度下載了了5.7.25版本 2、在bin文件夾下找到my-defaults.ini文件,我這沒有,所以新建了一個my.ini文件 3、在文件里添加代碼 註:不要手動去創建data文件夾 4、安裝服 ...
  • 企業數據資產 有了大數據的光環,有了從數據中挖掘商業價值的方法和工具之後,那些原本存放在伺服器上平淡無奇的陳年舊數一夜之間身價倍增。按照世界經濟論壇報告的看法,“大數據為新財富,價值堪比石油"。《大數據時代》一書的作者維克托則樂觀地預測,數據列人企業資產負債表只是時間問題。 本質上,任何企業在生產活 ...
  • 一. 表關係 1. 創建如下表,並創建相關約束. # 創建班級表 create table class ( cid int primary key not null auto_increment, caption varchar(20) not null ); # 創建老師表 create tabl ...
  • 一.表約束 1.非空約束:not null 作用:定義表的某一列不能為空。 2.唯一約束:uniqe key 作用:確定某一列不能存在相同的值。 3.主鍵約束:primay key 作用:列中唯一標識一條數據,每張表裡面只能有一個主鍵;主要是幫助MYSQL更快的查找某一條信息。 特征:非空並唯一,當 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...