f 十一月 2019 ~ 迪貝之家

Microsoft SQL Server Log Shipping

SQL 7就有的技術,簡單的說就是資料庫複本資料同步的技術,而這份複本可以開放讀取的功能以分散營業資料庫的負載,也可純粹當成備援資料庫,不管是在本地還是異地。怎麼達成? 透過SQL Agent自動化排程進行備份、傳檔及復原等作業。

Oracle GolGateden

機房搬遷跨Site能即時同步資料庫利器

Nagios 資料庫維運自動化

一開始設計這架構時,就排除使用remote agent的想法因為在專業分工的組織下,要求安裝新軟體於既有系統是一件不太可行的方案,既然身為DBA就只能把資料庫instance當作是一個最大的agent 想辦法在資料庫內做到我想做的事情

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

MSSQL Server 在Nagios 監控案例之三

網路剛好出問題,正好驗證Nagios Host監控的功能
雖然Nagios本身有所謂的dependency或parent的設計
那需要把router及switch 的IP納進它的監控
不過在這個工作環境,還是算了
我做好自己身為一個DBA的工作就夠了
主機fail 所收到的警訊

Nagios Notification

主機回復後 所收到的通知
Nagios Notification

Postgres Toast 表格

今天例行日檢查看表格的frozen age,如下 :
pg_toast
以前就知道這類物件,只是沒時間深研
最近比較有空,上網查了一下資料

先是看到了wiki文章
寫得不怎麼樣
再找了一下
看到了騰訊工程師寫的文章
真的不錯
了解它的形成後
當然就是要找出母表是哪一個
很簡單,一行指令就找出來了
pg_toast
如果是大表,就手動做一做vaccum 囉!!
小表就交給自動化去處理就好了.............
我的重點其實是第二張圖的指令
總要找到表格是哪個
才能處理呀~~~


####2020/08/21#####
今天處理Postgres 10
但是..怎麼狀況有點不一樣
因為我發現,不管我vacuum幾次
它的txid都不會改變,怪了~~
所以靈機一動,直接vacuum toast
解了~~~
真是奇怪~~
是不是pg10跟pg 9的差異阿~~
下次再驗證看看

toast













toast

toast




###2020/08/26####
好吧~~ 是我理解錯誤
因為剛剛在Postgres 9.0(EDB 9.0)
處理Nagios 所發出來的WRAP TXID 小於 5000000的警訊
pg9 及pg 10的toast結構應該是一樣的
只是inline table 如果vacuum後
frozen id 如果還是沒改變的話
就得跑vacuum在它的overflow toast表上
toast物件的schema是pg_toast
相信的search_path不會放它啦~~
因此你的vacuum指令得帶入pg_toast.xxxxx

MSSQL Server 在Nagios 監控案例之二


這是客戶安裝了由實轉虛軟體需要進行作業系統重開時
Nagios監控所發出來的訊息
1433 Port應該是沒監控到
因為我的host check 就是以check port 取代ping
可能因為重開機的時間很短,小過15分鐘吧
預設是間隔5分鐘,連3次fail, 才發警訊
不然應該是收到host fail的訊息
而不是service 相關的警訊
我是怎麼做的??
是掃系統紀錄檔內的相關字串
用來判斷資料庫instance是否重開
收到訊息當下,我就轉給了客戶及相應的主機負責人
詢問是否有甚麼狀況??
把訊息轉出去當然還有個用意
不管這個系統有沒有收到錢
至少我提供出去的服務
應該是物超所值吧!!


Nagios Core

用perl 存取DynamoDB不是那麼容易啊!!

上禮拜就卡在一個點,怎麼把paws的response 物件轉為perl的 一般資料結構,其實就是在做serialize/deserialize 的動作,搞到最後應該是要去學Perl OO -- Moose
今天參照了這個模組的語法 MooseX-Storage-IO-AmazonDynamoDB-0.08,總算把一個想要撈取的attribute的值給撈了出來

首先你得在程式裡頭定義出要被存取的表格的schema,其實這跟rdbms有甚麼兩樣??
DynamoDB

再來就是存取該表cnt欄位的值
DynamoDB
來執行看看吧!!


比對在DynamoDB Console的資料看看
DynamoDB
有得學哩~~但我相信應該不會這麼死
因為NoSQL標榜的就是schemaless,只是我不會用而已!!
得想辦法研究Moose吧~~
DBA上到公有雲用NoSQL,要是不會寫程式
根本就是無用武之力
因為rdbms rds
大致上還有與地端相同的管理方式可遵循
但DynamoDB大概就沒辦法了
完全是coding要發揮的角色了
DynamoDB
這是在ubuntu上的執行

Strawberry Perl 5.30 上安裝OpenSource IDE -- Padre

我看了一下padre的更新
最新的一版是1.00
2013 11/09放上去的
雖然寫perl程式不需要用到IDE
我是安裝來玩看看
搞不好以後會很常寫perl
有個好工具總是會方便許多
安裝指令cpanm Padre -n下下去之後
Alien::wxWidgets這個模組的安裝跑好久
但會成功,害我差點以為是不是又哪裡掛了
還好最後成功了
接著就是要安裝Wx,這模組會掛
因為IDE就是圖形介面
所以wxWidgets與Wx都是跟圖形介面開發有關
仔細看Wx的安裝錯誤
它會告訴你,去看哪一個Log
打開來看之後
你會看到下列錯誤
C:\strawberry-perl-5.30.0.1-64bit-PDL\perl\lib\CORE/perl.h:175:16: error: 'my_perl' was not declared in this scope
# define aTHX my_perl
^~~~~~~
C:\strawberry-perl-5.30.0.1-64bit-PDL\perl\lib\CORE/embedvar.h:38:18: note: in expansion of macro 'aTHX'
# define vTHX aTHX
^~~~
C:\strawberry-perl-5.30.0.1-64bit-PDL\perl\lib\CORE/embedvar.h:54:19: note: in expansion of macro 'vTHX'
#define PL_Mem (vTHX->IMem)

我就用標了紅色的字串上網去查了
就找到了這一篇Bug #129768 for Wx
一看到它是個bug,想說就此打住了
OpenSource的領域,我怎麼去要求人家給個Patch出來?
又沒付錢...就只能耐心等待人家有空
佛心來著,釋放出一個更新
不過我還是耐著性子慢慢的把該bug文件整篇看完
突然發覺,好像不是不能自己解ㄝ
因為它只是在perl 本身及Wx模組的程式中
有一個重複宣告的地方
解法就是改掉Wx 模組中的一個header 檔
只是我不知道那個檔案在哪裡??
突然間又翻到了一份資料

Install Padre on Strawberry Perl for Windows

裏頭有一段
cpanm --look

其中一個的指令cpanm --look
就是讓你切到source code目錄
我就照著bug文件的描述
把要新增的字串加到了wxapi.h
因為社群的回應測試結果是成功的

wapi.h
改完存檔後我就下cpanm Wx -n
ㄝ...怎麼還是一樣
想了一下,再透過cpanm --look Wx比對目錄
喔..好...
原來每一次cpanm都會新建一個working directory
再一次切到source目錄
再一次改掉wxapi.h
用以下的指令來自己做compile的動作
perl Makefile.PL
gmake
gmake test
gmake install
(就是取代dmake, 它會告訴你太舊了)
四個指令做完
當然就是把Wx模組給裝了上去
然後再一次下cpanm Padre -n
就成功了ㄝ.....
哈.....真是好玩了!!
不過真的就OK嗎 ??
安裝好了之後,當然就是把IDE的畫面叫起來
其實很簡單啦!!
就是直接下padre指令
但是呢?? 又出現錯誤了.....
喔.....搞OpenSource真是累阿~~

Malformed UTF-8 character (fatal) at C:\strawberry-perl-5.30.0.1-64bit-PDL\perl\site\lib\Padre\Wx\Main.pm line 5564.
Compilation failed in require at C:\strawberry-perl-5.30.0.1-64bit-PDL\perl\site\lib\Padre\Wx\App.pm line 58.
Perl exited with active threads:
1 running and unjoined
0 finished and unjoined
0 running and detached


當然又是上網找資料.........
還真有阿~~
這一篇裏頭有答案

Padre does not work with Perl 5.26


只是有用的答案在其中一個人寫的一行話裡頭而已
一開始我還把它忽略掉的
因為在他的發文下頭
又有一個人說, 因為Wx的關係
要你只套用在5.28
我就心裡頭在想
Wx的問題我就已經解掉啦~~
所以我又去弄個5.28的環境來安裝padre
E04...騙肖ㄝ...問題一樣阿!!
我把那段話highlight出來

Malformed UTF-8 character


但他沒有寫解法
我也不知道怎麼找的
就突然找到了底下這一篇正解
來..我把他給貼出來
Malformed UTF-8 character











其實我一開始看不太懂他在寫什麼
比照之前lpawa的發言
對啦....就是改掉一個字就對了
但是我的畫面是這樣啊



看得出來我在講甚麼啦呼...
好吧!! 我就把死馬當活馬醫
就把哪個看起來不是正常字元從Main.pm裡頭給拿掉
然後再照著後續段落
要把某一行搬到某一行之後
db_increment









好了...都改完了
該是試著叫起IDE畫面了
padre












真的解了...沒呼巄吧!!
也是運氣啦!!
剛好都找到了相關資料
來執行昨天的c\test\test3.pl
看是否能夠正常調用paws模組
列出我的帳號裡的DynamoDB表格
DynamoDB



終於在windows 10 上搞定了PAWS 模組

首先當然去找不用錢的開發環境囉~~~哈..草莓!!
看來未來幾年的日子
得多吃水果了
不是樹莓,就是草莓,要不就是橘子....
The Perl for MS Windows, free of charge!
我喜歡用Portal 版,因為不用安裝
解壓縮後,進到目錄後
畫面上portableshell點兩下
就會開出底下這個shell給你用

----------------------------------------------
 Welcome to Strawberry Perl PDL Edition!
 * URL - http://strawberryperl.com + http://pdl.perl.org
 * to launch perl script run:      perl c:\my\scripts\pdl-test.pl
 * to start PDL console run:       pdl2
 * to update PDL run:              cpanm PDL
 * to install extra module run:    cpanm PDL::Any::Module
          or if previous fails:    ppm PDL::Any::Module
 * or you can use dev tools like:  gcc, g++, gfortran, gmake
 * see README.TXT for more info
----------------------------------------------
Perl executable: C:\strawberry-perl-5.30.0.1-64bit-PDL\perl\bin\perl.exe
Perl version   : 5.30.0 / MSWin32-x64-multi-thread
PDL version    : 2.019

安裝其實很直覺
紅色指令乎伊洛起桌是啦
帶-n是為了讓安裝程式不做任何測試
要是讓它做Test
PAWS永遠也安裝不起來
因為它的相依模組Furl
在編譯後進行Test就不過了
Furl沒過,後續的安裝就不用再進行了
光這個動作我就搞了好幾天了
還想說是不是不同版本的perl
與不同版本的Furl間的相容問題
拿了perl 5.305.28 5.26與
Furl-3.13 3.12 3.10來進行安裝測試
真正是江湖一點訣,講破無價值

C:\strawberry-perl-5.30.0.1-64bit-PDL>cpanm Paws::DynamoDB -n
--> Working on Paws::DynamoDB
Fetching http://www.cpan.org/authors/id/J/JL/JLMARTIN/Paws-0.41.tar.gz ... OK
Configuring Paws-0.41 ... OK
==> Found dependencies: URI::Template, Config::INI, DataStruct::Flat, URL::Encode::XS, DateTime::Format::ISO8601, URL::Encode, ARGV::Struct, Net::Amazon::Signature::V4, String::CRC32, Data::Compare
--> Working on URI::Template
Fetching http://www.cpan.org/authors/id/B/BR/BRICAS/URI-Template-0.24.tar.gz ... OK
Configuring URI-Template-0.24 ... OK
Building URI-Template-0.24 ... OK
Successfully installed URI-Template-0.24
--> Working on Config::INI
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Config-INI-0.025.tar.gz ... OK
Configuring Config-INI-0.025 ... OK
==> Found dependencies: Mixin::Linewise::Writers, Mixin::Linewise::Readers
--> Working on Mixin::Linewise::Writers
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Mixin-Linewise-0.108.tar.gz ... OK
Configuring Mixin-Linewise-0.108 ... OK
==> Found dependencies: PerlIO::utf8_strict
--> Working on PerlIO::utf8_strict
Fetching http://www.cpan.org/authors/id/L/LE/LEONT/PerlIO-utf8_strict-0.007.tar.gz ... OK
Configuring PerlIO-utf8_strict-0.007 ... OK
Building PerlIO-utf8_strict-0.007 ... OK
Successfully installed PerlIO-utf8_strict-0.007
Building Mixin-Linewise-0.108 ... OK
Successfully installed Mixin-Linewise-0.108
Building Config-INI-0.025 ... OK
Successfully installed Config-INI-0.025
--> Working on DataStruct::Flat
Fetching http://www.cpan.org/authors/id/J/JL/JLMARTIN/DataStruct-Flat-0.01.tar.gz ... OK
Configuring DataStruct-Flat-0.01 ... OK
Building DataStruct-Flat-0.01 ... OK
Successfully installed DataStruct-Flat-0.01
--> Working on URL::Encode::XS
Fetching http://www.cpan.org/authors/id/C/CH/CHANSEN/URL-Encode-XS-0.03.tar.gz ... OK
Configuring URL-Encode-XS-0.03 ... OK
==> Found dependencies: URL::Encode
--> Working on URL::Encode
Fetching http://www.cpan.org/authors/id/C/CH/CHANSEN/URL-Encode-0.03.tar.gz ... OK
Configuring URL-Encode-0.03 ... OK
Building URL-Encode-0.03 ... OK
Successfully installed URL-Encode-0.03
Building URL-Encode-XS-0.03 ... OK
Successfully installed URL-Encode-XS-0.03
--> Working on DateTime::Format::ISO8601
Fetching http://www.cpan.org/authors/id/J/JH/JHOBLITT/DateTime-Format-ISO8601-0.08.tar.gz ... OK
Configuring DateTime-Format-ISO8601-0.08 ... OK
==> Found dependencies: DateTime::Format::Builder
--> Working on DateTime::Format::Builder
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Builder-0.82.tar.gz ... OK
Configuring DateTime-Format-Builder-0.82 ... OK
==> Found dependencies: DateTime::Format::Strptime
--> Working on DateTime::Format::Strptime
Fetching http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Strptime-1.76.tar.gz ... OK
Configuring DateTime-Format-Strptime-1.76 ... OK
Building DateTime-Format-Strptime-1.76 ... OK
Successfully installed DateTime-Format-Strptime-1.76
Building DateTime-Format-Builder-0.82 ... OK
Successfully installed DateTime-Format-Builder-0.82
Building DateTime-Format-ISO8601-0.08 ... OK
Successfully installed DateTime-Format-ISO8601-0.08
--> Working on ARGV::Struct
Fetching http://www.cpan.org/authors/id/J/JL/JLMARTIN/ARGV-Struct-0.06.tar.gz ... OK
Configuring ARGV-Struct-0.06 ... OK
==> Found dependencies: Types::Standard
--> Working on Types::Standard
Fetching http://www.cpan.org/authors/id/T/TO/TOBYINK/Type-Tiny-1.006000.tar.gz ... OK
Configuring Type-Tiny-1.006000 ... OK
Building Type-Tiny-1.006000 ... OK
Successfully installed Type-Tiny-1.006000
Building ARGV-Struct-0.06 ... OK
Successfully installed ARGV-Struct-0.06
--> Working on Net::Amazon::Signature::V4
Fetching http://www.cpan.org/authors/id/D/DB/DBOOK/Net-Amazon-Signature-V4-0.19.tar.gz ... OK
Configuring Net-Amazon-Signature-V4-0.19 ... OK
Building Net-Amazon-Signature-V4-0.19 ... OK
Successfully installed Net-Amazon-Signature-V4-0.19
--> Working on String::CRC32
Fetching http://www.cpan.org/authors/id/L/LE/LEEJO/String-CRC32-1.8.tar.gz ... OK
Configuring String-CRC32-1.8 ... OK
Building String-CRC32-1.8 ... OK
Successfully installed String-CRC32-1.8
--> Working on Data::Compare
Fetching http://www.cpan.org/authors/id/D/DC/DCANTRELL/Data-Compare-1.27.tar.gz ... OK
Configuring Data-Compare-1.27 ... OK
==> Found dependencies: Clone
--> Working on Clone
Fetching http://www.cpan.org/authors/id/A/AT/ATOOMIC/Clone-0.43.tar.gz ... OK
Configuring Clone-0.43 ... OK
Building Clone-0.43 ... OK
Successfully installed Clone-0.43 (upgraded from 0.41)
Building Data-Compare-1.27 ... OK
Successfully installed Data-Compare-1.27
Building Paws-0.41 ... OK
Successfully installed Paws-0.41
17 distributions installed

這樣就安裝好了
接著就是做簡單測試囉


C:\strawberry-perl-5.30.0.1-64bit-PDL>perl c:\test\test3.pl
Paws::DynamoDB::ListTablesOutput  {
    Parents       Moose::Object
    public methods (3) : LastEvaluatedTableName, meta, TableNames
    private methods (1) : _request_id
    internals: {
        _request_id   "CDNHUP8LHAMQ9V24FPL32EDUCBVV4KQNSO5AEMVJF66Q9ASUAAJG",
        TableNames    [
            [0] "Employee",
            [1] "Music",
            [2] "MusicCollection"
        ]
    }
}

看一下test3.pl 的code
use strict;
use warnings;
use Paws;

use Data::Printer;


$ENV{'AWS_ACCESS_KEY'} = 'UR KEY';


$ENV{'AWS_SECRET_KEY'} = 'UR KEY';

my $d = Paws->service('DynamoDB',region => 'us-east-2');
my $r;

$r = $d->ListTables;
p $r;

MSSQL Server 在Nagios 3 Core 上的實務應用

這是我發給單位內同事的一封信
要不要用就不關我的事了
Nagios Hostgroup

Service Plugin
這是Nagios Notification
Nagios Notification
Plugin是用sqlcmd及shell script寫出來的
是我自己的產品的話
我就會用Perl來寫
不過還有一段不短的路要走

Oracle Index 的重整時機

依據文件1373415.1 How to Determine When an Index Should be Rebuilt?

照Oracle的說法,要有效能問題,才去進行索引重整的動作!!
哈哈~~~
如果效能問題跑出來的時候,就等著被海K吧!!
那時上頭要檢討的就是,為什麼出現效能問題?
緊接著就是上演AP與DB 兩個單位之爭了~~
從DB Team的觀點來看,AP沒有做好設計,所以交易胃納乘載量就是如此
那AP單位反過來就會challenge 資料庫維護單位,你們沒依照專業給我們建議阿
唉~~ 團隊合作這時候就變成一個宇宙無敵超級大笑話了


我提供一個我在RAC上維護的的Case 吧~~

依據我的每日日檢,撿出來我要給AP Leader 看的數據


給出去的圖,當然是特意整理過的,不然ADDM哪有可能產出兩個時間點的數據

然後再給出(DEL_LF_ROWS/LF_ROWS*100)

index_stats

從ADDM報表裡所看出來的 總執行次數 * 單次執行時間 = "總運作時間"雖然不長
但不管嘛!!反正我就是已經提出該重整索引的建議
將來如果真的出問題,至少我做了該做的事情了
確定進行重整作業時程之後,前一天我就給了位置及SIZE的資訊
主要是要告訴AP單位,空間夠你用
省得做的過程中出現空間不夠的錯誤

重整後的當天我就再給了一次數據
底下是我前一天日檢時所收的ADDM數據


再來就是隔日上班時,進行日檢所收的06:00~中午的ADDM數據

給出這些數據是告訴AP 單位,我不是要你做白工
是有它的效益存在的


為省下一堆解釋的麻煩,作業前後比較的呈現,給AP 看的就是上述兩個截圖,就我自己的工作職責,我還是會再去看其他的數據
index_stats
index_stats

再看看INDEX的大小
最後我要提醒的是, Analyze index validate structure雖然有online機制,但就我這次的經驗,online 產不出index_stats的數據,如果你的索引很大,那麻煩你收數據時,考量一下是否會對online交易造成影響,到時候出問題,不要來告訴我,是我的文章害了你!!奇怪了..三年前我在11gR2的環境是怎麼做的??寫文章還是有它的好處了,至少未來我還可以回來翻一下我現在的做法
alter index validate structure

RedHat 7 安裝Paws::DynamoDB 所碰到的問題

安裝Perl 模組,當然是下cpan 指令,但卻出現錯誤

上圖是我仔細查看錯誤後,挑出來的,覺得應該是問題的所在,就拿它去問了谷神囉!!
翻到了一篇文章,它給的建議如下

照它所說, 就下了cpan XML::SAX:Expat指令,嘿嘿!!
又出現錯誤~~天阿!! 心想,怎麼這麼難搞阿!!
再次仔細看了錯誤

好吧~~死馬當活馬醫!! 安裝Fatal 試看看~~
來吧~~下個 cpan Fatal指令
[root@ha1 ~]# cpan Fatal
CPAN: Storable loaded ok (v2.45)
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 08 Aug 2019 19:56:00 GMT
Running install for module 'Fatal'
Running make for P/PJ/PJF/autodie-2.29.tar.gz
CPAN: LWP::UserAgent loaded ok (v6.05)
CPAN: Time::HiRes loaded ok (v1.9725)
Fetching with LWP:
http://mirror.optusnet.com.au/CPAN/authors/id/P/PJ/PJF/autodie-2.29.tar.gz
CPAN: YAML loaded ok (v0.84)
CPAN: Digest::SHA loaded ok (v5.85)
CPAN: Compress::Zlib loaded ok (v2.061)
Checksum for /root/.cpan/sources/authors/id/P/PJ/PJF/autodie-2.29.tar.gz ok
CPAN: File::Temp loaded ok (v0.2301)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190720)
CPAN.pm: Building P/PJ/PJF/autodie-2.29.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for autodie
Writing MYMETA.yml and MYMETA.json
cp lib/autodie/Util.pm blib/lib/autodie/Util.pm
cp lib/autodie/hints.pm blib/lib/autodie/hints.pm
cp lib/Fatal.pm blib/lib/Fatal.pm
cp lib/autodie/Scope/Guard.pm blib/lib/autodie/Scope/Guard.pm
cp lib/autodie/exception.pm blib/lib/autodie/exception.pm
cp lib/autodie/Scope/GuardStack.pm blib/lib/autodie/Scope/GuardStack.pm
cp lib/autodie/skip.pm blib/lib/autodie/skip.pm
cp lib/autodie.pm blib/lib/autodie.pm
cp lib/autodie/exception/system.pm blib/lib/autodie/exception/system.pm
Manifying blib/man3/autodie::Util.3pm
Manifying blib/man3/autodie::hints.3pm
Manifying blib/man3/Fatal.3pm
Manifying blib/man3/autodie::Scope::Guard.3pm
Manifying blib/man3/autodie::exception.3pm
Manifying blib/man3/autodie::Scope::GuardStack.3pm
Manifying blib/man3/autodie::skip.3pm
Manifying blib/man3/autodie::exception::system.3pm
Manifying blib/man3/autodie.3pm
PJF/autodie-2.29.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ...................... ok
t/args.t ......................... ok
t/author-critic.t ................ skipped: these tests are for testing by the author
t/autodie.t ...................... ok
t/backcompat.t ................... ok
t/basic_exceptions.t ............. ok
t/binmode.t ...................... ok
t/blog_hints.t ................... ok
t/caller.t ....................... ok
t/chmod.t ........................ ok
t/chown.t ........................ ok
t/context.t ...................... ok
t/context_lexical.t .............. ok
t/core-trampoline-slurp.t ........ ok
t/crickey.t ...................... ok
t/critic.t ....................... skipped: Author test. Set $ENV{AUTHOR_TESTING} to true to run.
t/dbmopen.t ...................... ok
t/eval_error.t ................... ok
t/exception_class.t .............. ok
t/exceptions.t ................... ok
t/exec.t ......................... ok
t/Fatal.t ........................ ok
t/filehandles.t .................. ok
t/fileno.t ....................... ok
t/flock.t ........................ ok
t/fork.t ......................... skipped: BSD::Resource required to test fork()
t/format-clobber.t ............... ok
t/hints.t ........................ # Sub::Identify is loaded
t/hints.t ........................ ok
t/hints_insist.t ................. ok
t/hints_pod_examples.t ........... ok
t/hints_provider_does.t .......... ok
t/hints_provider_easy_does_it.t .. ok
t/hints_provider_isa.t ........... ok
t/import-into.t .................. skipped: Test needs Import::Into >= 1.002004
t/internal-backcompat.t .......... ok
t/internal.t ..................... ok
t/kill.t ......................... skipped: Can unexpectedly signal process 1. Won't run as root.
t/kwalitee.t ..................... skipped: Author test. Set $ENV{RELEASE_TESTING} to true to run.
t/lethal.t ....................... ok
t/lex58.t ........................ ok
t/mkdir.t ........................ ok
t/no_carp.t ...................... ok
t/open.t ......................... ok
t/pod-coverage.t ................. skipped: Author test. Set $ENV{AUTHOR_TESTING} to true to run.
t/pod.t .......................... skipped: Author test. Set $ENV{AUTHOR_TESTING} to true to run.
t/read.t ......................... ok
t/recv.t ......................... ok
t/release-pod-coverage.t ......... skipped: these tests are for release candidate testing
t/release-pod-syntax.t ........... skipped: these tests are for release candidate testing
t/repeat.t ....................... ok
t/rt-74246.t ..................... ok
t/scope_leak.t ................... ok
t/skip.t ......................... ok
t/socket.t ....................... skipped: Author test. Set $ENV{AUTHOR_TESTING} to true to run.
t/string-eval-basic.t ............ ok
t/string-eval-leak.t ............. ok
t/sysopen.t ...................... ok
t/system.t ....................... ok
t/truncate.t ..................... ok
t/unlink.t ....................... ok
t/user-context.t ................. ok
t/usersub.t ...................... ok
t/utf8_open.t .................... ok
t/utime.t ........................ ok
t/version.t ...................... skipped: Release test. Set $ENV{RELEASE_TESTING} to true to run.
t/version_tag.t .................. ok
All tests successful.
Files=66, Tests=505, 6 wallclock secs ( 0.22 usr 0.07 sys + 4.39 cusr 0.64 csys = 5.32 CPU)
Result: PASS
PJF/autodie-2.29.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying blib/man3/autodie::Util.3pm
Manifying blib/man3/autodie::hints.3pm
Manifying blib/man3/Fatal.3pm
Manifying blib/man3/autodie::Scope::Guard.3pm
Manifying blib/man3/autodie::exception.3pm
Manifying blib/man3/autodie::Scope::GuardStack.3pm
Manifying blib/man3/autodie::skip.3pm
Manifying blib/man3/autodie::exception::system.3pm
Manifying blib/man3/autodie.3pm
Installing /usr/local/share/perl5/Fatal.pm
Installing /usr/local/share/perl5/autodie.pm
Installing /usr/local/share/perl5/autodie/Util.pm
Installing /usr/local/share/perl5/autodie/hints.pm
Installing /usr/local/share/perl5/autodie/exception.pm
Installing /usr/local/share/perl5/autodie/skip.pm
Installing /usr/local/share/perl5/autodie/Scope/Guard.pm
Installing /usr/local/share/perl5/autodie/Scope/GuardStack.pm
Installing /usr/local/share/perl5/autodie/exception/system.pm
Installing /usr/local/share/man/man3/autodie::Util.3pm
Installing /usr/local/share/man/man3/autodie::hints.3pm
Installing /usr/local/share/man/man3/Fatal.3pm
Installing /usr/local/share/man/man3/autodie::Scope::Guard.3pm
Installing /usr/local/share/man/man3/autodie::exception.3pm
Installing /usr/local/share/man/man3/autodie::Scope::GuardStack.3pm
Installing /usr/local/share/man/man3/autodie::skip.3pm
Installing /usr/local/share/man/man3/autodie::exception::system.3pm
Installing /usr/local/share/man/man3/autodie.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
PJF/autodie-2.29.tar.gz
/usr/bin/make install -- OK
居然成功了...哈哈~~
緊接著再次安裝 XML::SAX:Expat吧!!

[root@ha1 ~]# cpan XML::SAX:Expat
CPAN: Storable loaded ok (v2.45)
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 08 Aug 2019 19:56:00 GMT
Running install for module 'XML::SAX::Expat'
Running make for B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz
CPAN: Digest::SHA loaded ok (v5.85)
CPAN: Compress::Zlib loaded ok (v2.061)
Checksum for /root/.cpan/sources/authors/id/B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz ok
CPAN: File::Temp loaded ok (v0.2301)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190720)
CPAN.pm: Building B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite XML::SAX 0.03 not found.
Writing Makefile for XML::SAX::Expat
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- BJOERN/XML-SAX-Expat-0.51.tar.gz ----
XML::SAX [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'XML::SAX'
Running make for G/GR/GRANTM/XML-SAX-1.02.tar.gz
Checksum for /root/.cpan/sources/authors/id/G/GR/GRANTM/XML-SAX-1.02.tar.gz ok
CPAN.pm: Building G/GR/GRANTM/XML-SAX-1.02.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for XML::SAX
Writing MYMETA.yml and MYMETA.json
cp lib/XML/SAX/PurePerl/EncodingDetect.pm blib/lib/XML/SAX/PurePerl/EncodingDetect.pm
cp lib/XML/SAX/PurePerl/Reader/UnicodeExt.pm blib/lib/XML/SAX/PurePerl/Reader/UnicodeExt.pm
cp lib/XML/SAX/PurePerl/Reader/Stream.pm blib/lib/XML/SAX/PurePerl/Reader/Stream.pm
cp lib/XML/SAX.pm blib/lib/XML/SAX.pm
cp lib/XML/SAX/PurePerl/DTDDecls.pm blib/lib/XML/SAX/PurePerl/DTDDecls.pm
cp lib/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm blib/lib/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm
cp lib/XML/SAX/DocumentLocator.pm blib/lib/XML/SAX/DocumentLocator.pm
cp lib/XML/SAX/PurePerl/Reader/String.pm blib/lib/XML/SAX/PurePerl/Reader/String.pm
cp lib/XML/SAX/PurePerl/UnicodeExt.pm blib/lib/XML/SAX/PurePerl/UnicodeExt.pm
cp lib/XML/SAX/PurePerl/Exception.pm blib/lib/XML/SAX/PurePerl/Exception.pm
cp lib/XML/SAX/PurePerl/DocType.pm blib/lib/XML/SAX/PurePerl/DocType.pm
cp lib/XML/SAX/PurePerl/DebugHandler.pm blib/lib/XML/SAX/PurePerl/DebugHandler.pm
cp lib/XML/SAX/Intro.pod blib/lib/XML/SAX/Intro.pod
cp lib/XML/SAX/ParserFactory.pm blib/lib/XML/SAX/ParserFactory.pm
cp lib/XML/SAX/PurePerl/Reader/URI.pm blib/lib/XML/SAX/PurePerl/Reader/URI.pm
cp lib/XML/SAX/PurePerl/XMLDecl.pm blib/lib/XML/SAX/PurePerl/XMLDecl.pm
cp lib/XML/SAX/PurePerl/Reader.pm blib/lib/XML/SAX/PurePerl/Reader.pm
cp lib/XML/SAX/PurePerl.pm blib/lib/XML/SAX/PurePerl.pm
cp lib/XML/SAX/PurePerl/NoUnicodeExt.pm blib/lib/XML/SAX/PurePerl/NoUnicodeExt.pm
cp lib/XML/SAX/PurePerl/Productions.pm blib/lib/XML/SAX/PurePerl/Productions.pm
Manifying blib/man3/XML::SAX::ParserFactory.3pm
Manifying blib/man3/XML::SAX.3pm
Manifying blib/man3/XML::SAX::Intro.3pm
Manifying blib/man3/XML::SAX::PurePerl::Reader.3pm
Manifying blib/man3/XML::SAX::PurePerl.3pm
Manifying blib/man3/XML::SAX::DocumentLocator.3pm
GRANTM/XML-SAX-1.02.tar.gz
/usr/bin/make -- OK
CPAN: YAML loaded ok (v0.84)
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic.t ....... ok
t/01known.t ....... ok
t/10xmldecl1.t .... ok
t/11xmldecl2.t .... ok
t/12miscstart.t ... ok
t/13int_ent.t ..... ok
t/14encoding.t .... ok
t/15element.t ..... ok
t/16large.t ....... 1/3 parsed 80085 bytes in 0 seconds
t/16large.t ....... ok
t/19pi.t .......... ok
t/20factory.t ..... ok
t/21saxini.t ...... ok
t/30parse_file.t .. ok
t/40cdata.t ....... ok
t/42entities.t .... ok
t/99cleanup.t ..... ok
All tests successful.
Files=16, Tests=113, 2 wallclock secs ( 0.06 usr 0.01 sys + 1.09 cusr 0.14 csys = 1.30 CPU)
Result: PASS
GRANTM/XML-SAX-1.02.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying blib/man3/XML::SAX::ParserFactory.3pm
Manifying blib/man3/XML::SAX.3pm
Manifying blib/man3/XML::SAX::Intro.3pm
Manifying blib/man3/XML::SAX::PurePerl::Reader.3pm
Manifying blib/man3/XML::SAX::PurePerl.3pm
Manifying blib/man3/XML::SAX::DocumentLocator.3pm
Installing /usr/local/share/perl5/XML/SAX.pm
Installing /usr/local/share/perl5/XML/SAX/DocumentLocator.pm
Installing /usr/local/share/perl5/XML/SAX/Intro.pod
Installing /usr/local/share/perl5/XML/SAX/ParserFactory.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/EncodingDetect.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/DTDDecls.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/UnicodeExt.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Exception.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/DocType.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/DebugHandler.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/XMLDecl.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Reader.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/NoUnicodeExt.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Productions.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Reader/UnicodeExt.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Reader/Stream.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Reader/String.pm
Installing /usr/local/share/perl5/XML/SAX/PurePerl/Reader/URI.pm
Installing /usr/local/share/man/man3/XML::SAX::ParserFactory.3pm
Installing /usr/local/share/man/man3/XML::SAX.3pm
Installing /usr/local/share/man/man3/XML::SAX::Intro.3pm
Installing /usr/local/share/man/man3/XML::SAX::PurePerl::Reader.3pm
Installing /usr/local/share/man/man3/XML::SAX::PurePerl.3pm
Installing /usr/local/share/man/man3/XML::SAX::DocumentLocator.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
could not find ParserDetails.ini in /root/.cpan/build/XML-SAX-1.02-K1WT1Y/blib/lib/XML/SAX
GRANTM/XML-SAX-1.02.tar.gz
/usr/bin/make install -- OK
Running make for B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz
Has already been unwrapped into directory /root/.cpan/build/XML-SAX-Expat-0.51-O0JGtt
CPAN.pm: Building B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz
cp Expat.pm blib/lib/XML/SAX/Expat.pm
Manifying blib/man3/XML::SAX::Expat.3pm
BJOERN/XML-SAX-Expat-0.51.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic.t ... ok
t/98podsyn.t .. ok
t/99podcov.t .. ok
All tests successful.
Files=3, Tests=3, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.20 cusr 0.03 csys = 0.25 CPU)
Result: PASS
BJOERN/XML-SAX-Expat-0.51.tar.gz
/usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl5/XML/SAX/Expat.pm
Installing /usr/local/share/man/man3/XML::SAX::Expat.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
could not find ParserDetails.ini in /usr/local/share/perl5/XML/SAX
BJOERN/XML-SAX-Expat-0.51.tar.gz
/usr/bin/make install -- OK

居然又成功了...挖哈...挖哈~~LOL

來吧~~咱們來試著安裝XML::Simple吧!!
[root@ha1 ~]# cpan XML::Simple
CPAN: Storable loaded ok (v2.45)
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 08 Aug 2019 19:56:00 GMT
Running install for module 'XML::Simple'
Running make for G/GR/GRANTM/XML-Simple-2.25.tar.gz
CPAN: Digest::SHA loaded ok (v5.85)
CPAN: Compress::Zlib loaded ok (v2.061)
Checksum for /root/.cpan/sources/authors/id/G/GR/GRANTM/XML-Simple-2.25.tar.gz ok
CPAN: File::Temp loaded ok (v0.2301)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190720)
CPAN.pm: Building G/GR/GRANTM/XML-Simple-2.25.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for XML::Simple
Writing MYMETA.yml and MYMETA.json
cp lib/XML/Simple/FAQ.pod blib/lib/XML/Simple/FAQ.pod
cp lib/XML/Simple.pm blib/lib/XML/Simple.pm
Manifying blib/man3/XML::Simple::FAQ.3pm
Manifying blib/man3/XML::Simple.3pm
GRANTM/XML-Simple-2.25.tar.gz
/usr/bin/make -- OK
CPAN: YAML loaded ok (v0.84)
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# Package Version
# perl 5.16.3
# XML::Simple 2.25
# Storable 2.45
# XML::Parser 2.41
# XML::SAX 1.02
# XML::NamespaceSupport 1.12
# XML::SAX::Expat 0.51 (default parser)
t/0_Config.t ............. ok
t/1_XMLin.t .............. ok
t/2_XMLout.t ............. ok
t/3_Storable.t ........... ok
t/4_MemShare.t ........... ok
t/5_MemCopy.t ............ ok
t/6_ObjIntf.t ............ ok
t/7_SaxStuff.t ........... ok
t/8_Namespaces.t ......... ok
t/9_Strict.t ............. ok
t/A_XMLParser.t .......... ok
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/B_Hooks.t .............. ok
t/C_External_Entities.t .. ok
All tests successful.
Files=14, Tests=503, 12 wallclock secs ( 0.11 usr 0.02 sys + 1.78 cusr 0.21 csys = 2.12 CPU)
Result: PASS
GRANTM/XML-Simple-2.25.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying blib/man3/XML::Simple::FAQ.3pm
Manifying blib/man3/XML::Simple.3pm
Installing /usr/local/share/perl5/XML/Simple.pm
Installing /usr/local/share/perl5/XML/Simple/FAQ.pod
Installing /usr/local/share/man/man3/XML::Simple::FAQ.3pm
Installing /usr/local/share/man/man3/XML::Simple.3pm
Appending installation info to /usr/lib64/perl5/perllocal.pod
GRANTM/XML-Simple-2.25.tar.gz
/usr/bin/make install -- OK
嘿嘿~~~來吧!!見真章了
cpan Paws::DynamoDB
PAWS

整個安裝過程就是一個戲劇化
也太好笑了吧!!