UJP - 技術情報1

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

ログファイル監視swatchのセットアップ

ログファイル監視swatchのセットアップ


0.改訂履歴

  • 2007.09.13 新規作成
  • 2007.10.24 微調整
  • 2007.10.30 ログスイッチに対応

1.はじめに

 このドキュメントでは,ログ監視を行うswatchのインストールからセットアップや,導入サンプルの提示,自動起動設定までの手順を説明する. PerlモジュールDate::Calc,Date::Parse,File::Tail,Time:HiRes,ExtUtils::MakeMaker,YAML等のセットアップから,watchfor,ignoreによる条件設定を.swatchrc ファイルに定義したり,/etc/rc.localへ登録しOS起動時に再起動したり停止する手順も含んでいる. また,あらかじめCPANによるPerlのアップデートは,行っておく.

 なお,利用しているのはRedHat ES3.0 update 3である.

2.モジュールの入手

[root@mars swatch]# ls -la
total 40
drwxr-xr-x    2 root     root         4096 Sep 12 17:33 .
drwxr-x---   14 root     root         4096 Sep 12 17:16 ..
-rw-r--r--    1 watch_usr ujp         31203 Sep 12 17:32 swatch-3.2.2.tar.gz
[root@mars swatch]# 
[root@mars swatch]# 
[root@mars swatch]# 
  • 現在は,3.2.2が最新であった.

3.インストール

  • ファイルを展開して,中身を確認する.
[root@mars swatch]# tar xfz swatch-3.2.2.tar.gz 
[root@mars swatch]# ls -la
total 44
drwxr-xr-x    3 root     root         4096 Sep 12 17:33 .
drwxr-x---   14 root     root         4096 Sep 12 17:16 ..
drwxr-xr-x    6 rolex    rolex        4096 Aug 11 03:06 swatch-3.2.2
-rw-r--r--    1 watch_usr ujp         31203 Sep 12 17:32 swatch-3.2.2.tar.gz
[root@mars swatch]# cd swatch-3.2.2
[root@mars swatch-3.2.2]# ls -la
total 120
drwxr-xr-x    6 rolex    rolex        4096 Aug 11 03:06 .
drwxr-xr-x    3 root     root         4096 Sep 12 17:33 ..
-rw-r--r--    1 rolex    rolex        7220 Jul 22  2006 CHANGES
-rw-r--r--    1 rolex    rolex       18007 Jul 20  2004 COPYING
-rw-r--r--    1 rolex    rolex         779 Jul 20  2004 COPYRIGHT
-rw-r--r--    1 rolex    rolex         937 Jul 20  2004 INSTALL
-rw-r--r--    1 rolex    rolex         798 Jul 20  2004 KNOWN_BUGS
-rw-r--r--    1 rolex    rolex         308 May  3  2006 MANIFEST
-rw-r--r--    1 rolex    rolex         515 Aug 11 03:06 META.yml
-rw-r--r--    1 rolex    rolex         807 Jul 14  2006 Makefile.PL
-rw-r--r--    1 rolex    rolex        4985 Dec  2  2005 README
drwxr-xr-x    2 rolex    rolex        4096 Aug 11 03:06 examples
drwxr-xr-x    3 rolex    rolex        4096 Aug 11 03:06 lib
-rw-r--r--    1 rolex    rolex       35842 Aug 11 03:05 swatch
drwxr-xr-x    2 rolex    rolex        4096 Aug 11 03:06 t
drwxr-xr-x    2 rolex    rolex        4096 Aug 11 03:06 tools
[root@mars swatch-3.2.2]# 
  • インストール手順を確認する.
[root@mars swatch-3.2.2]# cat INSTALL 
To install, simply issue the following commands:

        perl Makefile.PL
        make
        make test
        make install
        make realclean

Swatch installs just like a CPAN module. If you are not familiar with this 
process then you may want to read about it by issuing the command:

        man ExtUtils::MakeMaker

Use the "perldoc" command if your "man" cannot find the document.

If you see messages like these:

    Warning: prerequisite Date::Calc 0 not found at (eval 1) line 219.
    Warning: prerequisite Date::Parse 0 not found at (eval 1) line 219.
    Warning: prerequisite File::Tail 0 not found at (eval 1) line 219.
    Warning: prerequisite Time::HiRes 1.12 not found at (eval 1) line 219.

Then you need to install the CPAN module(s) that it doesn't find before 
you can use swatch. You can find these modules at search.cpan.org.
However, many operating systems may already bundle them up in neat
little packages, so you should check with them first.
[root@mars swatch-3.2.2]# 
[root@mars swatch]# perl -MCPAN -e shell
CPAN: File::HomeDir loaded ok (v0.66)

cpan shell -- CPAN exploration and modules installation (v1.9102)
ReadLine support enabled


cpan[1]> 

3.1 Date::Calcをインストールする.

  • cpanのシェルから,インストールを行う.
cpan[1]> install Date::Calc
CPAN: Storable loaded ok (v2.06)
Going to read /root/.cpan/Metadata
  Database was generated on Wed, 12 Sep 2007 04:36:56 GMT
Running install for module 'Date::Calc'
Running make for S/ST/STBEY/Date-Calc-5.4.tar.gz
CPAN: LWP::UserAgent loaded ok (v2.001)
CPAN: Time::HiRes loaded ok (v1.38)
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/S/ST/STBEY/Date-Calc-5.4.tar.gz
CPAN: Digest::SHA loaded ok (v5.45)
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/S/ST/STBEY/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/S/ST/STBEY/Date-Calc-5.4.tar.gz ok
Scanning cache /root/.cpan/build for sizes
..................................................--------------------------DONE
DEL(1/9): /root/.cpan/build/Bundle-CPAN-1.856 
DEL(2/9): /root/.cpan/build/Test-Harness-2.64 
DEL(3/9): /root/.cpan/build/ExtUtils-CBuilder-0.19 
DEL(4/9): /root/.cpan/build/ExtUtils-MakeMaker-6.36 
DEL(5/9): /root/.cpan/build/Module-Build-0.2808 
DEL(6/9): /root/.cpan/build/PathTools-3.25 
DEL(7/9): /root/.cpan/build/File-Temp-0.18 
DEL(8/9): /root/.cpan/build/Scalar-List-Utils-1.19 
DEL(9/9): /root/.cpan/build/Test-Simple-0.70 
Date-Calc-5.4/
Date-Calc-5.4/t/
Date-Calc-5.4/t/f023.t
Date-Calc-5.4/t/f006.t
Date-Calc-5.4/t/f025.t
Date-Calc-5.4/t/f008.t
Date-Calc-5.4/t/m011.t
Date-Calc-5.4/t/f027.t
Date-Calc-5.4/t/f029.t
Date-Calc-5.4/t/f011.t
Date-Calc-5.4/t/f030.t
Date-Calc-5.4/t/f013.t
Date-Calc-5.4/t/f032.t
Date-Calc-5.4/t/f015.t
Date-Calc-5.4/t/f034.t
Date-Calc-5.4/t/m001.t
Date-Calc-5.4/t/f017.t
Date-Calc-5.4/t/f036.t
Date-Calc-5.4/t/m003.t
Date-Calc-5.4/t/f019.t
Date-Calc-5.4/t/m005.t
Date-Calc-5.4/t/m007.t
Date-Calc-5.4/t/m009.t
Date-Calc-5.4/t/f001.t
Date-Calc-5.4/t/f020.t
Date-Calc-5.4/t/f003.t
Date-Calc-5.4/t/f022.t
Date-Calc-5.4/t/f005.t
Date-Calc-5.4/t/f024.t
Date-Calc-5.4/t/f007.t
Date-Calc-5.4/t/m010.t
Date-Calc-5.4/t/f026.t
Date-Calc-5.4/t/f009.t
Date-Calc-5.4/t/f028.t
Date-Calc-5.4/t/f010.t
Date-Calc-5.4/t/f012.t
Date-Calc-5.4/t/f031.t
Date-Calc-5.4/t/f014.t
Date-Calc-5.4/t/f033.t
Date-Calc-5.4/t/f016.t
Date-Calc-5.4/t/f035.t
Date-Calc-5.4/t/m002.t
Date-Calc-5.4/t/f018.t
Date-Calc-5.4/t/m004.t
Date-Calc-5.4/t/m006.t
Date-Calc-5.4/t/m008.t
Date-Calc-5.4/t/f000.t
Date-Calc-5.4/t/f002.t
Date-Calc-5.4/t/f021.t
Date-Calc-5.4/t/f004.t
Date-Calc-5.4/examples/
Date-Calc-5.4/examples/linearcal.pl
Date-Calc-5.4/examples/time.pl
Date-Calc-5.4/examples/nth_weekday.pl
Date-Calc-5.4/examples/vacation.pl
Date-Calc-5.4/examples/anniversaries.pl
Date-Calc-5.4/examples/income.pl
Date-Calc-5.4/examples/age_in_days_eu.pl
Date-Calc-5.4/examples/cal.c
Date-Calc-5.4/examples/holidays.pl
Date-Calc-5.4/examples/bug.pl
Date-Calc-5.4/examples/delta.pl
Date-Calc-5.4/examples/calendar.cgi
Date-Calc-5.4/examples/weiberfastnacht.pl
Date-Calc-5.4/examples/age_in_days_us.pl
Date-Calc-5.4/Calc.xs
Date-Calc-5.4/tools/
Date-Calc-5.4/tools/compile.pl
Date-Calc-5.4/tools/iso2pc.c
Date-Calc-5.4/tools/pc2iso.c
Date-Calc-5.4/tools/compile.bat
Date-Calc-5.4/tools/compile.sh
Date-Calc-5.4/MANIFEST
Date-Calc-5.4/CREDITS.txt
Date-Calc-5.4/ToolBox.h
Date-Calc-5.4/DateCalc.c
Date-Calc-5.4/Calendar.pm
Date-Calc-5.4/INSTALL.txt
Date-Calc-5.4/CHANGES.txt
Date-Calc-5.4/DateCalc.h
Date-Calc-5.4/Makefile.PL
Date-Calc-5.4/lib/
Date-Calc-5.4/lib/Date/
Date-Calc-5.4/lib/Date/Calendar/
Date-Calc-5.4/lib/Date/Calendar/Profiles.pm
Date-Calc-5.4/lib/Date/Calendar/Profiles.pod
Date-Calc-5.4/lib/Date/Calendar/Year.pm
Date-Calc-5.4/lib/Date/Calendar/Year.pod
Date-Calc-5.4/lib/Date/Calc/
Date-Calc-5.4/lib/Date/Calc/Object.pm
Date-Calc-5.4/lib/Date/Calc/Object.pod
Date-Calc-5.4/Artistic.txt
Date-Calc-5.4/README.txt
Date-Calc-5.4/TOOLS.txt
Date-Calc-5.4/GNU_LGPL.txt
Date-Calc-5.4/EXAMPLES.txt
Date-Calc-5.4/GNU_GPL.txt
Date-Calc-5.4/typemap
Date-Calc-5.4/Calc.pod
Date-Calc-5.4/Calendar.pod
Date-Calc-5.4/Calc.pm
CPAN: File::Temp loaded ok (v0.18)

  CPAN.pm: Going to build S/ST/STBEY/Date-Calc-5.4.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Bit::Vector 6.4 not found.
Warning: prerequisite Carp::Clan 5.3 not found.
Writing Makefile for Date::Calc
Writing patchlevel.h for /usr/bin/perl (5.008)
---- Unsatisfied dependencies detected during ----
----        STBEY/Date-Calc-5.4.tar.gz        ----
    Bit::Vector [requires]
    Carp::Clan [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] [空リターン]
Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Bit::Vector'
Running make for S/ST/STBEY/Bit-Vector-6.4.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/S/ST/STBEY/Bit-Vector-6.4.tar.gz
Checksum for /root/.cpan/sources/authors/id/S/ST/STBEY/Bit-Vector-6.4.tar.gz ok
Bit-Vector-6.4/
Bit-Vector-6.4/examples/
Bit-Vector-6.4/examples/benchmk2.pl
Bit-Vector-6.4/examples/SetObject.pl
Bit-Vector-6.4/examples/benchmk1.pl
Bit-Vector-6.4/examples/benchmk3.pl
Bit-Vector-6.4/examples/primes.pl
Bit-Vector-6.4/examples/test.c
Bit-Vector-6.4/BitVector.c
Bit-Vector-6.4/Vector.pod
Bit-Vector-6.4/GNU_LGPL.txt
Bit-Vector-6.4/t/
Bit-Vector-6.4/t/01________new.t
Bit-Vector-6.4/t/03_operations.t
Bit-Vector-6.4/t/30_overloaded.t
Bit-Vector-6.4/t/15________add.t
Bit-Vector-6.4/t/02____destroy.t
Bit-Vector-6.4/t/05_____primes.t
Bit-Vector-6.4/t/12_____string.t
Bit-Vector-6.4/t/08_____resize.t
Bit-Vector-6.4/t/10__intervals.t
Bit-Vector-6.4/t/40__auxiliary.t
Bit-Vector-6.4/t/11______shift.t
Bit-Vector-6.4/t/04__functions.t
Bit-Vector-6.4/t/09_parameters.t
Bit-Vector-6.4/t/28__chunklist.t
Bit-Vector-6.4/t/00____version.t
Bit-Vector-6.4/t/13__increment.t
Bit-Vector-6.4/t/07____compare.t
Bit-Vector-6.4/t/16___subtract.t
Bit-Vector-6.4/t/17________gcd.t
Bit-Vector-6.4/t/14______empty.t
Bit-Vector-6.4/t/06_____subset.t
Bit-Vector-6.4/BitVector.h
Bit-Vector-6.4/MANIFEST
Bit-Vector-6.4/GNU_GPL.txt
Bit-Vector-6.4/CREDITS.txt
Bit-Vector-6.4/lib/
Bit-Vector-6.4/lib/Bit/
Bit-Vector-6.4/lib/Bit/Vector/
Bit-Vector-6.4/lib/Bit/Vector/Overload.pm
Bit-Vector-6.4/lib/Bit/Vector/String.pod
Bit-Vector-6.4/lib/Bit/Vector/Overload.pod
Bit-Vector-6.4/lib/Bit/Vector/String.pm
Bit-Vector-6.4/ToolBox.h
Bit-Vector-6.4/Vector.pm
Bit-Vector-6.4/typemap
Bit-Vector-6.4/INSTALL.txt
Bit-Vector-6.4/CHANGES.txt
Bit-Vector-6.4/Makefile.PL
Bit-Vector-6.4/Vector.xs
Bit-Vector-6.4/Artistic.txt
Bit-Vector-6.4/README.txt

  CPAN.pm: Going to build S/ST/STBEY/Bit-Vector-6.4.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Carp::Clan 5.3 not found.
Writing Makefile for Bit::Vector
Writing patchlevel.h for /usr/bin/perl (5.008)
---- Unsatisfied dependencies detected during ----
----        STBEY/Bit-Vector-6.4.tar.gz       ----
    Carp::Clan [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] [空リターン]

Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Carp::Clan'
Running make for J/JJ/JJORE/Carp-Clan-5.9.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/J/JJ/JJORE/Carp-Clan-5.9.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/J/JJ/JJORE/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/J/JJ/JJORE/Carp-Clan-5.9.tar.gz ok
Carp-Clan-5.9/
Carp-Clan-5.9/t/
Carp-Clan-5.9/t/11basic.t
Carp-Clan-5.9/t/10basic.t
Carp-Clan-5.9/t/04boilerplate.t
Carp-Clan-5.9/t/01pod.t
Carp-Clan-5.9/t/03yaml.t
Carp-Clan-5.9/META.yml
Carp-Clan-5.9/Changes
Carp-Clan-5.9/GNU_GPL.txt
Carp-Clan-5.9/lib/
Carp-Clan-5.9/lib/Carp/
Carp-Clan-5.9/lib/Carp/Clan.pm
Carp-Clan-5.9/lib/Carp/Clan.pod
Carp-Clan-5.9/MANIFEST
Carp-Clan-5.9/Artistic.txt
Carp-Clan-5.9/Makefile.PL
Carp-Clan-5.9/README

  CPAN.pm: Going to build J/JJ/JJORE/Carp-Clan-5.9.tar.gz

Add Object::Deadly 0.08+ to prerequisites for testing? [Ny] [no]  [空リターン]
   
Checking if your kit is complete...
Looks good
Warning: prerequisite Test::Exception 0 not found.
Writing Makefile for Carp::Clan
Could not read '/root/.cpan/build/Carp-Clan-5.9-aXA7Vz/META.yml'. Falling back 
to other methods to determine prerequisites
---- Unsatisfied dependencies detected during ----
----        JJORE/Carp-Clan-5.9.tar.gz        ----
    Test::Exception [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] [空リターン]

Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Test::Exception'
Running make for A/AD/ADIE/Test-Exception-0.25.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/A/AD/ADIE/Test-Exception-0.25.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/A/AD/ADIE/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/A/AD/ADIE/Test-Exception-0.25.tar.gz 
ok
Test-Exception-0.25/
Test-Exception-0.25/Build.PL
Test-Exception-0.25/Changes
Test-Exception-0.25/lib/
Test-Exception-0.25/lib/Test/
Test-Exception-0.25/lib/Test/Exception.pm
Test-Exception-0.25/Makefile.PL
Test-Exception-0.25/MANIFEST
Test-Exception-0.25/META.yml
Test-Exception-0.25/README
Test-Exception-0.25/t/
Test-Exception-0.25/t/caller.t
Test-Exception-0.25/t/developer/
Test-Exception-0.25/t/developer/documented.t
Test-Exception-0.25/t/developer/perlcritic.t
Test-Exception-0.25/t/developer/perlcriticrc
Test-Exception-0.25/t/developer/pod.t
Test-Exception-0.25/t/developer/spelling.t
Test-Exception-0.25/t/Exception.t
Test-Exception-0.25/t/import.t
Test-Exception-0.25/t/isa.t
Test-Exception-0.25/t/lives_and.t
Test-Exception-0.25/t/preserve.t
Test-Exception-0.25/t/return.t
Test-Exception-0.25/t/rt.t
Test-Exception-0.25/t/stacktrace.t
Test-Exception-0.25/t/throws_ok.t
CPAN: Module::Build loaded ok (v0.2808)

  CPAN.pm: Going to build A/AD/ADIE/Test-Exception-0.25.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Sub::Uplevel 0.13 not found.
Writing Makefile for Test::Exception
Could not read '/root/.cpan/build/Test-Exception-0.25-miE3Ya/META.yml'. Falling 
back to other methods to determine prerequisites
---- Unsatisfied dependencies detected during ----
----      ADIE/Test-Exception-0.25.tar.gz     ----
    Sub::Uplevel [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] [空リターン]

Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Sub::Uplevel'
Running make for D/DA/DAGOLDEN/Sub-Uplevel-0.16.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.16.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/D/DA/DAGOLDEN/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.16.tar.
gz ok
Sub-Uplevel-0.16/
Sub-Uplevel-0.16/t/
Sub-Uplevel-0.16/t/01_die_check.t
Sub-Uplevel-0.16/t/lib/
Sub-Uplevel-0.16/t/lib/Foo.pm
Sub-Uplevel-0.16/t/02_uplevel.t
Sub-Uplevel-0.16/t/04_honor_later_override.t
Sub-Uplevel-0.16/t/03_nested_uplevels.t
Sub-Uplevel-0.16/t/98_pod.t
Sub-Uplevel-0.16/t/99_pod_coverage.t
Sub-Uplevel-0.16/t/05_honor_prior_override.t
Sub-Uplevel-0.16/examples/
Sub-Uplevel-0.16/examples/uplevel-demo.pl
Sub-Uplevel-0.16/Changes
Sub-Uplevel-0.16/MANIFEST
Sub-Uplevel-0.16/lib/
Sub-Uplevel-0.16/lib/Sub/
Sub-Uplevel-0.16/lib/Sub/Uplevel.pm
Sub-Uplevel-0.16/MANIFEST.SKIP
Sub-Uplevel-0.16/META.yml
Sub-Uplevel-0.16/Makefile.PL
Sub-Uplevel-0.16/Build.PL
Sub-Uplevel-0.16/README

  CPAN.pm: Going to build D/DA/DAGOLDEN/Sub-Uplevel-0.16.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Sub::Uplevel
Could not read '/root/.cpan/build/Sub-Uplevel-0.16-r1ejsY/META.yml'. Falling 
back to other methods to determine prerequisites
cp lib/Sub/Uplevel.pm blib/lib/Sub/Uplevel.pm
Manifying blib/man3/Sub::Uplevel.3pm
  DAGOLDEN/Sub-Uplevel-0.16.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/01_die_check...............ok                                              
t/02_uplevel.................ok                                              
t/03_nested_uplevels.........ok                                              
t/04_honor_later_override....ok                                              
t/05_honor_prior_override....ok                                              
t/98_pod.....................skipped
        all skipped: Skipping author tests
t/99_pod_coverage............skipped
        all skipped: Skipping author tests
All tests successful, 2 tests skipped.
Files=7, Tests=141,  1 wallclock secs ( 0.95 cusr +  0.09 csys =  1.04 CPU)
  DAGOLDEN/Sub-Uplevel-0.16.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
Installing /usr/lib/perl5/site_perl/5.8.0/Sub/Uplevel.pm
Installing /usr/share/man/man3/Sub::Uplevel.3pm
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Sub/Uplevel/.
packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
perllocal.pod
  DAGOLDEN/Sub-Uplevel-0.16.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make for A/AD/ADIE/Test-Exception-0.25.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Test-Exception-0.2
5-miE3Ya

  CPAN.pm: Going to build A/AD/ADIE/Test-Exception-0.25.tar.gz

cp lib/Test/Exception.pm blib/lib/Test/Exception.pm
Manifying blib/man3/Test::Exception.3pm
  ADIE/Test-Exception-0.25.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/caller........ok                                                           
t/Exception.....ok                                                           
t/import........ok                                                           
t/isa...........ok                                                           
t/lives_and.....ok                                                           
t/preserve......ok                                                           
t/return........ok                                                           
t/rt............ok                                                           
t/stacktrace....ok                                                           
t/throws_ok.....ok                                                           
All tests successful.
Files=10, Tests=51,  2 wallclock secs ( 1.21 cusr +  0.16 csys =  1.37 CPU)
  ADIE/Test-Exception-0.25.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
Installing /usr/lib/perl5/site_perl/5.8.0/Test/Exception.pm
Installing /usr/share/man/man3/Test::Exception.3pm
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Test/
Exception/.packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
perllocal.pod
  ADIE/Test-Exception-0.25.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make for J/JJ/JJORE/Carp-Clan-5.9.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Carp-Clan-5.9-aXA7
Vz

  CPAN.pm: Going to build J/JJ/JJORE/Carp-Clan-5.9.tar.gz

cp lib/Carp/Clan.pm blib/lib/Carp/Clan.pm
cp lib/Carp/Clan.pod blib/lib/Carp/Clan.pod
Manifying blib/man3/Carp::Clan.3pm
  JJORE/Carp-Clan-5.9.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/01pod............skipped
        all skipped: Skipping author tests
t/03yaml...........skipped
        all skipped: Skipping author tests
t/04boilerplate....skipped
        all skipped: Skipping author tests
t/10basic..........ok                                                        
t/11basic..........ok                                                        
        1/55 skipped: various reasons
All tests successful, 3 tests and 1 subtest skipped.
Files=5, Tests=57,  0 wallclock secs ( 0.45 cusr +  0.05 csys =  0.50 CPU)
  JJORE/Carp-Clan-5.9.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
Installing /usr/lib/perl5/site_perl/5.8.0/Carp/Clan.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Carp/Clan.pod
Installing /usr/share/man/man3/Carp::Clan.3pm
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Carp/Clan/.
packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
perllocal.pod
  JJORE/Carp-Clan-5.9.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make for S/ST/STBEY/Bit-Vector-6.4.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/Bit-Vector-6.4-
kJwrcz

  CPAN.pm: Going to build S/ST/STBEY/Bit-Vector-6.4.tar.gz

cp lib/Bit/Vector/Overload.pm blib/lib/Bit/Vector/Overload.pm
cp Vector.pm blib/lib/Bit/Vector.pm
cp Vector.pod blib/lib/Bit/Vector.pod
cp lib/Bit/Vector/String.pod blib/lib/Bit/Vector/String.pod
cp lib/Bit/Vector/Overload.pod blib/lib/Bit/Vector/Overload.pod
cp lib/Bit/Vector/String.pm blib/lib/Bit/Vector/String.pm
gcc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-
aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=¥"6.4¥" -DXS_
VERSION=¥"6.4¥" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   
BitVector.c
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.
0/ExtUtils/typemap -typemap typemap  Vector.xs > Vector.xsc && mv Vector.xsc 
Vector.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-
aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=¥"6.4¥" -DXS_
VERSION=¥"6.4¥" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   
Vector.c
Running Mkbootstrap for Bit::Vector ()
chmod 644 Vector.bs
rm -f blib/arch/auto/Bit/Vector/Vector.so
gcc  -shared -L/usr/local/lib BitVector.o Vector.o  -o blib/arch/auto/Bit/Vector
/Vector.so      ¥
        ¥
  
chmod 755 blib/arch/auto/Bit/Vector/Vector.so
cp Vector.bs blib/arch/auto/Bit/Vector/Vector.bs
chmod 644 blib/arch/auto/Bit/Vector/Vector.bs
Manifying blib/man3/Bit::Vector::Overload.3pm
Manifying blib/man3/Bit::Vector::String.3pm
Manifying blib/man3/Bit::Vector.3pm
  STBEY/Bit-Vector-6.4.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/f000....ok                                                                 
t/f001....ok                                                                 
t/f002....ok                                                                 
t/f003....ok                                                                 
t/f004....ok                                                                 
t/f005....ok                                                                 
t/f006....ok                                                                 
t/f007....ok                                                                 
t/f008....ok                                                                 
t/f009....ok                                                                 
t/f010....ok                                                                 
t/f011....ok                                                                 
t/f012....ok                                                                 
t/f013....ok                                                                 
t/f014....ok                                                                 
t/f015....ok                                                                 
t/f016....ok                                                                 
t/f017....ok                                                                 
t/f018....ok                                                                 
t/f019....ok                                                                 
t/f020....ok                                                                 
t/f021....ok                                                                 
t/f022....ok                                                                 
t/f023....ok                                                                 
t/f024....ok                                                                 
t/f025....ok                                                                 
t/f026....ok                                                                 
t/f027....ok                                                                 
t/f028....ok                                                                 
t/f029....ok                                                                 
t/f030....ok                                                                 
t/f031....ok                                                                 
t/f032....ok                                                                 
t/f033....ok                                                                 
t/f034....ok                                                                 
t/f035....ok                                                                 
t/f036....ok                                                                 
t/m001....ok                                                                 
t/m002....ok                                                                 
t/m003....ok                                                                 
t/m004....ok                                                                 
t/m005....ok                                                                 
t/m006....ok                                                                 
t/m007....ok                                                                 
t/m008....ok                                                                 
t/m009....ok                                                                 
t/m010....ok                                                                 
t/m011....ok                                                                 
All tests successful.
Files=48, Tests=2770,  8 wallclock secs ( 6.76 cusr +  0.60 csys =  7.36 CPU)
  STBEY/Date-Calc-5.4.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Date/Calc
/Calc.so
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Date/Calc
/Calc.bs
Files found in blib/arch: installing files in blib/lib into architecture 
dependent library tree
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calc.pod
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calendar.
pod
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calc.pm
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calendar.
pm
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calendar/
Year.pm
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calendar/
Profiles.pm
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calendar/
Profiles.pod
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calendar/
Year.pod
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calc/
Object.pod
Installing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Date/Calc/
Object.pm
Installing /usr/share/man/man3/Date::Calc::Object.3pm
Installing /usr/share/man/man3/Date::Calc.3pm
Installing /usr/share/man/man3/Date::Calendar.3pm
Installing /usr/share/man/man3/Date::Calendar::Year.3pm
Installing /usr/share/man/man3/Date::Calendar::Profiles.3pm
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Date/Calc/.
packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
perllocal.pod
  STBEY/Date-Calc-5.4.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state

cpan[2]> 
  • YAMLというモジュールが入ってないと警告がいっぱいでているので,インストールする.
cpan[2]> install YAML
Running install for module 'YAML'
Running make for I/IN/INGY/YAML-0.65.tar.gz
Checksum for /root/.cpan/sources/authors/id/I/IN/INGY/YAML-0.65.tar.gz ok
YAML-0.65/
YAML-0.65/Changes
YAML-0.65/COMPATIBILITY
YAML-0.65/inc/
YAML-0.65/inc/Module/
YAML-0.65/inc/Module/Install/
YAML-0.65/inc/Module/Install/Base.pm
YAML-0.65/inc/Module/Install/Can.pm
YAML-0.65/inc/Module/Install/Fetch.pm
YAML-0.65/inc/Module/Install/Include.pm
YAML-0.65/inc/Module/Install/Makefile.pm
YAML-0.65/inc/Module/Install/Metadata.pm
YAML-0.65/inc/Module/Install/Scripts.pm
YAML-0.65/inc/Module/Install/TestBase.pm
YAML-0.65/inc/Module/Install/Win32.pm
YAML-0.65/inc/Module/Install/WriteAll.pm
YAML-0.65/inc/Module/Install.pm
YAML-0.65/inc/Spiffy.pm
YAML-0.65/inc/Test/
YAML-0.65/inc/Test/Base/
YAML-0.65/inc/Test/Base/Filter.pm
YAML-0.65/inc/Test/Base.pm
YAML-0.65/inc/Test/Builder/
YAML-0.65/inc/Test/Builder/Module.pm
YAML-0.65/inc/Test/Builder.pm
YAML-0.65/inc/Test/More.pm
YAML-0.65/lib/
YAML-0.65/lib/Test/
YAML-0.65/lib/Test/YAML.pm
YAML-0.65/lib/YAML/
YAML-0.65/lib/YAML/Base.pm
YAML-0.65/lib/YAML/Dumper/
YAML-0.65/lib/YAML/Dumper/Base.pm
YAML-0.65/lib/YAML/Dumper.pm
YAML-0.65/lib/YAML/Error.pm
YAML-0.65/lib/YAML/Loader/
YAML-0.65/lib/YAML/Loader/Base.pm
YAML-0.65/lib/YAML/Loader.pm
YAML-0.65/lib/YAML/Marshall.pm
YAML-0.65/lib/YAML/Node.pm
YAML-0.65/lib/YAML/Tag.pm
YAML-0.65/lib/YAML/Types.pm
YAML-0.65/lib/YAML.pm
YAML-0.65/Makefile.PL
YAML-0.65/MANIFEST
YAML-0.65/META.yml
YAML-0.65/README
YAML-0.65/t/
YAML-0.65/t/2-scalars.t
YAML-0.65/t/Base.pm
YAML-0.65/t/basic-tests.t
YAML-0.65/t/bugs-emailed.t
YAML-0.65/t/bugs-rt.t
YAML-0.65/t/changes.t
YAML-0.65/t/dump-basics.t
YAML-0.65/t/dump-blessed.t
YAML-0.65/t/dump-code.t
YAML-0.65/t/dump-file.t
YAML-0.65/t/dump-nested.t
YAML-0.65/t/dump-opts.t
YAML-0.65/t/dump-perl-types.t
YAML-0.65/t/dump-stringify.t
YAML-0.65/t/dump-tests.t
YAML-0.65/t/dump-works.t
YAML-0.65/t/errors.t
YAML-0.65/t/export.t
YAML-0.65/t/freeze-thaw.t
YAML-0.65/t/global-api.t
YAML-0.65/t/inbox.t
YAML-0.65/t/load-fails.t
YAML-0.65/t/load-passes.t
YAML-0.65/t/load-slides.t
YAML-0.65/t/load-spec.t
YAML-0.65/t/load-tests.t
YAML-0.65/t/load-works.t
YAML-0.65/t/long-quoted-value.yaml
YAML-0.65/t/marshall.t
YAML-0.65/t/meta-yml.t
YAML-0.65/t/node-info.t
YAML-0.65/t/pugs-objects.t
YAML-0.65/t/references.t
YAML-0.65/t/regexp.t
YAML-0.65/t/svk-config.yaml
YAML-0.65/t/svk.t
YAML-0.65/t/test.t
YAML-0.65/t/TestYAML.pm
YAML-0.65/ysh

  CPAN.pm: Going to build I/IN/INGY/YAML-0.65.tar.gz


*** WARNING ***

This release breaks compatibility with versions earlier than version 0.60 of
YAML::Syck and YAML.pm when serializing blessed references.

See the COMPATIBILITY file for more information.

Continue installing YAML.pm? [y] [空リターン]
Checking if your kit is complete...
Looks good
Writing Makefile for YAML
Could not read '/root/.cpan/build/YAML-0.65-wIfY5q/META.yml'. Falling back to 
other methods to determine prerequisites
cp lib/Test/YAML.pm blib/lib/Test/YAML.pm
cp lib/YAML/Types.pm blib/lib/YAML/Types.pm
cp lib/YAML/Loader.pm blib/lib/YAML/Loader.pm
cp lib/YAML/Node.pm blib/lib/YAML/Node.pm
cp lib/YAML/Error.pm blib/lib/YAML/Error.pm
cp lib/YAML/Loader/Base.pm blib/lib/YAML/Loader/Base.pm
cp lib/YAML.pm blib/lib/YAML.pm
cp lib/YAML/Dumper/Base.pm blib/lib/YAML/Dumper/Base.pm
cp lib/YAML/Tag.pm blib/lib/YAML/Tag.pm
cp lib/YAML/Marshall.pm blib/lib/YAML/Marshall.pm
cp lib/YAML/Base.pm blib/lib/YAML/Base.pm
cp lib/YAML/Dumper.pm blib/lib/YAML/Dumper.pm
cp ysh blib/script/ysh
/usr/bin/perl "-Iinc" "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ysh
Manifying blib/man1/ysh.1
Manifying blib/man3/Test::YAML.3pm
Manifying blib/man3/YAML::Types.3pm
Manifying blib/man3/YAML::Node.3pm
Manifying blib/man3/YAML::Loader.3pm
Manifying blib/man3/YAML::Error.3pm
Manifying blib/man3/YAML::Loader::Base.3pm
Manifying blib/man3/YAML.3pm
Manifying blib/man3/YAML::Dumper::Base.3pm
Manifying blib/man3/YAML::Base.3pm
Manifying blib/man3/YAML::Marshall.3pm
Manifying blib/man3/YAML::Tag.3pm
Manifying blib/man3/YAML::Dumper.3pm
  INGY/YAML-0.65.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'inc', 'blib/lib', 'blib/arch')" t/*.t
t/2-scalars..........ok                                                      
t/basic-tests........ok                                                      
t/bugs-emailed.......ok                                                      
        3/25 skipped: various reasons
t/bugs-rt............ok                                                      
        10/41 skipped: various reasons
t/changes............ok                                                      
        1/1 skipped: various reasons
t/dump-basics........ok                                                      
t/dump-blessed.......ok                                                      
t/dump-code..........ok                                                      
t/dump-file..........ok                                                      
t/dump-nested........ok                                                      
t/dump-opts..........ok                                                      
t/dump-perl-types....ok                                                      
t/dump-stringify.....ok                                                      
t/dump-tests.........ok                                                      
t/dump-works.........ok                                                      
t/errors.............ok                                                      
t/export.............ok                                                      
t/freeze-thaw........ok                                                      
t/global-api.........ok                                                      
t/inbox..............ok                                                      
        3/3 skipped: various reasons
t/load-fails.........ok                                                      
t/load-passes........ok                                                      
t/load-slides........ok                                                      
t/load-spec..........ok                                                      
t/load-tests.........ok                                                      
t/load-works.........ok                                                      
t/marshall...........ok                                                      
t/meta-yml...........ok                                                      
t/node-info..........NOK 9/16                                                
#   Failed test 'Regular Expression'
#   at /root/.cpan/build/YAML-0.65-wIfY5q/inc/Test/Base.pm line 352.
#                   'undef;undef;0x9037764-S'
#     doesn't match '(?-xism:^undef;REGEXP;0x[0-9a-fA-F]+$)'
# Looks like you failed 1 test of 16.
t/node-info..........dubious                                                 
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 9
        Failed 1/16 tests, 93.75% okay
t/pugs-objects.......ok                                                      
t/references.........ok                                                      
t/regexp.............ok                                                      
t/svk................ok                                                      
t/test...............ok                                                      
Failed Test   Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/node-info.t    1   256    16    1  9
17 subtests skipped.
Failed 1/34 test scripts. 1/447 subtests failed.
Files=34, Tests=447, 21 wallclock secs (19.04 cusr +  1.21 csys = 20.25 CPU)
Failed 1/34 test programs. 1/447 subtests failed.
make: *** [test_dynamic] Error 29
  INGY/YAML-0.65.tar.gz
  /usr/bin/make test -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 INGY/YAML-0.65.tar.gz                        : make_test NO


cpan[3]> 
  • YAMLが入てないとエラーが出ている....
  • とりあえず,放置.

3.2 Date:Parseのインストール

  • 次に,Date:Parseをインストールする.
cpan[4]> install Date::Parse
Running install for module 'Date::Parse'
Running make for G/GB/GBARR/TimeDate-1.16.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz
Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz ok
TimeDate-1.16/
TimeDate-1.16/lib/
TimeDate-1.16/lib/Date/
TimeDate-1.16/lib/Date/Language/
TimeDate-1.16/lib/Date/Language/Sidama.pm
TimeDate-1.16/lib/Date/Language/Finnish.pm
TimeDate-1.16/lib/Date/Language/Amharic.pm
TimeDate-1.16/lib/Date/Language/Swedish.pm
TimeDate-1.16/lib/Date/Language/Dutch.pm
TimeDate-1.16/lib/Date/Language/Afar.pm
TimeDate-1.16/lib/Date/Language/Brazilian.pm
TimeDate-1.16/lib/Date/Language/Somali.pm
TimeDate-1.16/lib/Date/Language/Tigrinya.pm
TimeDate-1.16/lib/Date/Language/Austrian.pm
TimeDate-1.16/lib/Date/Language/Greek.pm
TimeDate-1.16/lib/Date/Language/French.pm
TimeDate-1.16/lib/Date/Language/Danish.pm
TimeDate-1.16/lib/Date/Language/German.pm
TimeDate-1.16/lib/Date/Language/TigrinyaEritrean.pm
TimeDate-1.16/lib/Date/Language/Italian.pm
TimeDate-1.16/lib/Date/Language/Gedeo.pm
TimeDate-1.16/lib/Date/Language/Chinese_GB.pm
TimeDate-1.16/lib/Date/Language/TigrinyaEthiopian.pm
TimeDate-1.16/lib/Date/Language/English.pm
TimeDate-1.16/lib/Date/Language/Norwegian.pm
TimeDate-1.16/lib/Date/Language/Oromo.pm
TimeDate-1.16/lib/Date/Language/Czech.pm
TimeDate-1.16/lib/Date/Language.pm
TimeDate-1.16/lib/Date/Format.pm
TimeDate-1.16/lib/Date/Parse.pm
TimeDate-1.16/lib/Time/
TimeDate-1.16/lib/Time/Zone.pm
TimeDate-1.16/MANIFEST
TimeDate-1.16/t/
TimeDate-1.16/t/getdate.t
TimeDate-1.16/t/date.t
TimeDate-1.16/t/lang.t
TimeDate-1.16/t/format.t
TimeDate-1.16/Makefile.PL
TimeDate-1.16/ChangeLog
TimeDate-1.16/README

  CPAN.pm: Going to build G/GB/GBARR/TimeDate-1.16.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for TimeDate
cp lib/Date/Language/Swedish.pm blib/lib/Date/Language/Swedish.pm
cp lib/Date/Language/Oromo.pm blib/lib/Date/Language/Oromo.pm
cp lib/Date/Parse.pm blib/lib/Date/Parse.pm
cp lib/Date/Language/Czech.pm blib/lib/Date/Language/Czech.pm
cp lib/Date/Language.pm blib/lib/Date/Language.pm
cp lib/Date/Language/Amharic.pm blib/lib/Date/Language/Amharic.pm
cp lib/Date/Language/Italian.pm blib/lib/Date/Language/Italian.pm
cp lib/Date/Language/TigrinyaEritrean.pm blib/lib/Date/Language/TigrinyaEritrean.pm
cp lib/Date/Language/Chinese_GB.pm blib/lib/Date/Language/Chinese_GB.pm
cp lib/Date/Language/Austrian.pm blib/lib/Date/Language/Austrian.pm
cp lib/Date/Language/Dutch.pm blib/lib/Date/Language/Dutch.pm
cp lib/Date/Language/English.pm blib/lib/Date/Language/English.pm
cp lib/Date/Language/Norwegian.pm blib/lib/Date/Language/Norwegian.pm
cp lib/Date/Format.pm blib/lib/Date/Format.pm
cp lib/Date/Language/Somali.pm blib/lib/Date/Language/Somali.pm
cp lib/Time/Zone.pm blib/lib/Time/Zone.pm
cp lib/Date/Language/Gedeo.pm blib/lib/Date/Language/Gedeo.pm
cp lib/Date/Language/Greek.pm blib/lib/Date/Language/Greek.pm
cp lib/Date/Language/Afar.pm blib/lib/Date/Language/Afar.pm
cp lib/Date/Language/TigrinyaEthiopian.pm blib/lib/Date/Language/TigrinyaEthiopian.pm
cp lib/Date/Language/Tigrinya.pm blib/lib/Date/Language/Tigrinya.pm
cp lib/Date/Language/Brazilian.pm blib/lib/Date/Language/Brazilian.pm
cp lib/Date/Language/Finnish.pm blib/lib/Date/Language/Finnish.pm
cp lib/Date/Language/Danish.pm blib/lib/Date/Language/Danish.pm
cp lib/Date/Language/Sidama.pm blib/lib/Date/Language/Sidama.pm
cp lib/Date/Language/German.pm blib/lib/Date/Language/German.pm
cp lib/Date/Language/French.pm blib/lib/Date/Language/French.pm
Manifying blib/man3/Date::Format.3pm
Manifying blib/man3/Date::Parse.3pm
Manifying blib/man3/Time::Zone.3pm
  GBARR/TimeDate-1.16.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/
lib', 'blib/arch')" t/*.t
t/date.......ok                                                              
t/format.....ok                                                              
t/getdate....ok                                                              
t/lang.......ok                                                              
All tests successful.
Files=4, Tests=414,  1 wallclock secs ( 0.49 cusr +  0.08 csys =  0.57 CPU)
  GBARR/TimeDate-1.16.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make install
Installing /usr/lib/perl5/site_perl/5.8.0/Time/Zone.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Parse.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Format.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Swedish.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Oromo.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Czech.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Amharic.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Italian.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/TigrinyaEritrean.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Chinese_GB.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Austrian.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Dutch.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/English.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Norwegian.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Somali.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Gedeo.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Greek.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Afar.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/TigrinyaEthiopian.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Tigrinya.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Brazilian.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Finnish.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Danish.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/Sidama.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/German.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Date/Language/French.pm
Installing /usr/share/man/man3/Date::Format.3pm
Installing /usr/share/man/man3/Date::Parse.3pm
Installing /usr/share/man/man3/Time::Zone.3pm
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/TimeDate/.packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/perllocal.pod
  GBARR/TimeDate-1.16.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state

cpan[5]> 
  • こっちも,YAMLの未インストール警告が出ているが,インストール自体はOKのようである.

3.3.File::Tailのインストール

  • 次に,File::Tailをインストールする.
cpan[5]> install File::Tail
Running install for module 'File::Tail'
Running make for M/MG/MGRABNAR/File-Tail-0.99.3.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/M/MG/MGRABNAR/File-Tail-0.99.3.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/M/MG/MGRABNAR/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/M/MG/MGRABNAR/File-Tail-0.99.3.tar.
gz ok
File-Tail-0.99.3/
File-Tail-0.99.3/META.yml
File-Tail-0.99.3/t/
File-Tail-0.99.3/t/20tail.t
File-Tail-0.99.3/t/30name_change.t
File-Tail-0.99.3/t/10open.t
File-Tail-0.99.3/select_demo
File-Tail-0.99.3/Tail.pm.debug
File-Tail-0.99.3/Changes
File-Tail-0.99.3/logwatch
File-Tail-0.99.3/MANIFEST
File-Tail-0.99.3/Tail.pm
File-Tail-0.99.3/Makefile.PL
File-Tail-0.99.3/README

  CPAN.pm: Going to build M/MG/MGRABNAR/File-Tail-0.99.3.tar.gz


File::Tail will be installed without debugging information.
This information isn't usefull unless you intend to tinker 
with the code. To install with debugging enabled, use:
perl Makefile.PL LOGIT
Checking if your kit is complete...
Looks good
Writing Makefile for File::Tail
Could not read '/root/.cpan/build/File-Tail-0.99.3-3Et2IL/META.yml'. Falling 
back to other methods to determine prerequisites
cp Tail.pm blib/lib/File/Tail.pm
Manifying blib/man3/File::Tail.3pm
  MGRABNAR/File-Tail-0.99.3.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/10open...........ok                                                        
t/20tail...........ok                                                        
t/30name_change....ok                                                        
All tests successful.
Files=3, Tests=15, 67 wallclock secs ( 0.42 cusr +  0.05 csys =  0.47 CPU)
  MGRABNAR/File-Tail-0.99.3.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
Installing /usr/lib/perl5/site_perl/5.8.0/File/Tail.pm
Installing /usr/share/man/man3/File::Tail.3pm
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/File/Tail/.
packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
perllocal.pod
  MGRABNAR/File-Tail-0.99.3.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state

cpan[6]> 
  • こっちも,YAMLの未インストール警告が出ているが,インストール自体はOKのようである.

3.4 Time::HiRes

  • Time::HiResのインストールを行う.
cpan[6]> install Time::HiRes
Running install for module 'Time::HiRes'
Running make for J/JH/JHI/Time-HiRes-1.9707.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.9707.tar.gz
Fetching with LWP:
  ftp://ftp.kddilabs.jp/CPAN/authors/id/J/JH/JHI/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/J/JH/JHI/Time-HiRes-1.9707.tar.gz ok
Time-HiRes-1.9707/
Time-HiRes-1.9707/Changes
Time-HiRes-1.9707/fallback/
Time-HiRes-1.9707/fallback/const-c.inc
Time-HiRes-1.9707/fallback/const-xs.inc
Time-HiRes-1.9707/hints/
Time-HiRes-1.9707/hints/aix.pl
Time-HiRes-1.9707/hints/dec_osf.pl
Time-HiRes-1.9707/hints/dynixptx.pl
Time-HiRes-1.9707/hints/irix.pl
Time-HiRes-1.9707/hints/linux.pl
Time-HiRes-1.9707/hints/sco.pl
Time-HiRes-1.9707/hints/solaris.pl
Time-HiRes-1.9707/hints/svr4.pl
Time-HiRes-1.9707/HiRes.pm
Time-HiRes-1.9707/HiRes.xs
Time-HiRes-1.9707/Makefile.PL
Time-HiRes-1.9707/MANIFEST
Time-HiRes-1.9707/META.yml
Time-HiRes-1.9707/ppport.h
Time-HiRes-1.9707/README
Time-HiRes-1.9707/t/
Time-HiRes-1.9707/t/HiRes.t
Time-HiRes-1.9707/TODO
Time-HiRes-1.9707/typemap

  CPAN.pm: Going to build J/JH/JHI/Time-HiRes-1.9707.tar.gz

Configuring Time::HiRes...
Using hints hints/linux.pl...
Extra libraries: -lrt...
Have syscall()... looking for syscall.h... found <syscall.h>.
Looking for gettimeofday()... found.
Looking for setitimer()... found.
Looking for getitimer()... found.
You have interval timers (both setitimer and getitimer).
Looking for ualarm()... found.
Looking for usleep()... found.
Looking for nanosleep()... believing $Config{d_nanosleep}... found.
You can mix subsecond sleeps with signals, if you want to.
(It's still not portable, though.)
Looking for clock_gettime()... found.
Looking for clock_getres()... found.
Looking for clock_nanosleep()... 
*** The test run of './tmp30052' failed: status 65280
*** (the status means: errno = 255 or 'Unknown error 255')
*** DO NOT PANIC: this just means that *some* functionality will be missing.
NOT found.
Looking for clock()... found.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...NOT found.
Trying struct stat st_atimensec...NOT found.
Trying struct stat st_atime_n...NOT found.
Trying struct stat st_atim.tv_nsec...found.
Trying struct stat st_uatime...NOT found.
You seem to have stat() subsecond timestamps.
(Your struct stat has them, but the filesystems must help.)
Checking if your kit is complete...
Looks good
Processing hints file hints/linux.pl
Writing Makefile for Time::HiRes
Now you may issue 'make'.  Do not forget also 'make test'.
Could not read '/root/.cpan/build/Time-HiRes-1.9707-0IY9Vc/META.yml'. Falling 
back to other methods to determine prerequisites
cp HiRes.pm blib/lib/Time/HiRes.pm
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.
0/ExtUtils/typemap -typemap typemap  HiRes.xs > HiRes.xsc && mv HiRes.xsc HiRes.
c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-
aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=¥"1.9707¥" -DXS_
VERSION=¥"1.9707¥" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"  
-DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -
DTIME_HIRES_CLOCK -DTIME_HIRES_STAT=4 -DATLEASTFIVEOHOHFIVE HiRes.c
Running Mkbootstrap for Time::HiRes ()
chmod 644 HiRes.bs
rm -f blib/arch/auto/Time/HiRes/HiRes.so
LD_RUN_PATH="/lib" gcc  -shared -L/usr/local/lib HiRes.o  -o blib/arch/auto/Time
/HiRes/HiRes.so         ¥
   -lrt         ¥
  
chmod 755 blib/arch/auto/Time/HiRes/HiRes.so
cp HiRes.bs blib/arch/auto/Time/HiRes/HiRes.bs
chmod 644 blib/arch/auto/Time/HiRes/HiRes.bs
Manifying blib/man3/Time::HiRes.3pm
  JHI/Time-HiRes-1.9707.tar.gz
  /usr/bin/make -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/HiRes....ok                                                                
All tests successful.
Files=1, Tests=38, 22 wallclock secs (11.01 cusr +  0.01 csys = 11.02 CPU)
  JHI/Time-HiRes-1.9707.tar.gz
  /usr/bin/make test -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state
Running make install
Installing /usr/lib/perl5/5.8.0/i386-linux-thread-multi/auto/Time/HiRes/HiRes.so
Installing /usr/lib/perl5/5.8.0/i386-linux-thread-multi/auto/Time/HiRes/HiRes.bs
Files found in blib/arch: installing files in blib/lib into architecture 
dependent library tree
Installing /usr/lib/perl5/5.8.0/i386-linux-thread-multi/Time/HiRes.pm
Installing /usr/share/man/man3/Time::HiRes.3pm
Writing /usr/lib/perl5/5.8.0/i386-linux-thread-multi/auto/Time/HiRes/.packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/
perllocal.pod
  JHI/Time-HiRes-1.9707.tar.gz
  /usr/bin/make install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent 
state

cpan[7]> 
  • こっちも,YAMLの未インストール警告が出ているが,インストール自体はOKのようである.

3.5 YAMLインストール

  • YAMLが無いエラーが出ているが,CPANからだとYAMLがインストールできないので,強制的にインストールしてみる.
  • まずは,CPANのサイトから,モジュールをダウンロードする.
[root@mars swatch-3.2.2]# wget http://search.cpan.org/CPAN/authors/id/I/IN/INGY/
YAML-0.65.tar.gz
--12:10:13--  http://search.cpan.org/CPAN/authors/id/I/IN/INGY/YAML-0.65.tar.gz
           => `YAML-0.65.tar.gz'
Resolving search.cpan.org... 84.45.68.23
Connecting to search.cpan.org[84.45.68.23]:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.nara.wide.ad.jp/pub/CPAN/authors/id/I/IN/INGY/YAML-0.65.tar.
gz [following]
--12:10:14--  http://ftp.nara.wide.ad.jp/pub/CPAN/authors/id/I/IN/INGY/YAML-0.65.
tar.gz
           => `YAML-0.65.tar.gz'
Resolving ftp.nara.wide.ad.jp... 203.178.137.175
Connecting to ftp.nara.wide.ad.jp[203.178.137.175]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 93,938 [application/x-gzip]

100%[===========================================================================
======>] 93,938        80.84K/s             

12:10:15 (80.79 KB/s) - `YAML-0.65.tar.gz' saved [93,938/93,938]

[root@mars swatch-3.2.2]# 
  • ダウンロードしたファイルを確認してアーカイブを展開する.
[root@mars swatch-3.2.2]# ls -la YAML-0.65.tar.gz 
-rw-r--r--    1 root     root        93938 Jun 22 09:58 YAML-0.65.tar.gz
[root@mars swatch-3.2.2]# tar xfz YAML-0.65.tar.gz 
[root@mars swatch-3.2.2]# cd YAML-0.65
[root@mars YAML-0.65]# ls -la
total 80
drwxr-xr-x    5 rolex    rolex        4096 Jun 22 09:57 .
drwxr-xr-x    7 rolex    rolex        4096 Sep 13 12:10 ..
-rw-r--r--    1 rolex    rolex         771 Apr  8 10:33 COMPATIBILITY
-rw-r--r--    1 rolex    rolex        8187 Jun 22 09:51 Changes
-rw-r--r--    1 rolex    rolex        1292 Jun 21 08:01 MANIFEST
-rw-r--r--    1 rolex    rolex         264 Jun 22 09:56 META.yml
-rw-r--r--    1 rolex    rolex         450 Apr  8 10:33 Makefile.PL
-rw-r--r--    1 rolex    rolex       23809 Apr  8 10:33 README
drwxr-xr-x    4 rolex    rolex        4096 Jun 22 09:57 inc
drwxr-xr-x    4 rolex    rolex        4096 Jun 22 09:57 lib
drwxr-xr-x    2 rolex    rolex        4096 Jun 22 09:57 t
-rw-r--r--    1 rolex    rolex       10334 Apr  8 10:33 ysh
[root@mars YAML-0.65]#
  • makeの生成を行う.
[root@mars YAML-0.65]# perl Makefile.PL 

*** WARNING ***

This release breaks compatibility with versions earlier than version 0.60 of
YAML::Syck and YAML.pm when serializing blessed references.

See the COMPATIBILITY file for more information.

Continue installing YAML.pm? [y] y
Checking if your kit is complete...
Looks good
Writing Makefile for YAML
[root@mars YAML-0.65]# 
  • 状態は変わらない様である.
  • makeする.
[root@mars YAML-0.65]# make
cp lib/Test/YAML.pm blib/lib/Test/YAML.pm
cp lib/YAML/Types.pm blib/lib/YAML/Types.pm
cp lib/YAML/Loader.pm blib/lib/YAML/Loader.pm
cp lib/YAML/Node.pm blib/lib/YAML/Node.pm
cp lib/YAML/Error.pm blib/lib/YAML/Error.pm
cp lib/YAML/Loader/Base.pm blib/lib/YAML/Loader/Base.pm
cp lib/YAML.pm blib/lib/YAML.pm
cp lib/YAML/Dumper/Base.pm blib/lib/YAML/Dumper/Base.pm
cp lib/YAML/Tag.pm blib/lib/YAML/Tag.pm
cp lib/YAML/Marshall.pm blib/lib/YAML/Marshall.pm
cp lib/YAML/Base.pm blib/lib/YAML/Base.pm
cp lib/YAML/Dumper.pm blib/lib/YAML/Dumper.pm
cp ysh blib/script/ysh
/usr/bin/perl "-Iinc" "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/ysh
Manifying blib/man1/ysh.1
Manifying blib/man3/Test::YAML.3pm
Manifying blib/man3/YAML::Types.3pm
Manifying blib/man3/YAML::Node.3pm
Manifying blib/man3/YAML::Loader.3pm
Manifying blib/man3/YAML::Error.3pm
Manifying blib/man3/YAML::Loader::Base.3pm
Manifying blib/man3/YAML.3pm
Manifying blib/man3/YAML::Dumper::Base.3pm
Manifying blib/man3/YAML::Base.3pm
Manifying blib/man3/YAML::Marshall.3pm
Manifying blib/man3/YAML::Tag.3pm
Manifying blib/man3/YAML::Dumper.3pm
[root@mars YAML-0.65]#
  • 問題なく終了.
  • testを行う.
[root@mars YAML-0.65]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'inc', 'blib/lib', 'blib/arch')" t/*.t
t/2-scalars..........ok                                                      
t/basic-tests........ok                                                      
t/bugs-emailed.......ok                                                      
        3/25 skipped: various reasons
t/bugs-rt............ok                                                      
        10/41 skipped: various reasons
t/changes............ok                                                      
        1/1 skipped: various reasons
t/dump-basics........ok                                                      
t/dump-blessed.......ok                                                      
t/dump-code..........ok                                                      
t/dump-file..........ok                                                      
t/dump-nested........ok                                                      
t/dump-opts..........ok                                                      
t/dump-perl-types....ok                                                      
t/dump-stringify.....ok                                                      
t/dump-tests.........ok                                                      
t/dump-works.........ok                                                      
t/errors.............ok                                                      
t/export.............ok                                                      
t/freeze-thaw........ok                                                      
t/global-api.........ok                                                      
t/inbox..............ok                                                      
        3/3 skipped: various reasons
t/load-fails.........ok                                                      
t/load-passes........ok                                                      
t/load-slides........ok                                                      
t/load-spec..........ok                                                      
t/load-tests.........ok                                                      
t/load-works.........ok                                                      
t/marshall...........ok                                                      
t/meta-yml...........ok                                                      
t/node-info..........ok 1/16                                                 
#   Failed test 'Regular Expression'
#   at /root/swatch/swatch-3.2.2/YAML-0.65/inc/Test/Base.pm line 352.
#                   'undef;undef;0x90a2b5c-S'
#     doesn't match '(?-xism:^undef;REGEXP;0x[0-9a-fA-F]+$)'
# Looks like you failed 1 test of 16.
t/node-info..........dubious                                                 
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 9
        Failed 1/16 tests, 93.75% okay
t/pugs-objects.......ok                                                      
t/references.........ok                                                      
t/regexp.............ok                                                      
t/svk................ok                                                      
t/test...............ok                                                      
Failed Test   Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/node-info.t    1   256    16    1  9
17 subtests skipped.
Failed 1/34 test scripts. 1/447 subtests failed.
Files=34, Tests=447, 21 wallclock secs (19.22 cusr +  1.08 csys = 20.30 CPU)
Failed 1/34 test programs. 1/447 subtests failed.
make: *** [test_dynamic] Error 29
[root@mars YAML-0.65]#
  • エラーが出る.テスト失敗.
  • 知らないふりしてインストールしてみる.
[root@mars YAML-0.65]# make install
Installing /usr/lib/perl5/site_perl/5.8.0/YAML.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Types.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Loader.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Node.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Error.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Tag.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Marshall.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Base.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Dumper.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Dumper/Base.pm
Installing /usr/lib/perl5/site_perl/5.8.0/YAML/Loader/Base.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Test/YAML.pm
Installing /usr/share/man/man1/ysh.1
Installing /usr/share/man/man3/Test::YAML.3pm
Installing /usr/share/man/man3/YAML::Types.3pm
Installing /usr/share/man/man3/YAML::Node.3pm
Installing /usr/share/man/man3/YAML::Loader.3pm
Installing /usr/share/man/man3/YAML::Error.3pm
Installing /usr/share/man/man3/YAML::Loader::Base.3pm
Installing /usr/share/man/man3/YAML.3pm
Installing /usr/share/man/man3/YAML::Dumper::Base.3pm
Installing /usr/share/man/man3/YAML::Base.3pm
Installing /usr/share/man/man3/YAML::Marshall.3pm
Installing /usr/share/man/man3/YAML::Tag.3pm
Installing /usr/share/man/man3/YAML::Dumper.3pm
Installing /usr/bin/ysh
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/YAML/.packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/perllocal.pod
[root@mars YAML-0.65]# 
  • ファイルコピーだけなので,問題ないようではあるが...
  • インストールしたモジュールのテストを行ってみる.
cpan[5]> test Date::Calc
Running test for module 'Date::Calc'
Running make for S/ST/STBEY/Date-Calc-5.4.tar.gz
CPAN: Digest::SHA loaded ok (v5.45)
Checksum for /root/.cpan/sources/authors/id/S/ST/STBEY/Date-Calc-5.4.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
Date-Calc-5.4/
Date-Calc-5.4/t/
Date-Calc-5.4/t/f023.t
Date-Calc-5.4/t/f006.t
Date-Calc-5.4/t/f025.t
Date-Calc-5.4/t/f008.t
Date-Calc-5.4/t/m011.t
Date-Calc-5.4/t/f027.t
Date-Calc-5.4/t/f029.t
Date-Calc-5.4/t/f011.t
Date-Calc-5.4/t/f030.t
Date-Calc-5.4/t/f013.t
Date-Calc-5.4/t/f032.t
Date-Calc-5.4/t/f015.t
Date-Calc-5.4/t/f034.t
Date-Calc-5.4/t/m001.t
Date-Calc-5.4/t/f017.t
Date-Calc-5.4/t/f036.t
Date-Calc-5.4/t/m003.t
Date-Calc-5.4/t/f019.t
Date-Calc-5.4/t/m005.t
Date-Calc-5.4/t/m007.t
Date-Calc-5.4/t/m009.t
Date-Calc-5.4/t/f001.t
Date-Calc-5.4/t/f020.t
Date-Calc-5.4/t/f003.t
Date-Calc-5.4/t/f022.t
Date-Calc-5.4/t/f005.t
Date-Calc-5.4/t/f024.t
Date-Calc-5.4/t/f007.t
Date-Calc-5.4/t/m010.t
Date-Calc-5.4/t/f026.t
Date-Calc-5.4/t/f009.t
Date-Calc-5.4/t/f028.t
Date-Calc-5.4/t/f010.t
Date-Calc-5.4/t/f012.t
Date-Calc-5.4/t/f031.t
Date-Calc-5.4/t/f014.t
Date-Calc-5.4/t/f033.t
Date-Calc-5.4/t/f016.t
Date-Calc-5.4/t/f035.t
Date-Calc-5.4/t/m002.t
Date-Calc-5.4/t/f018.t
Date-Calc-5.4/t/m004.t
Date-Calc-5.4/t/m006.t
Date-Calc-5.4/t/m008.t
Date-Calc-5.4/t/f000.t
Date-Calc-5.4/t/f002.t
Date-Calc-5.4/t/f021.t
Date-Calc-5.4/t/f004.t
Date-Calc-5.4/examples/
Date-Calc-5.4/examples/linearcal.pl
Date-Calc-5.4/examples/time.pl
Date-Calc-5.4/examples/nth_weekday.pl
Date-Calc-5.4/examples/vacation.pl
Date-Calc-5.4/examples/anniversaries.pl
Date-Calc-5.4/examples/income.pl
Date-Calc-5.4/examples/age_in_days_eu.pl
Date-Calc-5.4/examples/cal.c
Date-Calc-5.4/examples/holidays.pl
Date-Calc-5.4/examples/bug.pl
Date-Calc-5.4/examples/delta.pl
Date-Calc-5.4/examples/calendar.cgi
Date-Calc-5.4/examples/weiberfastnacht.pl
Date-Calc-5.4/examples/age_in_days_us.pl
Date-Calc-5.4/Calc.xs
Date-Calc-5.4/tools/
Date-Calc-5.4/tools/compile.pl
Date-Calc-5.4/tools/iso2pc.c
Date-Calc-5.4/tools/pc2iso.c
Date-Calc-5.4/tools/compile.bat
Date-Calc-5.4/tools/compile.sh
Date-Calc-5.4/MANIFEST
Date-Calc-5.4/CREDITS.txt
Date-Calc-5.4/ToolBox.h
Date-Calc-5.4/DateCalc.c
Date-Calc-5.4/Calendar.pm
Date-Calc-5.4/INSTALL.txt
Date-Calc-5.4/CHANGES.txt
Date-Calc-5.4/DateCalc.h
Date-Calc-5.4/Makefile.PL
Date-Calc-5.4/lib/
Date-Calc-5.4/lib/Date/
Date-Calc-5.4/lib/Date/Calendar/
Date-Calc-5.4/lib/Date/Calendar/Profiles.pm
Date-Calc-5.4/lib/Date/Calendar/Profiles.pod
Date-Calc-5.4/lib/Date/Calendar/Year.pm
Date-Calc-5.4/lib/Date/Calendar/Year.pod
Date-Calc-5.4/lib/Date/Calc/
Date-Calc-5.4/lib/Date/Calc/Object.pm
Date-Calc-5.4/lib/Date/Calc/Object.pod
Date-Calc-5.4/Artistic.txt
Date-Calc-5.4/README.txt
Date-Calc-5.4/TOOLS.txt
Date-Calc-5.4/GNU_LGPL.txt
Date-Calc-5.4/EXAMPLES.txt
Date-Calc-5.4/GNU_GPL.txt
Date-Calc-5.4/typemap
Date-Calc-5.4/Calc.pod
Date-Calc-5.4/Calendar.pod
Date-Calc-5.4/Calc.pm
CPAN: File::Temp loaded ok (v0.18)

  CPAN.pm: Going to build S/ST/STBEY/Date-Calc-5.4.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Date::Calc
Writing patchlevel.h for /usr/bin/perl (5.008)
cp lib/Date/Calc/Object.pod blib/lib/Date/Calc/Object.pod
cp lib/Date/Calendar/Year.pm blib/lib/Date/Calendar/Year.pm
cp lib/Date/Calc/Object.pm blib/lib/Date/Calc/Object.pm
cp Calc.pod blib/lib/Date/Calc.pod
cp Calendar.pod blib/lib/Date/Calendar.pod
cp lib/Date/Calendar/Profiles.pm blib/lib/Date/Calendar/Profiles.pm
cp lib/Date/Calendar/Profiles.pod blib/lib/Date/Calendar/Profiles.pod
cp Calc.pm blib/lib/Date/Calc.pm
cp Calendar.pm blib/lib/Date/Calendar.pm
cp lib/Date/Calendar/Year.pod blib/lib/Date/Calendar/Year.pod
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.
0/ExtUtils/typemap -typemap typemap  Calc.xs > Calc.xsc && mv Calc.xsc Calc.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-
aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=¥"5.4¥" -DXS_
VERSION=¥"5.4¥" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   
Calc.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-
aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=¥"5.4¥" -DXS_
VERSION=¥"5.4¥" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   
DateCalc.c
Running Mkbootstrap for Date::Calc ()
chmod 644 Calc.bs
rm -f blib/arch/auto/Date/Calc/Calc.so
gcc  -shared -L/usr/local/lib Calc.o DateCalc.o  -o blib/arch/auto/Date/Calc/
Calc.so    ¥
        ¥
  
chmod 755 blib/arch/auto/Date/Calc/Calc.so
cp Calc.bs blib/arch/auto/Date/Calc/Calc.bs
chmod 644 blib/arch/auto/Date/Calc/Calc.bs
Manifying blib/man3/Date::Calc::Object.3pm
Manifying blib/man3/Date::Calc.3pm
Manifying blib/man3/Date::Calendar.3pm
Manifying blib/man3/Date::Calendar::Year.3pm
Manifying blib/man3/Date::Calendar::Profiles.3pm
  STBEY/Date-Calc-5.4.tar.gz
  /usr/bin/make -- OK
CPAN: YAML loaded ok (v0.65)
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/f000....ok                                                                 
t/f001....ok                                                                 
t/f002....ok                                                                 
t/f003....ok                                                                 
t/f004....ok                                                                 
t/f005....ok                                                                 
t/f006....ok                                                                 
t/f007....ok                                                                 
t/f008....ok                                                                 
t/f009....ok                                                                 
t/f010....ok                                                                 
t/f011....ok                                                                 
t/f012....ok                                                                 
t/f013....ok                                                                 
t/f014....ok                                                                 
t/f015....ok                                                                 
t/f016....ok                                                                 
t/f017....ok                                                                 
t/f018....ok                                                                 
t/f019....ok                                                                 
t/f020....ok                                                                 
t/f021....ok                                                                 
t/f022....ok                                                                 
t/f023....ok                                                                 
t/f024....ok                                                                 
t/f025....ok                                                                 
t/f026....ok                                                                 
t/f027....ok                                                                 
t/f028....ok                                                                 
t/f029....ok                                                                 
t/f030....ok                                                                 
t/f031....ok                                                                 
t/f032....ok                                                                 
t/f033....ok                                                                 
t/f034....ok                                                                 
t/f035....ok                                                                 
t/f036....ok                                                                 
t/m001....ok                                                                 
t/m002....ok                                                                 
t/m003....ok                                                                 
t/m004....ok                                                                 
t/m005....ok                                                                 
t/m006....ok                                                                 
t/m007....ok                                                                 
t/m008....ok                                                                 
t/m009....ok                                                                 
t/m010....ok                                                                 
t/m011....ok                                                                 
All tests successful.
Files=48, Tests=2770, 11 wallclock secs ( 6.83 cusr +  0.60 csys =  7.43 CPU)
  STBEY/Date-Calc-5.4.tar.gz
  /usr/bin/make test -- OK

cpan[6]> test Date:Parse
Running test for module 'Date::Parse'
Running make for G/GB/GBARR/TimeDate-1.16.tar.gz
Prepending /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/arch /root/.cpan/build/
Date-Calc-5.4-wB23Xf/blib/lib to PERL5LIB for 'get'
Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz ok
TimeDate-1.16/
TimeDate-1.16/lib/
TimeDate-1.16/lib/Date/
TimeDate-1.16/lib/Date/Language/
TimeDate-1.16/lib/Date/Language/Sidama.pm
TimeDate-1.16/lib/Date/Language/Finnish.pm
TimeDate-1.16/lib/Date/Language/Amharic.pm
TimeDate-1.16/lib/Date/Language/Swedish.pm
TimeDate-1.16/lib/Date/Language/Dutch.pm
TimeDate-1.16/lib/Date/Language/Afar.pm
TimeDate-1.16/lib/Date/Language/Brazilian.pm
TimeDate-1.16/lib/Date/Language/Somali.pm
TimeDate-1.16/lib/Date/Language/Tigrinya.pm
TimeDate-1.16/lib/Date/Language/Austrian.pm
TimeDate-1.16/lib/Date/Language/Greek.pm
TimeDate-1.16/lib/Date/Language/French.pm
TimeDate-1.16/lib/Date/Language/Danish.pm
TimeDate-1.16/lib/Date/Language/German.pm
TimeDate-1.16/lib/Date/Language/TigrinyaEritrean.pm
TimeDate-1.16/lib/Date/Language/Italian.pm
TimeDate-1.16/lib/Date/Language/Gedeo.pm
TimeDate-1.16/lib/Date/Language/Chinese_GB.pm
TimeDate-1.16/lib/Date/Language/TigrinyaEthiopian.pm
TimeDate-1.16/lib/Date/Language/English.pm
TimeDate-1.16/lib/Date/Language/Norwegian.pm
TimeDate-1.16/lib/Date/Language/Oromo.pm
TimeDate-1.16/lib/Date/Language/Czech.pm
TimeDate-1.16/lib/Date/Language.pm
TimeDate-1.16/lib/Date/Format.pm
TimeDate-1.16/lib/Date/Parse.pm
TimeDate-1.16/lib/Time/
TimeDate-1.16/lib/Time/Zone.pm
TimeDate-1.16/MANIFEST
TimeDate-1.16/t/
TimeDate-1.16/t/getdate.t
TimeDate-1.16/t/date.t
TimeDate-1.16/t/lang.t
TimeDate-1.16/t/format.t
TimeDate-1.16/Makefile.PL
TimeDate-1.16/ChangeLog
TimeDate-1.16/README
Prepending /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/arch /root/.cpan/build/
Date-Calc-5.4-wB23Xf/blib/lib to PERL5LIB for 'make'

  CPAN.pm: Going to build G/GB/GBARR/TimeDate-1.16.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for TimeDate
cp lib/Date/Language/Swedish.pm blib/lib/Date/Language/Swedish.pm
cp lib/Date/Language/Oromo.pm blib/lib/Date/Language/Oromo.pm
cp lib/Date/Parse.pm blib/lib/Date/Parse.pm
cp lib/Date/Language/Czech.pm blib/lib/Date/Language/Czech.pm
cp lib/Date/Language.pm blib/lib/Date/Language.pm
cp lib/Date/Language/Amharic.pm blib/lib/Date/Language/Amharic.pm
cp lib/Date/Language/Italian.pm blib/lib/Date/Language/Italian.pm
cp lib/Date/Language/TigrinyaEritrean.pm blib/lib/Date/Language/TigrinyaEritrean.
pm
cp lib/Date/Language/Chinese_GB.pm blib/lib/Date/Language/Chinese_GB.pm
cp lib/Date/Language/Austrian.pm blib/lib/Date/Language/Austrian.pm
cp lib/Date/Language/Dutch.pm blib/lib/Date/Language/Dutch.pm
cp lib/Date/Language/English.pm blib/lib/Date/Language/English.pm
cp lib/Date/Language/Norwegian.pm blib/lib/Date/Language/Norwegian.pm
cp lib/Date/Format.pm blib/lib/Date/Format.pm
cp lib/Date/Language/Somali.pm blib/lib/Date/Language/Somali.pm
cp lib/Time/Zone.pm blib/lib/Time/Zone.pm
cp lib/Date/Language/Gedeo.pm blib/lib/Date/Language/Gedeo.pm
cp lib/Date/Language/Greek.pm blib/lib/Date/Language/Greek.pm
cp lib/Date/Language/Afar.pm blib/lib/Date/Language/Afar.pm
cp lib/Date/Language/TigrinyaEthiopian.pm blib/lib/Date/Language/
TigrinyaEthiopian.pm
cp lib/Date/Language/Tigrinya.pm blib/lib/Date/Language/Tigrinya.pm
cp lib/Date/Language/Brazilian.pm blib/lib/Date/Language/Brazilian.pm
cp lib/Date/Language/Finnish.pm blib/lib/Date/Language/Finnish.pm
cp lib/Date/Language/Danish.pm blib/lib/Date/Language/Danish.pm
cp lib/Date/Language/Sidama.pm blib/lib/Date/Language/Sidama.pm
cp lib/Date/Language/German.pm blib/lib/Date/Language/German.pm
cp lib/Date/Language/French.pm blib/lib/Date/Language/French.pm
Manifying blib/man3/Date::Format.3pm
Manifying blib/man3/Date::Parse.3pm
Manifying blib/man3/Time::Zone.3pm
  GBARR/TimeDate-1.16.tar.gz
  /usr/bin/make -- OK
Prepending /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/arch /root/.cpan/build/
Date-Calc-5.4-wB23Xf/blib/lib to PERL5LIB for 'test'
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/date.......ok                                                              
t/format.....ok                                                              
t/getdate....ok                                                              
t/lang.......ok                                                              
All tests successful.
Files=4, Tests=414,  1 wallclock secs ( 0.52 cusr +  0.07 csys =  0.59 CPU)
  GBARR/TimeDate-1.16.tar.gz
  /usr/bin/make test -- OK


cpan[8]> test File::Tail
Running test for module 'File::Tail'
Running make for M/MG/MGRABNAR/File-Tail-0.99.3.tar.gz
Prepending /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/arch /root/.cpan/build/
TimeDate-1.16-tjCwmf/blib/lib /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/arch /
root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/lib to PERL5LIB for 'get'
Checksum for /root/.cpan/sources/authors/id/M/MG/MGRABNAR/File-Tail-0.99.3.tar.
gz ok
File-Tail-0.99.3/
File-Tail-0.99.3/META.yml
File-Tail-0.99.3/t/
File-Tail-0.99.3/t/20tail.t
File-Tail-0.99.3/t/30name_change.t
File-Tail-0.99.3/t/10open.t
File-Tail-0.99.3/select_demo
File-Tail-0.99.3/Tail.pm.debug
File-Tail-0.99.3/Changes
File-Tail-0.99.3/logwatch
File-Tail-0.99.3/MANIFEST
File-Tail-0.99.3/Tail.pm
File-Tail-0.99.3/Makefile.PL
File-Tail-0.99.3/README
Prepending /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/arch /root/.cpan/build/
TimeDate-1.16-tjCwmf/blib/lib /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/arch /
root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/lib to PERL5LIB for 'make'

  CPAN.pm: Going to build M/MG/MGRABNAR/File-Tail-0.99.3.tar.gz


File::Tail will be installed without debugging information.
This information isn't usefull unless you intend to tinker 
with the code. To install with debugging enabled, use:
perl Makefile.PL LOGIT
Checking if your kit is complete...
Looks good
Writing Makefile for File::Tail
cp Tail.pm blib/lib/File/Tail.pm
Manifying blib/man3/File::Tail.3pm
  MGRABNAR/File-Tail-0.99.3.tar.gz
  /usr/bin/make -- OK
Prepending /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/arch /root/.cpan/build/
TimeDate-1.16-tjCwmf/blib/lib /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/arch /
root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/lib to PERL5LIB for 'test'
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/10open...........ok                                                        
t/20tail...........ok                                                        
t/30name_change....ok                                                        
All tests successful.
Files=3, Tests=15, 65 wallclock secs ( 0.44 cusr +  0.05 csys =  0.49 CPU)
  MGRABNAR/File-Tail-0.99.3.tar.gz
  /usr/bin/make test -- OK

cpan[9]> test Time::HiRes
Running test for module 'Time::HiRes'
Running make for J/JH/JHI/Time-HiRes-1.9707.tar.gz
Prepending /root/.cpan/build/File-Tail-0.99.3-3HTlNg/blib/arch /root/.cpan/build
/File-Tail-0.99.3-3HTlNg/blib/lib /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/
arch /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/lib /root/.cpan/build/Date-Calc
-5.4-wB23Xf/blib/arch /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/lib to PERL5
LIB for 'get'
Checksum for /root/.cpan/sources/authors/id/J/JH/JHI/Time-HiRes-1.9707.tar.gz ok
Time-HiRes-1.9707/
Time-HiRes-1.9707/Changes
Time-HiRes-1.9707/fallback/
Time-HiRes-1.9707/fallback/const-c.inc
Time-HiRes-1.9707/fallback/const-xs.inc
Time-HiRes-1.9707/hints/
Time-HiRes-1.9707/hints/aix.pl
Time-HiRes-1.9707/hints/dec_osf.pl
Time-HiRes-1.9707/hints/dynixptx.pl
Time-HiRes-1.9707/hints/irix.pl
Time-HiRes-1.9707/hints/linux.pl
Time-HiRes-1.9707/hints/sco.pl
Time-HiRes-1.9707/hints/solaris.pl
Time-HiRes-1.9707/hints/svr4.pl
Time-HiRes-1.9707/HiRes.pm
Time-HiRes-1.9707/HiRes.xs
Time-HiRes-1.9707/Makefile.PL
Time-HiRes-1.9707/MANIFEST
Time-HiRes-1.9707/META.yml
Time-HiRes-1.9707/ppport.h
Time-HiRes-1.9707/README
Time-HiRes-1.9707/t/
Time-HiRes-1.9707/t/HiRes.t
Time-HiRes-1.9707/TODO
Time-HiRes-1.9707/typemap
Prepending /root/.cpan/build/File-Tail-0.99.3-3HTlNg/blib/arch /root/.cpan/build
/File-Tail-0.99.3-3HTlNg/blib/lib /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/
arch /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/lib /root/.cpan/build/Date-Calc
-5.4-wB23Xf/blib/arch /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/lib to PERL5
LIB for 'make'

  CPAN.pm: Going to build J/JH/JHI/Time-HiRes-1.9707.tar.gz

Configuring Time::HiRes...
Using hints hints/linux.pl...
Extra libraries: -lrt...
Have syscall()... looking for syscall.h... found <syscall.h>.
Looking for gettimeofday()... found.
Looking for setitimer()... found.
Looking for getitimer()... found.
You have interval timers (both setitimer and getitimer).
Looking for ualarm()... found.
Looking for usleep()... found.
Looking for nanosleep()... believing $Config{d_nanosleep}... found.
You can mix subsecond sleeps with signals, if you want to.
(It's still not portable, though.)
Looking for clock_gettime()... found.
Looking for clock_getres()... found.
Looking for clock_nanosleep()... 
*** The test run of './tmp8168' failed: status 65280
*** (the status means: errno = 255 or 'Unknown error 255')
*** DO NOT PANIC: this just means that *some* functionality will be missing.
NOT found.
Looking for clock()... found.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...NOT found.
Trying struct stat st_atimensec...NOT found.
Trying struct stat st_atime_n...NOT found.
Trying struct stat st_atim.tv_nsec...found.
Trying struct stat st_uatime...NOT found.
You seem to have stat() subsecond timestamps.
(Your struct stat has them, but the filesystems must help.)
Checking if your kit is complete...
Looks good
Processing hints file hints/linux.pl
Writing Makefile for Time::HiRes
Now you may issue 'make'.  Do not forget also 'make test'.
cp HiRes.pm blib/lib/Time/HiRes.pm
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.
0/ExtUtils/typemap -typemap typemap  HiRes.xs > HiRes.xsc && mv HiRes.xsc HiRes.
c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-
aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=¥"1.9707¥" -DXS_
VERSION=¥"1.9707¥" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"  
-DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -
DTIME_HIRES_CLOCK -DTIME_HIRES_STAT=4 -DATLEASTFIVEOHOHFIVE HiRes.c
Running Mkbootstrap for Time::HiRes ()
chmod 644 HiRes.bs
rm -f blib/arch/auto/Time/HiRes/HiRes.so
LD_RUN_PATH="/lib" gcc  -shared -L/usr/local/lib HiRes.o  -o blib/arch/auto/Time
/HiRes/HiRes.so         ¥
   -lrt         ¥
  
chmod 755 blib/arch/auto/Time/HiRes/HiRes.so
cp HiRes.bs blib/arch/auto/Time/HiRes/HiRes.bs
chmod 644 blib/arch/auto/Time/HiRes/HiRes.bs
Manifying blib/man3/Time::HiRes.3pm
  JHI/Time-HiRes-1.9707.tar.gz
  /usr/bin/make -- OK
Prepending /root/.cpan/build/File-Tail-0.99.3-3HTlNg/blib/arch /root/.cpan/build
/File-Tail-0.99.3-3HTlNg/blib/lib /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/
arch /root/.cpan/build/TimeDate-1.16-tjCwmf/blib/lib /root/.cpan/build/Date-Calc
-5.4-wB23Xf/blib/arch /root/.cpan/build/Date-Calc-5.4-wB23Xf/blib/lib to PERL5
LIB for 'test'
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/HiRes....ok                                                                
All tests successful.
Files=1, Tests=38, 22 wallclock secs ( 9.65 cusr +  0.01 csys =  9.66 CPU)
  JHI/Time-HiRes-1.9707.tar.gz
  /usr/bin/make test -- OK

cpan[10]> 
  • YAMLの警告は出なくなった模様.これでよしとする.

4.ExtUtils::MakeMakerの確認

  • もう一度,インストール手順を確認してみる.
[root@mars swatch-3.2.2]# cat INSTALL 
To install, simply issue the following commands:

        perl Makefile.PL
        make
        make test
        make install
        make realclean

Swatch installs just like a CPAN module. If you are not familiar with this 
process then you may want to read about it by issuing the command:

        man ExtUtils::MakeMaker

Use the "perldoc" command if your "man" cannot find the document.

If you see messages like these:

    Warning: prerequisite Date::Calc 0 not found at (eval 1) line 219.
    Warning: prerequisite Date::Parse 0 not found at (eval 1) line 219.
    Warning: prerequisite File::Tail 0 not found at (eval 1) line 219.
    Warning: prerequisite Time::HiRes 1.12 not found at (eval 1) line 219.

Then you need to install the CPAN module(s) that it doesn't find before 
you can use swatch. You can find these modules at search.cpan.org.
However, many operating systems may already bundle them up in neat
little packages, so you should check with them first.
[root@mars swatch-3.2.2]# 
  • ExtUtils:MakeMakerというモジュールの準備が必要という事なので,確認する.
  • まず,インストールしてみる.
cpan[2]> install ExtUtils::MakeMaker
ExtUtils::MakeMaker is up to date (6.36).

cpan[3]> 
  • 最新のようである.
  • 次に,テストを行う.
cpan[3]> test ExtUtils::MakeMaker   
Running test for module 'ExtUtils::MakeMaker'
Running make for M/MS/MSCHWERN/ExtUtils-MakeMaker-6.36.tar.gz
  Has already been unwrapped into directory /root/.cpan/build/ExtUtils-MakeMaker
-6.36-APSCQj
  Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Ilib" "-MExtUtils::Command::MM" "-e" "test_
harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00compile.............ok                                                   
        27/54 skipped: various reasons
t/backwards.............ok                                                   
t/basic.................ok                                                   
t/build_man.............ok                                                   
t/bytes.................ok                                                   
t/cd....................ok                                                   
        1/4 skipped: various reasons
t/config................ok                                                   
t/dir_target............ok                                                   
t/FIRST_MAKEFILE........ok                                                   
t/fixin.................ok                                                   
t/hints.................ok                                                   
t/INST..................ok                                                   
t/INST_PREFIX...........ok                                                   
        4/52 skipped: various reasons
t/INSTALL_BASE..........ok                                                   
t/Liblist...............ok                                                   
t/make..................ok                                                   
t/Mkbootstrap...........ok                                                   
        1/18 skipped: various reasons
t/MM_Any................ok                                                   
t/MM_BeOS...............skipped
        all skipped: This is not BeOS
t/MM_Cygwin.............skipped
        all skipped: This is not cygwin
t/MM_NW5................skipped
        all skipped: This is not NW5
t/MM_OS2................skipped
        all skipped: This is not OS/2
t/MM_Unix...............ok                                                   
t/MM_VMS................skipped
        all skipped: This is not VMS
t/MM_Win32..............skipped
        all skipped: This is not Win32
t/oneliner..............ok                                                   
t/parse_version.........ok                                                   
t/PL_FILES..............ok                                                   
t/pm....................ok                                                   
t/postamble.............ok                                                   
t/prefixify.............ok                                                   
        1/3 skipped: various reasons
t/prereq................ok                                                   
t/prereq_print..........ok                                                   
t/problems..............ok                                                   
t/prompt................ok                                                   
t/recurs................ok                                                   
t/revision..............ok                                                   
t/split_command.........ok                                                   
t/testlib...............ok                                                   
t/VERSION_FROM..........ok                                                   
t/vmsish................ok                                                   
t/WriteEmptyMakefile....ok                                                   
t/writemakefile_args....ok                                                   
        2/24 skipped: various reasons
t/xs....................ok                                                   
All tests successful, 6 tests and 36 subtests skipped.
Files=44, Tests=590, 46 wallclock secs (38.51 cusr +  5.80 csys = 44.31 CPU)
  MSCHWERN/ExtUtils-MakeMaker-6.36.tar.gz
  /usr/bin/make test -- OK

cpan[4]> 
  • 問題ないようである.

5.Swatchのインストール

  • ここまでで,前提となるモジュールがそろったので,やっとswatchのmakefileの作成を実行する.
[root@mars swatch-3.2.2]# perl Makefile.PL 
Checking if your kit is complete...
Looks good
Prototype mismatch: sub main::prompt ($;$) vs none at inc/Module/Install.pm line 146.

*** WARNING ***

This release breaks compatibility with versions earlier than version 0.60 of
YAML::Syck and YAML.pm when serializing blessed references.

See the COMPATIBILITY file for more information.

Continue installing YAML.pm? [y] y
Writing Makefile for YAML
Writing Makefile for swatch
[root@mars swatch-3.2.2]# 
  • makefileが作成されたので,makeする.
[root@mars swatch-3.2.2]# make
cp lib/Swatch/Threshold.pm blib/lib/Swatch/Threshold.pm
cp lib/Swatch/Throttle.pm blib/lib/Swatch/Throttle.pm
cp lib/Swatch/Actions.pm blib/lib/Swatch/Actions.pm
AutoSplitting blib/lib/Swatch/Actions.pm (blib/lib/auto/Swatch/Actions)
make[1]: Entering directory `/root/swatch/swatch-3.2.2/YAML-0.65'
cp ysh ../blib/script/ysh
/usr/bin/perl "-Iinc" "-MExtUtils::MY" -e "MY->fixin(shift)" ../blib/script/ysh
Manifying ../blib/man1/ysh.1
Manifying ../blib/man3/Test::YAML.3pm
Manifying ../blib/man3/YAML::Types.3pm
Manifying ../blib/man3/YAML::Node.3pm
Manifying ../blib/man3/YAML::Loader.3pm
Manifying ../blib/man3/YAML::Error.3pm
Manifying ../blib/man3/YAML::Loader::Base.3pm
Manifying ../blib/man3/YAML.3pm
Manifying ../blib/man3/YAML::Dumper::Base.3pm
Manifying ../blib/man3/YAML::Base.3pm
Manifying ../blib/man3/YAML::Marshall.3pm
Manifying ../blib/man3/YAML::Tag.3pm
Manifying ../blib/man3/YAML::Dumper.3pm
make[1]: Leaving directory `/root/swatch/swatch-3.2.2/YAML-0.65'
cp swatch blib/script/swatch
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/swatch
Manifying blib/man1/swatch.1
Manifying blib/man3/Swatch::Threshold.3pm
Manifying blib/man3/Swatch::Throttle.3pm
Manifying blib/man3/Swatch::Actions.3pm
[root@mars swatch-3.2.2]# 
  • 問題なく終了.テストを行う.
[root@mars swatch-3.2.2]# make test
make[1]: Entering directory `/root/swatch/swatch-3.2.2/YAML-0.65'
make[1]: Leaving directory `/root/swatch/swatch-3.2.2/YAML-0.65'
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/01cpan_modules....ok                                                       
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.19 cusr +  0.01 csys =  0.20 CPU)
make[1]: Entering directory `/root/swatch/swatch-3.2.2/YAML-0.65'
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'inc', '../blib/lib', '../blib/arch')" t/*.t
t/2-scalars..........ok                                                      
t/basic-tests........ok                                                      
t/bugs-emailed.......ok                                                      
        3/25 skipped: various reasons
t/bugs-rt............ok                                                      
        10/41 skipped: various reasons
t/changes............ok                                                      
        1/1 skipped: various reasons
t/dump-basics........ok                                                      
t/dump-blessed.......ok                                                      
t/dump-code..........ok                                                      
t/dump-file..........ok                                                      
t/dump-nested........ok                                                      
t/dump-opts..........ok                                                      
t/dump-perl-types....ok                                                      
t/dump-stringify.....ok                                                      
t/dump-tests.........ok                                                      
t/dump-works.........ok                                                      
t/errors.............ok                                                      
t/export.............ok                                                      
t/freeze-thaw........ok                                                      
t/global-api.........ok                                                      
t/inbox..............ok                                                      
        3/3 skipped: various reasons
t/load-fails.........ok                                                      
t/load-passes........ok                                                      
t/load-slides........ok                                                      
t/load-spec..........ok                                                      
t/load-tests.........ok                                                      
t/load-works.........ok                                                      
t/marshall...........ok                                                      
t/meta-yml...........ok                                                      
t/node-info..........NOK 9/16                                                
#   Failed test 'Regular Expression'
#   at /root/swatch/swatch-3.2.2/YAML-0.65/inc/Test/Base.pm line 352.
#                   'undef;undef;0x94e55ec-S'
#     doesn't match '(?-xism:^undef;REGEXP;0x[0-9a-fA-F]+$)'
# Looks like you failed 1 test of 16.
t/node-info..........dubious                                                 
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 9
        Failed 1/16 tests, 93.75% okay
t/pugs-objects.......ok                                                      
t/references.........ok                                                      
t/regexp.............ok                                                      
t/svk................ok                                                      
t/test...............ok                                                      
Failed Test   Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/node-info.t    1   256    16    1  9
17 subtests skipped.
Failed 1/34 test scripts. 1/447 subtests failed.
Files=34, Tests=447, 25 wallclock secs (19.00 cusr +  1.29 csys = 20.29 CPU)
Failed 1/34 test programs. 1/447 subtests failed.
make[1]: *** [test_dynamic] Error 29
make[1]: Leaving directory `/root/swatch/swatch-3.2.2/YAML-0.65'
make: *** [subdirs-test] Error 2
[root@mars swatch-3.2.2]# 
  • YAML部分は,どうしてもえらになる模様.
  • ほっといて,インストールする.
[root@mars swatch-3.2.2]# make install
make[1]: Entering directory `/root/swatch/swatch-3.2.2/YAML-0.65'
make[1]: Leaving directory `/root/swatch/swatch-3.2.2/YAML-0.65'
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/swatch/.packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/perllocal.pod
[root@mars swatch-3.2.2]# 
[root@mars swatch-3.2.2]# 
  • ファイルコピーだけなので,問題なく完了.

6.監視の設定を行う

  • swatchでは,監視対象をファイルに定義する.
設定ファイルの文法
watchfor キーワード

 mail=アラート先メールアドレス,subject=サブジェクト
  • 設定ファイルは,デフォルトでは,~/.swatchrcとなるので,RedHatのrootユーザの場合は,次の様になる.
    • /root/.swatchrc
  • ここでは,サンプルとして任意のファイルに,設定を書いてみる.
[root@mars root]# cat swatchtest.txt 
watchfor ALERT
 mail=alert@ujp.jp,subject=ALERT_TEST
[root@mars root]# 
  • この定義では,ALERTというキーワードを見つけたら,alert@ユーザにメールを送るという設定となっている.

7.アラート送信テストの実施

  • swatchを起動させ,messagesファイルにログを書き出した上で,アラートメールが送信されるか確認する.
  • まず,swatchがインストールされている場所をカクンンする.
[root@mars root]# which swatch
/usr/bin/swatch
[root@mars root]# ls -la /usr/bin/swatch
-r-xr-xr-x    1 root     root        35927 Sep 12 17:38 /usr/bin/swatch
[root@mars root]# 
[root@mars root]# 
  • 先ほど作成した定義ファイル(swachtest.txt)を元にmessagesファイルを監視するようにswatchを実行する.
[root@mars root]# swatch -c swatchtest.txt -t /var/log/messages &
[1] 11018
[root@mars root]# 
*** swatch version 3.2.2 (pid:11019) started at Thu Sep 13 13:11:45 JST 2007


[root@mars root]# 
  • プロセスを確認する.
[root@mars root]# ps -ef | grep swatch
root 11018 6675 0 13:11 pts/1 00:00:00 /usr/bin/perl /usr/bin/swatch -c swatchtest.txt 
-t /var/log/messages
root 11019 11018 0 13:11 pts/1 00:00:00 /usr/bin/perl /root/.swatch_script.11018
root 11023 6675 0 13:14 pts/1 00:00:00 grep swatch
[root@mars root]#
  • loggerコマンドを使って,ログを書き出す.
[root@mars root]# /usr/bin/logger ALERT test
[root@mars root]#
  • messagesファイルを確認する.
[root@mars root]# tail /var/log/messages
Sep 12 18:02:51 mars su(pam_unix)[21805]: session closed for user root
Sep 12 18:02:52 mars sshd(pam_unix)[21698]: session closed for user watch_usr
Sep 12 18:09:05 mars sshd(pam_unix)[28360]: session opened for user watch_usr by (uid=0)
Sep 12 18:09:08 mars su(pam_unix)[28394]: session opened for user root by watch_usr(uid=502)
Sep 12 22:41:31 mars su(pam_unix)[28394]: session closed for user root
Sep 12 22:41:31 mars sshd(pam_unix)[28360]: session closed for user watch_usr
Sep 13 11:49:30 mars sshd(pam_unix)[6640]: session opened for user watch_usr by (uid=0)
Sep 13 11:49:34 mars su(pam_unix)[6674]: session opened for user root by watch_usr(uid=502)
Sep 13 13:16:31 mars XXXXXXXX: ALERT test
[root@mars root]# 
  • 指定したキーワードがsyslog経由でがmessagesファイルに書き出されている事が確認できた.
  • メールが届いているか,確認する.

  • 宛先とサブジェクトが正しい事が確認できた.

8.その他の定義設定例

8.1.複数定義の設定

  • 複数の定義を書くときには,次のように設定する.
複数定義の例
#WARNING
watchfor WARNING
   mail=alert@ujp.jp,subject=WARNING
   continue

#ERROR
watchfor ERROR
   mail=alert@ujp.jp,subject=ERROR
  • 複数条件を書くときには,1つの定義ファイルに複数書けば良い.

8.2.アクションの定義

  • 監視しているキーワードを見つけた後,どのような処理をするかは,アクションを定義すれば良い.
  • 代表的なアクションは次の通り.
アクション一覧
アクション 説明
mail  メールを出す.
continue  複数定義がされている場合,次の検出も行う.
quit  複数定義がされていても,そこで検査を終了し,その行の後に定義されているものは実行しない.
exec  指定したコマンドを実行する. 引数で$0〜$nを指定する事が可能で,メッセージの内容がセットされる.
  • この他にも,パイプでコマンドにデータを渡したり,大量に検出されたときに一定時間内ならアクションを起こさない為のthrottle等がある.

8.3.キーワードが複数になる場合

  • //によって複数ワードによるキーワード・マッチングも可能である.
複数キーワードの例
#Login attack Check
watchfor /2 more authentication failures/
   mail=alert@ujp.jp,subject=LoginError
   continue

8.4.その他のキーワード指定方法

  • 同じアクションを行うのであれば,条件設定にOR条件でキーワードを設定する事で対応できる.
複数キーワードをOR条件で指定する
watchfor /err|warn/
   mail=alert@ujp.jp,subject=ErrOrWarn
   continue
  • 条件設定には,正規表現を使う事も出来るので,
複数キーワードの例
watchfor /[Ee]rror/
   mail=alert@ujp.jp,subject=Error_or_error
   continue
  • この例では,Errorとerrorが一致する. 先頭の文字がEとeのどちらでも良いようにする.
複数キーワードの例
watchfor /error/i
   mail=alert@ujp.jp,subject=Error_or_error
   continue
  • /の後にiを付ける事で,大文字・小文字に関係なく評価される.
  • 特定のキーワードを除外したい場合は,ignoreを利用する.
除外する例
ignore /suzuki/
watchfor /tanaka|kimura/
   mail=alert@ujp.jp,subject=Error_or_error
   continue
  • この場合は,suzukiが入っている時点でパターン検査対象から外れる.

8.5 とりあえず設定

  • とりあえず,どのようなキーワードを登録したら良いか判らない場合には,エラーっぽいものを登録しておく.
除外する例
[root@mars root]# cat swatchtest.txt 
#Error Check
watchfor /fail|err|warn/i
   mail=alert@ujp.jp,subject=Syslog_Error
[root@mars root]# 
  • この定義によって,ほとんどのエラーを拾う事が出来るので,後は除外リストを定義する等で調整していく.

9.自動起動

  • /etc/rc.localに記述して,OS起動時に自動起動するように設定する.
変更前
[root@mars root]# cat /etc/rc.local 
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
[root@mars root]# 
変更後
[root@mars root]# cat /etc/rc.local 
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
swatch -c /root/swatchtest.txt -t /var/log/messages &
[root@mars root]# 

10.停止と手動起動

  • 手抜きですが一応.
停止の例
[root@mars root]# killall swatch
Caught a SIGTERM -- sending a TERM signal to 12325
Caught a SIGTERM -- sending a TERM signal to 12765
[root@mars root]# 
起動の例
[root@mars root]# /etc/rc.local 
[root@mars root]# 
*** swatch version 3.2.2 (pid:13072) started at Thu Sep 13 16:44:20 JST 2007


[root@mars root]# 
  • 再考の必要あり.(爆)

11.ログスイッチに対応させる

  • syslog(messages,secure等)に対応したファイルは,定期的にログスイッチが行われる.
  • Swatchでは,指定されたファイルの変更を検知しているが,ログスイッチが行われた事を検知できない.
  • よって,ログスイッチが発生したタイミングで,Swatchを再起動させるよう設定する.
  • まずは,syslog用のlogrotateモジュールを確認する.
[root@mars logrotate.d]# pwd
/etc/logrotate.d
[root@mars logrotate.d]# ls -la
total 88
drwxr-xr-x    2 root     root         4096 Oct 30 12:48 .
drwxr-xr-x   84 root     root         8192 Oct 29 23:18 ..
-rw-r--r--    1 root     root          834 Jun 14  2006 apache1
-rwxr-xr-x    1 root     root          161 Jul 18 20:18 cups
-rw-r--r--    1 root     mailman       403 Mar 21  2007 mailman
-rw-r--r--    1 root     root          571 Sep 20  2006 mgetty
-rw-r--r--    1 root     root          789 May 25  2006 mysql
-rw-r--r--    1 root     root          163 Jul 19 23:10 named
-rw-r--r--    1 root     root          317 Feb  1  2007 psacct
-rw-r-----    1 root     root          869 Nov 15  2003 quagga
-rw-r--r--    1 root     root         1106 Jun 16  2005 radiusd
-rw-r--r--    1 root     root           64 Apr 12  2007 redhat-config-network
-rw-r--r--    1 root     root           61 Mar  7  2007 rpm
-rw-r--r--    1 root     root          232 May 12 02:34 samba
-rw-r--r--    1 root     root           52 May  1 04:59 snmpd
-rw-r--r--    1 root     root          543 Jun 29 23:53 squid
-rw-r--r--    1 root     root          228 Jan 27  2005 syslog
-rw-r--r--    1 root     root           48 Jul  9  2004 tux
-rw-r--r--    1 root     root           32 Feb 23  2001 up2date
-rw-r--r--    1 root     root          544 Jan 25  2003 uucp
-rw-r--r--    1 root     root           95 Oct  4  2004 vsftpd.log
[root@mars logrotate.d]# 
  • syslogの中身を確認する.
[root@mars logrotate.d]# cat syslog 
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}
[root@mars logrotate.d]# 
  • このログローテーション定義の中で,Swatchを停止&起動させるスクリプトを埋め込む事で対応する.
  • 複数のSwatchを稼働させている場合も考えられるので,停止対象となるをSwatchプロセスを特定してみる.
  • 今回は,設定ファイルswatch.txtを試用しているSwatchプロセスを再起動させるので,プロセスリストから検索する.
[root@mars logrotate.d]# ps -ax|grep swatch.txt
 1648 pts/1    S      0:00 /usr/bin/perl /usr/bin/swatch -c /root/swatch.txt -t /var/log/secure
 1668 pts/1    S      0:00 grep swatch.txt
[root@mars logrotate.d]#
  • grepが含まれているので,これを除外して検索する.
[root@mars logrotate.d]# ps -ax|grep swatch.txt|grep -v grep
 1648 pts/1    S      0:00 /usr/bin/perl /usr/bin/swatch -c /root/swatch.txt -t /var/log/secure
[root@mars logrotate.d]#
  • このプロセスリストから,先頭行に表示されているプロセスIDだけ取り出す.
[root@mars logrotate.d]# ps -ax|grep swatch.txt|grep -v grep|awk '{print$1}'
1648
[root@mars logrotate.d]# 
  • これでOK.
  • 取り出したプロセスIDを元に,kill -HUPを送るように修正する.
変更前
[root@mars logrotate.d]# cat syslog 
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}
[root@mars logrotate.d]#
変更後
[root@mars logrotate.d]# cat syslog 
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        /bin/kill -HUP `ps -ax|grep swatch.txt|grep -v grep|awk '{print$1}' 2> /dev/null` 2
> /dev/null || true
    endscript
}
[root@mars logrotate.d]# 
  • 仮に実行してみる.
[root@mars logrotate.d]# /usr/sbin/logrotate /etc/logrotate.d/syslog -f
Caught a SIGHUP -- sending a TERM signal to 1835
[root@mars logrotate.d]# 
*** swatch version 3.2.2 (pid:1849) started at Tue Oct 30 14:37:06 JST 2007


[root@mars logrotate.d]# 
  • ログローテーションしたあとでswatchが再起動している事が解る
  • 以上.


広告スペース
Google