R.A. Epigonos et al.

[colinux] coLinuxの導入

この節ではcoLinuxの導入を行う。導入したマシンはwindows 2000の動いているLibretto L1で、VMware playerを動かすには非力なマシンである。VMware playerはハードウェアエミュレーションであるために、PC-AT互換機上で動くOSなら何でも動くが、結構重量級。どうにかして、Linuxを導入するために色々とやってきたが、ここにきてかなりクールなソリューションに行き着いた気がする。coLinuxはかなり前から人気が出てきているandLinuxの基盤技術を提供しているものらしい。andLinuxはcoLinux+Ubuntuだが、ここでは、coLinux+Debianにする。

目次

[HW] 手持ちのハードウェアリスト

最新のドライバとかをインストールしておくために必要なリンクリスト

UnixBench の入手

# apt-get install perl make gcc
(snip)
# wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
(snip)
# tar zxf UnixBench5.1.3.tgz
# cd UnixBench
# ./Run
(snip)

googlecode終了に伴う更新。ダウンロードするために ca-certificates、ビルドと実行のために perl make gcc が必要。

# apt-get --no-install-recommends install ca-certificates perl make gcc
(snip)
$ wget 'https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz'
(snip)
$ tar zxf v5.1.3.tar.gz
$ cd byte-unixbench-5.1.3/UnixBench/
$ ./Run
(snip)

最新版を試したいなら。

$ mktemp --tmpdir --directory unixbench.XXXX
/tmp/unixbench.wlKc
$ cd /tmp/unixbench.wlKc
$ wget 'https://github.com/kdlucas/byte-unixbench/archive/master.tar.gz'
(snip)
$ tar zxf master.tar.gz
$ cd byte-unixbench-master/UnixBench/
$ ./Run
(snip)

./Run 中に gcc などが走って必要な実行ファイルが作られる。"sh: 1: 3dinfo: not found" が出るけどひとまず気にしない。

TOSHIBA Libretto L1/060TNMM

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: ******: GNU/Linux
   OS: GNU/Linux -- 3.2.0-4-486 -- #1 Debian 3.2.51-1
   Machine: i586 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   CPU 0: Transmeta(tm) Crusoe(tm) Processor TM5600 (1195.3 bogomips)
          MMX, SYSENTER/SYSEXIT
   09:45:55 up 9 min,  1 user,  load average: 1.01, 0.63, 0.32; runlevel 2

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        1042196.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                      212.3 MWIPS (10.9 s, 7 samples)
Execl Throughput                                320.5 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks         59932.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           20691.4 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        106574.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                              123036.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  23099.5 lps   (10.0 s, 7 samples)
Process Creation                               1178.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                    537.9 lpm   (60.1 s, 2 samples)
Shell Scripts (8 concurrent)                     67.4 lpm   (60.6 s, 2 samples)
System Call Overhead                         226280.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    1042196.7     89.3
Double-Precision Whetstone                       55.0        212.3     38.6
Execl Throughput                                 43.0        320.5     74.5
File Copy 1024 bufsize 2000 maxblocks          3960.0      59932.9    151.3
File Copy 256 bufsize 500 maxblocks            1655.0      20691.4    125.0
File Copy 4096 bufsize 8000 maxblocks          5800.0     106574.0    183.7
Pipe Throughput                               12440.0     123036.0     98.9
Pipe-based Context Switching                   4000.0      23099.5     57.7
Process Creation                                126.0       1178.2     93.5
Shell Scripts (1 concurrent)                     42.4        537.9    126.9
Shell Scripts (8 concurrent)                      6.0         67.4    112.3
System Call Overhead                          15000.0     226280.0    150.9
                                                                   ========
System Benchmarks Index Score                                         100.2

Windows XP Pro SP3、MSE無しの状態で2.9GB消費

FMV-640NU5C/W

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: ******: GNU/Linux
   OS: GNU/Linux -- 3.2.0-4-686-pae -- #1 SMP Debian 3.2.51-1
   Machine: i686 (unknown)
   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
   CPU 0: Celeron (Mendocino) (796.3 bogomips)
          MMX, Physical Address Ext, SYSENTER/SYSEXIT
   13:44:02 up  2:02,  2 users,  load average: 0.00, 0.04, 0.48; runlevel 2

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        1366200.2 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                      414.7 MWIPS (10.1 s, 7 samples)
Execl Throughput                                301.3 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks         46747.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           18989.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks          3394.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                              147744.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  22025.7 lps   (10.0 s, 7 samples)
Process Creation                                716.3 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                    546.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                     69.2 lpm   (60.7 s, 2 samples)
System Call Overhead                         345643.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    1366200.2    117.1
Double-Precision Whetstone                       55.0        414.7     75.4
Execl Throughput                                 43.0        301.3     70.1
File Copy 1024 bufsize 2000 maxblocks          3960.0      46747.5    118.0
File Copy 256 bufsize 500 maxblocks            1655.0      18989.0    114.7
File Copy 4096 bufsize 8000 maxblocks          5800.0       3394.5      5.9
Pipe Throughput                               12440.0     147744.5    118.8
Pipe-based Context Switching                   4000.0      22025.7     55.1
Process Creation                                126.0        716.3     56.8
Shell Scripts (1 concurrent)                     42.4        546.7    128.9
Shell Scripts (8 concurrent)                      6.0         69.2    115.4
System Call Overhead                          15000.0     345643.8    230.4
                                                                   ========
System Benchmarks Index Score                                          79.4

   BYTE UNIX Benchmarks (Version 5.1.2)

   System: ***************: GNU/Linux
   OS: GNU/Linux -- 2.6.24-wks-smp-alt2.4 -- #1 SMP PREEMPT Wed May 21 01:22:44 MSD 2008
   Machine: i686 (unknown)
   CPU 0: Celeron (Mendocino) (795.2 bogomips)
          MMX, Physical Address Ext, SYSENTER/SYSEXIT
   15:46:11 up  1:53,  2 users,  load average: 0.99, 0.26, 0.41; runlevel 3

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables         497941.0 lps   (11.0 s, 7 samples)
Double-Precision Whetstone                      235.1 MWIPS (10.0 s, 7 samples)
Execl Throughput                                257.6 lps   (30.6 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks         39761.3 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           17855.2 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks         54957.8 KBps  (30.0 s, 2 samples)
Pipe Throughput                               82258.1 lps   (11.0 s, 7 samples)
Pipe-based Context Switching                  22627.6 lps   (11.0 s, 7 samples)
Process Creation                                716.6 lps   (31.0 s, 2 samples)
Shell Scripts (1 concurrent)                    450.3 lpm   (61.2 s, 2 samples)
Shell Scripts (8 concurrent)                     60.6 lpm   (61.3 s, 2 samples)
System Call Overhead                         154987.4 lps   (11.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0     497941.0     42.7
Double-Precision Whetstone                       55.0        235.1     42.7
Execl Throughput                                 43.0        257.6     59.9
File Copy 1024 bufsize 2000 maxblocks          3960.0      39761.3    100.4
File Copy 256 bufsize 500 maxblocks            1655.0      17855.2    107.9
File Copy 4096 bufsize 8000 maxblocks          5800.0      54957.8     94.8
Pipe Throughput                               12440.0      82258.1     66.1
Pipe-based Context Switching                   4000.0      22627.6     56.6
Process Creation                                126.0        716.6     56.9
Shell Scripts (1 concurrent)                     42.4        450.3    106.2
Shell Scripts (8 concurrent)                      6.0         60.6    101.1
System Call Overhead                          15000.0     154987.4    103.3
                                                                   ========
System Benchmarks Index Score                                          73.9

Supermicro P3TDDE

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: ******: GNU/Linux
   OS: GNU/Linux -- 3.2.0-4-686-pae -- #1 SMP Debian 3.2.51-1
   Machine: i686 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Celeron(TM) CPU 1400MHz (2806.1 bogomips)
          MMX, Physical Address Ext, SYSENTER/SYSEXIT
   16:14:13 up 19 days, 22:14,  5 users,  load average: 0.98, 0.62, 0.54; runlevel

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        4844832.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1460.9 MWIPS (10.2 s, 7 samples)
Execl Throughput                                847.2 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks         85764.5 KBps  (30.1 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           39464.0 KBps  (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        108906.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                              527809.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  82080.0 lps   (10.0 s, 7 samples)
Process Creation                               3072.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   1386.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    173.4 lpm   (60.2 s, 2 samples)
System Call Overhead                        1173471.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    4844832.7    415.2
Double-Precision Whetstone                       55.0       1460.9    265.6
Execl Throughput                                 43.0        847.2    197.0
File Copy 1024 bufsize 2000 maxblocks          3960.0      85764.5    216.6
File Copy 256 bufsize 500 maxblocks            1655.0      39464.0    238.5
File Copy 4096 bufsize 8000 maxblocks          5800.0     108906.3    187.8
Pipe Throughput                               12440.0     527809.4    424.3
Pipe-based Context Switching                   4000.0      82080.0    205.2
Process Creation                                126.0       3072.1    243.8
Shell Scripts (1 concurrent)                     42.4       1386.4    327.0
Shell Scripts (8 concurrent)                      6.0        173.4    289.1
System Call Overhead                          15000.0    1173471.7    782.3
                                                                   ========
System Benchmarks Index Score                                         288.4

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: ******: GNU/Linux
   OS: GNU/Linux -- 3.2.0-4-686-pae -- #1 SMP Debian 3.2.51-1
   Machine: i686 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Celeron(TM) CPU 1400MHz (2806.1 bogomips)
          MMX, Physical Address Ext, SYSENTER/SYSEXIT
   16:14:13 up 19 days, 22:14,  5 users,  load average: 0.98, 0.62, 0.54; runlevel

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables        4844832.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1460.9 MWIPS (10.2 s, 7 samples)
Execl Throughput                                847.2 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks         85764.5 KBps  (30.1 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           39464.0 KBps  (30.1 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        108906.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                              527809.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  82080.0 lps   (10.0 s, 7 samples)
Process Creation                               3072.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   1386.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    173.4 lpm   (60.2 s, 2 samples)
System Call Overhead                        1173471.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0    4844832.7    415.2
Double-Precision Whetstone                       55.0       1460.9    265.6
Execl Throughput                                 43.0        847.2    197.0
File Copy 1024 bufsize 2000 maxblocks          3960.0      85764.5    216.6
File Copy 256 bufsize 500 maxblocks            1655.0      39464.0    238.5
File Copy 4096 bufsize 8000 maxblocks          5800.0     108906.3    187.8
Pipe Throughput                               12440.0     527809.4    424.3
Pipe-based Context Switching                   4000.0      82080.0    205.2
Process Creation                                126.0       3072.1    243.8
Shell Scripts (1 concurrent)                     42.4       1386.4    327.0
Shell Scripts (8 concurrent)                      6.0        173.4    289.1
System Call Overhead                          15000.0    1173471.7    782.3
                                                                   ========
System Benchmarks Index Score                                         288.4

sakura VPS 1G

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: *********: GNU/Linux
   OS: GNU/Linux -- 3.2.0-4-amd64 -- #1 SMP Debian 3.2.51-1
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5645 (4800.2 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
   CPU 1: Intel(R) Xeon(R) CPU E5645 (4800.2 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
   16:16:42 up 67 days,  6:48,  4 users,  load average: 0.19, 0.06, 0.06; runlevel

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       14535514.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1909.4 MWIPS (10.1 s, 7 samples)
Execl Throughput                               1127.8 lps   (29.8 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        341188.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           81831.8 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        667545.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                              916400.3 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  11109.4 lps   (10.0 s, 7 samples)
Process Creation                               2424.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2554.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    618.0 lpm   (60.0 s, 2 samples)
System Call Overhead                        1816260.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   14535514.6   1245.5
Double-Precision Whetstone                       55.0       1909.4    347.2
Execl Throughput                                 43.0       1127.8    262.3
File Copy 1024 bufsize 2000 maxblocks          3960.0     341188.4    861.6
File Copy 256 bufsize 500 maxblocks            1655.0      81831.8    494.5
File Copy 4096 bufsize 8000 maxblocks          5800.0     667545.1   1150.9
Pipe Throughput                               12440.0     916400.3    736.7
Pipe-based Context Switching                   4000.0      11109.4     27.8
Process Creation                                126.0       2424.8    192.4
Shell Scripts (1 concurrent)                     42.4       2554.4    602.5
Shell Scripts (8 concurrent)                      6.0        618.0   1029.9
System Call Overhead                          15000.0    1816260.7   1210.8
                                                                   ========
System Benchmarks Index Score                                         483.8

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       25844652.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3889.8 MWIPS (9.8 s, 7 samples)
Execl Throughput                               2798.9 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        337742.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           96141.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        844862.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1644507.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 248661.9 lps   (10.0 s, 7 samples)
Process Creation                               7621.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4723.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    682.0 lpm   (60.1 s, 2 samples)
System Call Overhead                        3089657.6 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   25844652.3   2214.6
Double-Precision Whetstone                       55.0       3889.8    707.2
Execl Throughput                                 43.0       2798.9    650.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     337742.5    852.9
File Copy 256 bufsize 500 maxblocks            1655.0      96141.9    580.9
File Copy 4096 bufsize 8000 maxblocks          5800.0     844862.0   1456.7
Pipe Throughput                               12440.0    1644507.9   1322.0
Pipe-based Context Switching                   4000.0     248661.9    621.7
Process Creation                                126.0       7621.8    604.9
Shell Scripts (1 concurrent)                     42.4       4723.7   1114.1
Shell Scripts (8 concurrent)                      6.0        682.0   1136.7
System Call Overhead                          15000.0    3089657.6   2059.8
                                                                   ========
System Benchmarks Index Score                                         996.1

BUFFALO LUA2-TX

Toshiba PACDR002

Live CDなど起動しない場合はカーネルブートパラメータで以下のものをトライ

ide2=0x1a0,0x3a6
ide2=0x1a0,0x3a0

lenovo ThinkPad T61p

必要なもののインストール。

# apt-get \
	--no-install-recommends \
	install \
	ca-certificates \
	perl \
	make \
	gcc \
	libc6-dev \
;

適当な一時ディレクトリの下に UnixBench を展開して、実行。

$ mktemp --tmpdir --directory unixbench.XXXX
/tmp/unixbench.0S0W
$ cd /tmp/unixbench.0S0W
$ wget --output-document v5.1.3.tar.gz https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz
--XXXX-XX-XX XX:XX:XX--  https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz
Resolving github.com (github.com)... 192.30.255.113, 192.30.255.112
Connecting to github.com (github.com)|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/kdlucas/byte-unixbench/tar.gz/v5.1.3 [following]
--XXXX-XX-XX XX:XX:XX--  https://codeload.github.com/kdlucas/byte-unixbench/tar.gz/v5.1.3
Resolving codeload.github.com (codeload.github.com)... 192.30.255.120, 192.30.255.121
Connecting to codeload.github.com (codeload.github.com)|192.30.255.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v5.1.3.tar.gz’

v5.1.3.tar.gz [<=>                        ] 142.49K   298KB/s    in 0.5s

XXXX-XX-XX XX:XX:XX (298 KB/s) - ‘v5.1.3.tar.gz’ saved [145908]

$ tar zxf v5.1.3.tar.gz
$ cd byte-unixbench-5.1.3/UnixBench/
$ export PATH=${PATH}:/sbin
$ ./Run
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/hanoi.c
gcc -o ./pgms/syscall -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/syscall.c
./src/syscall.c: In function ‘main’:
./src/syscall.c:93:21: warning: null argument where non-null required (argument 2) [-Wnonnull]
                     execl("/bin/true", (char *) 0);
                     ^~~~~
gcc -o ./pgms/context1 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/context1.c
gcc -o ./pgms/pipe -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/pipe.c
gcc -o ./pgms/spawn -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/spawn.c
gcc -o ./pgms/execl -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/execl.c
In file included from ./src/execl.c:34:0:
./src/big.c: In function ‘getwork’:
./src/big.c:452:11: warning: variable ‘c’ set but not used [-Wunused-but-set-variable]
     char  c;
           ^
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c
gcc -o ./pgms/dhry2 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1.o ./src/dhry_2.o
cd ./src; rm -f dhry_1.o dhry_2.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_1.c -o dhry_1_reg.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall dhry_2.c -o dhry_2_reg.o
gcc -o ./pgms/dhry2reg -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/dhry_1_reg.o ./src/dhry_2_reg.o
cd ./src; rm -f dhry_1_reg.o dhry_2_reg.o
gcc -o ./pgms/looper -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/looper.c
gcc -o ./pgms/fstime -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall ./src/fstime.c
gcc -o ./pgms/whetstone-double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall -DDP -DUNIX -DUNIXBENCH ./src/whets.c -lm
make all
make[1]: Entering directory '/tmp/unixbench.0S0W/byte-unixbench-5.1.3/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
make[1]: Leaving directory '/tmp/unixbench.0S0W/byte-unixbench-5.1.3/UnixBench'
sh: 1: 3dinfo: not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

2 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

2 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

2 x Execl Throughput  1 2 3

2 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

2 x File Copy 256 bufsize 500 maxblocks  1 2 3

2 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

2 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

2 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

2 x Process Creation  1 2 3

2 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

2 x Shell Scripts (1 concurrent)  1 2 3

2 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: XXXXXXXXXXXXXXXXXXXXX: GNU/Linux
   OS: GNU/Linux -- 4.9.0-8-amd64 -- #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (4788.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (4788.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   06:54:05 up  1:15,  3 users,  load average: 0.09, 1.42, 2.35; runlevel 5

------------------------------------------------------------------------
Benchmark Run: XXX XXX XX XXXX 06:54:05 - 07:22:43
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       13413635.2 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                      831.2 MWIPS (10.0 s, 7 samples)
Execl Throughput                               1020.3 lps   (29.7 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        222674.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           33264.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        428900.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                              186262.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  18443.1 lps   (10.0 s, 7 samples)
Process Creation                               2210.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2733.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    510.7 lpm   (60.0 s, 2 samples)
System Call Overhead                         222015.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   13413635.2   1149.4
Double-Precision Whetstone                       55.0        831.2    151.1
Execl Throughput                                 43.0       1020.3    237.3
File Copy 1024 bufsize 2000 maxblocks          3960.0     222674.2    562.3
File Copy 256 bufsize 500 maxblocks            1655.0      33264.9    201.0
File Copy 4096 bufsize 8000 maxblocks          5800.0     428900.3    739.5
Pipe Throughput                               12440.0     186262.6    149.7
Pipe-based Context Switching                   4000.0      18443.1     46.1
Process Creation                                126.0       2210.7    175.5
Shell Scripts (1 concurrent)                     42.4       2733.8    644.8
Shell Scripts (8 concurrent)                      6.0        510.7    851.1
System Call Overhead                          15000.0     222015.0    148.0
                                                                   ========
System Benchmarks Index Score                                         289.0

------------------------------------------------------------------------
Benchmark Run: XXX XXX XX XXXX 07:22:43 - 07:51:20
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       15001622.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     1662.4 MWIPS (10.0 s, 7 samples)
Execl Throughput                               2110.4 lps   (29.5 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        233011.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           63020.6 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        550426.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                              368070.3 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 140374.3 lps   (10.0 s, 7 samples)
Process Creation                               4934.3 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   3988.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    507.6 lpm   (60.0 s, 2 samples)
System Call Overhead                         259423.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   15001622.3   1285.5
Double-Precision Whetstone                       55.0       1662.4    302.2
Execl Throughput                                 43.0       2110.4    490.8
File Copy 1024 bufsize 2000 maxblocks          3960.0     233011.5    588.4
File Copy 256 bufsize 500 maxblocks            1655.0      63020.6    380.8
File Copy 4096 bufsize 8000 maxblocks          5800.0     550426.3    949.0
Pipe Throughput                               12440.0     368070.3    295.9
Pipe-based Context Switching                   4000.0     140374.3    350.9
Process Creation                                126.0       4934.3    391.6
Shell Scripts (1 concurrent)                     42.4       3988.4    940.7
Shell Scripts (8 concurrent)                      6.0        507.6    846.0
System Call Overhead                          15000.0     259423.5    172.9
                                                                   ========
System Benchmarks Index Score                                         497.0

HP ProLiant MicroServer N54L

運用に近い状態下でテスト。

# ./Run
(snip)
========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: **********: GNU/Linux
   OS: GNU/Linux -- 3.16.0-4-amd64 -- #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.8 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   CPU 1: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.8 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   15:50:01 up 6 min,  1 user,  load average: 0.10, 0.30, 0.20; runlevel 5

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       19433549.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2408.3 MWIPS (9.7 s, 7 samples)
Execl Throughput                               1393.3 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        512656.0 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          190946.7 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        970717.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1335295.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  77689.7 lps   (10.0 s, 7 samples)
Process Creation                               2516.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4268.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1155.4 lpm   (60.0 s, 2 samples)
System Call Overhead                        2584865.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   19433549.1   1665.3
Double-Precision Whetstone                       55.0       2408.3    437.9
Execl Throughput                                 43.0       1393.3    324.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     512656.0   1294.6
File Copy 256 bufsize 500 maxblocks            1655.0     190946.7   1153.8
File Copy 4096 bufsize 8000 maxblocks          5800.0     970717.0   1673.6
Pipe Throughput                               12440.0    1335295.9   1073.4
Pipe-based Context Switching                   4000.0      77689.7    194.2
Process Creation                                126.0       2516.6    199.7
Shell Scripts (1 concurrent)                     42.4       4268.4   1006.7
Shell Scripts (8 concurrent)                      6.0       1155.4   1925.6
System Call Overhead                          15000.0    2584865.5   1723.2
                                                                   ========
System Benchmarks Index Score                                         812.0

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       38876948.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4811.7 MWIPS (9.7 s, 7 samples)
Execl Throughput                               7626.8 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        612487.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          199964.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1133225.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2660343.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 522262.2 lps   (10.0 s, 7 samples)
Process Creation                              17304.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8518.6 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1198.5 lpm   (60.1 s, 2 samples)
System Call Overhead                        3174739.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   38876948.3   3331.4
Double-Precision Whetstone                       55.0       4811.7    874.9
Execl Throughput                                 43.0       7626.8   1773.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     612487.7   1546.7
File Copy 256 bufsize 500 maxblocks            1655.0     199964.5   1208.2
File Copy 4096 bufsize 8000 maxblocks          5800.0    1133225.9   1953.8
Pipe Throughput                               12440.0    2660343.5   2138.5
Pipe-based Context Switching                   4000.0     522262.2   1305.7
Process Creation                                126.0      17304.7   1373.4
Shell Scripts (1 concurrent)                     42.4       8518.6   2009.1
Shell Scripts (8 concurrent)                      6.0       1198.5   1997.5
System Call Overhead                          15000.0    3174739.9   2116.5
                                                                   ========
System Benchmarks Index Score                                        1707.6

インストール直後の状態でテスト

# ./Run
(snip)
========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: **********: GNU/Linux
   OS: GNU/Linux -- 3.16.0-4-amd64 -- #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.8 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   CPU 1: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.8 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   17:36:31 up 4 min,  1 user,  load average: 0.74, 0.52, 0.22; runlevel

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       19447527.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2408.1 MWIPS (9.8 s, 7 samples)
Execl Throughput                               1369.9 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        500208.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          190671.4 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        968138.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1332165.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  78454.9 lps   (10.0 s, 7 samples)
Process Creation                               2467.5 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4216.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1139.2 lpm   (60.0 s, 2 samples)
System Call Overhead                        2578620.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   19447527.5   1666.5
Double-Precision Whetstone                       55.0       2408.1    437.8
Execl Throughput                                 43.0       1369.9    318.6
File Copy 1024 bufsize 2000 maxblocks          3960.0     500208.5   1263.2
File Copy 256 bufsize 500 maxblocks            1655.0     190671.4   1152.1
File Copy 4096 bufsize 8000 maxblocks          5800.0     968138.5   1669.2
Pipe Throughput                               12440.0    1332165.4   1070.9
Pipe-based Context Switching                   4000.0      78454.9    196.1
Process Creation                                126.0       2467.5    195.8
Shell Scripts (1 concurrent)                     42.4       4216.7    994.5
Shell Scripts (8 concurrent)                      6.0       1139.2   1898.6
System Call Overhead                          15000.0    2578620.0   1719.1
                                                                   ========
System Benchmarks Index Score                                         806.2

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       38519394.9 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4807.2 MWIPS (9.7 s, 7 samples)
Execl Throughput                               7468.8 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        607535.0 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          193637.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1113877.6 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2655491.1 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 521658.9 lps   (10.0 s, 7 samples)
Process Creation                              16678.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8442.1 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1178.0 lpm   (60.1 s, 2 samples)
System Call Overhead                        3155348.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   38519394.9   3300.7
Double-Precision Whetstone                       55.0       4807.2    874.0
Execl Throughput                                 43.0       7468.8   1736.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     607535.0   1534.2
File Copy 256 bufsize 500 maxblocks            1655.0     193637.3   1170.0
File Copy 4096 bufsize 8000 maxblocks          5800.0    1113877.6   1920.5
Pipe Throughput                               12440.0    2655491.1   2134.6
Pipe-based Context Switching                   4000.0     521658.9   1304.1
Process Creation                                126.0      16678.6   1323.7
Shell Scripts (1 concurrent)                     42.4       8442.1   1991.1
Shell Scripts (8 concurrent)                      6.0       1178.0   1963.3
System Call Overhead                          15000.0    3155348.0   2103.6
                                                                   ========
System Benchmarks Index Score                                        1684.9

インストール直後の状態で最新版を使ってテスト。

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: **********: GNU/Linux
   OS: GNU/Linux -- 3.16.0-4-amd64 -- #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.8 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   CPU 1: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.8 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   18:37:43 up  1:05,  1 user,  load average: 0.14, 2.48, 2.74; runlevel 2016-06-25

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       20644708.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2475.4 MWIPS (9.8 s, 7 samples)
Execl Throughput                               1370.3 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        506613.1 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          192547.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        969878.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1335365.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  78155.5 lps   (10.0 s, 7 samples)
Process Creation                               2449.4 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4209.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1139.0 lpm   (60.0 s, 2 samples)
System Call Overhead                        2591292.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   20644708.3   1769.0
Double-Precision Whetstone                       55.0       2475.4    450.1
Execl Throughput                                 43.0       1370.3    318.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     506613.1   1279.3
File Copy 256 bufsize 500 maxblocks            1655.0     192547.5   1163.4
File Copy 4096 bufsize 8000 maxblocks          5800.0     969878.0   1672.2
Pipe Throughput                               12440.0    1335365.4   1073.4
Pipe-based Context Switching                   4000.0      78155.5    195.4
Process Creation                                126.0       2449.4    194.4
Shell Scripts (1 concurrent)                     42.4       4209.3    992.8
Shell Scripts (8 concurrent)                      6.0       1139.0   1898.4
System Call Overhead                          15000.0    2591292.4   1727.5
                                                                   ========
System Benchmarks Index Score                                         813.4

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       40022643.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4948.5 MWIPS (9.8 s, 7 samples)
Execl Throughput                               7424.8 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        595655.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          196878.9 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1116684.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2663546.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 519751.8 lps   (10.0 s, 7 samples)
Process Creation                              17425.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8452.1 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1178.3 lpm   (60.1 s, 2 samples)
System Call Overhead                        3134285.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   40022643.3   3429.5
Double-Precision Whetstone                       55.0       4948.5    899.7
Execl Throughput                                 43.0       7424.8   1726.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     595655.6   1504.2
File Copy 256 bufsize 500 maxblocks            1655.0     196878.9   1189.6
File Copy 4096 bufsize 8000 maxblocks          5800.0    1116684.5   1925.3
Pipe Throughput                               12440.0    2663546.5   2141.1
Pipe-based Context Switching                   4000.0     519751.8   1299.4
Process Creation                                126.0      17425.9   1383.0
Shell Scripts (1 concurrent)                     42.4       8452.1   1993.4
Shell Scripts (8 concurrent)                      6.0       1178.3   1963.9
System Call Overhead                          15000.0    3134285.9   2089.5
                                                                   ========
System Benchmarks Index Score                                        1698.8

dmesgの出すエラーを解決したあとのテスト。大きく変わらない。

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: **********: GNU/Linux
   OS: GNU/Linux -- 3.16.0-4-amd64 -- #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.6 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   CPU 1: AMD Turion(tm) II Neo N54L Dual-Core Processor (4392.6 bogomips)
          Hyper-Threading, x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, AMD virtualization, SYSCALL/SYSRET
   19:44:51 up 1 min,  1 user,  load average: 0.17, 0.09, 0.04; runlevel 2016-06-25

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       20573218.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2474.0 MWIPS (9.8 s, 7 samples)
Execl Throughput                               1345.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        489756.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          191180.7 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        973191.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1334719.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  78610.2 lps   (10.0 s, 7 samples)
Process Creation                               2503.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4263.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1149.8 lpm   (60.0 s, 2 samples)
System Call Overhead                        2586311.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   20573218.6   1762.9
Double-Precision Whetstone                       55.0       2474.0    449.8
Execl Throughput                                 43.0       1345.4    312.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     489756.4   1236.8
File Copy 256 bufsize 500 maxblocks            1655.0     191180.7   1155.2
File Copy 4096 bufsize 8000 maxblocks          5800.0     973191.9   1677.9
Pipe Throughput                               12440.0    1334719.9   1072.9
Pipe-based Context Switching                   4000.0      78610.2    196.5
Process Creation                                126.0       2503.8    198.7
Shell Scripts (1 concurrent)                     42.4       4263.3   1005.5
Shell Scripts (8 concurrent)                      6.0       1149.8   1916.3
System Call Overhead                          15000.0    2586311.0   1724.2
                                                                   ========
System Benchmarks Index Score                                         812.5

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** **:**:** - **:**:**
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       39981900.9 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4949.2 MWIPS (9.8 s, 7 samples)
Execl Throughput                               7340.9 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        610163.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          198558.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1132809.7 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2653008.8 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 518518.1 lps   (10.0 s, 7 samples)
Process Creation                              16579.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8510.2 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1187.2 lpm   (60.0 s, 2 samples)
System Call Overhead                        3111744.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   39981900.9   3426.0
Double-Precision Whetstone                       55.0       4949.2    899.9
Execl Throughput                                 43.0       7340.9   1707.2
File Copy 1024 bufsize 2000 maxblocks          3960.0     610163.5   1540.8
File Copy 256 bufsize 500 maxblocks            1655.0     198558.5   1199.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    1132809.7   1953.1
Pipe Throughput                               12440.0    2653008.8   2132.6
Pipe-based Context Switching                   4000.0     518518.1   1296.3
Process Creation                                126.0      16579.9   1315.9
Shell Scripts (1 concurrent)                     42.4       8510.2   2007.1
Shell Scripts (8 concurrent)                      6.0       1187.2   1978.7
System Call Overhead                          15000.0    3111744.7   2074.5
                                                                   ========
System Benchmarks Index Score                                        1696.8

ThinkPad T470

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: ****************: GNU/Linux
   OS: GNU/Linux -- 4.19.0-8-amd64 -- #1 SMP Debian 4.19.98-1 (2020-01-26)
   Machine: x86_64 (unknown)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (5424.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (5424.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 2: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (5424.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 3: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (5424.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   08:24:26 up 0 min,  2 users,  load average: 0.19, 0.06, 0.02; runlevel 5

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** 08:24:26 - 08:52:19
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       45150301.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     6999.8 MWIPS (9.0 s, 7 samples)
Execl Throughput                               5335.7 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        681593.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          187239.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2087213.8 KBps  (30.0 s, 2 samples)
Pipe Throughput                              940355.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 226889.9 lps   (10.0 s, 7 samples)
Process Creation                              13096.4 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  12890.5 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   3080.1 lpm   (60.0 s, 2 samples)
System Call Overhead                         565197.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   45150301.6   3868.9
Double-Precision Whetstone                       55.0       6999.8   1272.7
Execl Throughput                                 43.0       5335.7   1240.9
File Copy 1024 bufsize 2000 maxblocks          3960.0     681593.9   1721.2
File Copy 256 bufsize 500 maxblocks            1655.0     187239.0   1131.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    2087213.8   3598.6
Pipe Throughput                               12440.0     940355.9    755.9
Pipe-based Context Switching                   4000.0     226889.9    567.2
Process Creation                                126.0      13096.4   1039.4
Shell Scripts (1 concurrent)                     42.4      12890.5   3040.2
Shell Scripts (8 concurrent)                      6.0       3080.1   5133.5
System Call Overhead                          15000.0     565197.4    376.8
                                                                   ========
System Benchmarks Index Score                                        1482.0

------------------------------------------------------------------------
Benchmark Run: *** *** ** **** 08:52:19 - 09:20:14
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables      120324765.4 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    25059.3 MWIPS (9.1 s, 7 samples)
Execl Throughput                              14273.0 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1217778.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          328633.2 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3917052.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2500268.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 686106.0 lps   (10.0 s, 7 samples)
Process Creation                              32954.4 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  24281.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   3427.0 lpm   (60.0 s, 2 samples)
System Call Overhead                        1453213.3 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  120324765.4  10310.6
Double-Precision Whetstone                       55.0      25059.3   4556.2
Execl Throughput                                 43.0      14273.0   3319.3
File Copy 1024 bufsize 2000 maxblocks          3960.0    1217778.9   3075.2
File Copy 256 bufsize 500 maxblocks            1655.0     328633.2   1985.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    3917052.0   6753.5
Pipe Throughput                               12440.0    2500268.6   2009.9
Pipe-based Context Switching                   4000.0     686106.0   1715.3
Process Creation                                126.0      32954.4   2615.4
Shell Scripts (1 concurrent)                     42.4      24281.8   5726.8
Shell Scripts (8 concurrent)                      6.0       3427.0   5711.7
System Call Overhead                          15000.0    1453213.3    968.8
                                                                   ========
System Benchmarks Index Score                                        3326.7

VMware vs cygwin vs coLinux

導入の目的としては、「とにかく非力なコンピュータ上でどうやってLinux用に書かれたプログラムを走らせるか」である。ハードとの距離でいえば、もちろん直にインストールするのが最短だと思うが、windows上で動くアプリケーションと同時にlinux上で動くプログラムを使わねばならないという要請があった場合にどうするか。その場合は、VMware player, cygwin, coLinuxの3つの方法があると思うのだけれど、それぞれに欠点と利点がある。アプリケーションのスピードという観点からすれば、VMware playerはハードウェアエミュレーションであるために(実際のマシン - windows - windows API - windows仮想マシンアプリケーション - Linux - アプリケーション)最も効率が悪い、cygwinはwindows APIエミュレーションであるために(実際のマシン - windows - windows API - cygwin.sys - cygwinアプリケーション)2番目に効率が悪い。coLinuxはカーネルエミュレーションであるために(実際のマシン - windows - colinux - linuxアプリケーション)なので最も効率がよい。括弧のなかは嘘。このあたりはCoLinuxインストール導入編 - Silicon Linux Wikiに詳しい。

  1. Tips - Debian GNU/Linux スレッドテンプレ
  2. D.3. Unix/Linux システムからの Debian GNU/Linux のインストール

etch CDからのセットアップ

今回は1からセットアップする。つまり、coLinux本家から提供されているイメージファイルを使わない。必要なもを下に上げる。

  1. windows 2000の動いているマシン
  2. coLinux本体
  3. debian netinstaller
  4. debian netinstaller に含まれるinitrd.gz
  5. qemu

手順的には、colinuxのセットアップ、qemuでディスクイメージの作成、coLinux上にdebianをインストールのための設定ファイルの作成、debianのインストーラを起動、インストーラからAlt+F2で仮想コンソールを移動、移動先の仮想コンソールからログインしてインストーラが作った*nix上でdebianをクロスインストール(debootstrap)、システムの設定、である。気づかねばならない重要な視点は、debian netinstallerはdebianをインストールするためのかませ犬でしかないことに気づくこと。このことに対する重要な示唆がD.3. Unix/Linux システムからの Debian GNU/Linux のインストールcoLinuxでDebian etchを使うを比べてみるとよくわかる。

つまり、あえてdebian installerを使わずとも、クロスインストール出来るようなLinux環境があればよいということだ。つまり、クロスインストールするのに必要な最低限のLinux環境を作るためにdebian instalerを使用したということなのである。ゆえに、いくつかのイメージがcoLinux本家から手に入るので、これを使ってcoLinuxを起動し、其の上でクロスインストールすることもOKなのである。

ただし、debootstrapはこれを導入するためにarとwgetとが使えなければいけない。残念なことに、coLinuxに添付されているinitrd.gzに含まれるbusyboxはarコマンドが無い。そんな訳で、非常に残念なことに、余分なものが必要になる。とにかく、arとwgetが使えるinitrd.gzがあればいいのだが。

イメージファイルからのセットアップ

ここでは、coLinux本家が提供しているetchイメージからdebootstrapをつかってインストールを行う。まずはダウンロードしたetchのイメージからcoLinuxを起動。

> d:
> cd d:\coLinux
> del etch.img swap.img etch.conf
> "d:\bin\qemu-0.9.1-windows\qemu-img.exe" create -f raw etch.img 1G
> "d:\bin\qemu-0.9.1-windows\qemu-img.exe" create -f raw swap.img 128M 
> echo kernel="c:\Program Files\coLinux\vmlinux"> etch.conf
> echo cobd0="d:\coLinux\Debian-4.0r0-etch.ext3.1gb\Debian-4.0r0-etch.ext3.1gb">> etch.conf
> echo cobd1="d:\coLinux\swap.img">> etch.conf
> echo cobd2="d:\coLinux\etch.img">> etch.conf
> echo cofs0="d:\coLinux\">> etch.conf
> echo root=/dev/cobd0>> etch.conf
> echo vga=nomal>> etch.conf
> echo ramdisk_size=1024>> etch.conf
> echo rw>> etch.conf
> echo -->> etch.conf
> echo initrd="c:\Program Files\coLinux\initrd.gz">> etch.conf
> echo mem=64>> etch.conf
> echo eth0=tuntap,"TAP">> etch.conf
> "c:\Program Files\coLinux\colinux-daemon.exe" @etch.conf

で、Cooporative Linux Consoleが立ち上がる。username:root、passwd:rootでログインする。セットアップ用のシェルスクリプトを走らせる。やっていることは大まかに言って、ネットワーク構成、現在のシステムのアップデート、スワップ領域の確保、セットアップ用のファイルシステムの作成とフォーマットとマウント、クロスインストール、シャットダウン。

debian~# mkdir -p /mnt/modules
debian~# mount -t cofs cofs0 /mnt/modules/
debian~# cat /mnt/modules/setup.sh
#!/bin/sh
cd /
ifconfig eth0 inet 192.168.0.2 netmask 255.255.255.0 up
ifconfig lo up
ifconfig
route add -net 192.168.0.2 netmask 255.255.255.255 eth0
route add -net 127.0.0.0 netmask 255.0.0.0 lo
route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.0.1 eth0
route
echo nameserver 192.168.0.1> /etc/resolv.conf
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install debootstrap
mkswap /dev/cobd1
sync;sync;sync
swapon /dev/cobd1
mke2fs -j /dev/cobd2
mkdir /target
mount /dev/cobd2 /target
debootstrap --arch i386 etch /target
shutdown -h now
debian~# sh /mnt/modules/setup.sh

coLinuxが終了してプロンプトに戻ってくるので、今作ったシステムで起動する。

> echo kernel="c:\Program Files\coLinux\vmlinux"> etch.conf
> echo cobd0="d:\coLinux\etch.img">> etch.conf
> echo cobd1="d:\coLinux\swap.img">> etch.conf
> echo cofs0="d:\coLinux\">> etch.conf
> echo root=/dev/cobd0>> etch.conf
> echo vga=nomal>> etch.conf
> echo ramdisk_size=1024>> etch.conf
> echo rw>> etch.conf
> echo -->> etch.conf
> echo initrd="c:\Program Files\coLinux\initrd.gz">> etch.conf
> echo mem=64>> etch.conf
> echo eth0=tuntap,"TAP">> etch.conf
> "c:\Program Files\coLinux\colinux-daemon.exe" @etch.conf

debootstrapでセットアップした場合の初期設定

どのようなシステムをからセットアップを行ったとしても、debootstrapを使った場合はセットアップ直後はまっさらな状態でほぼ何もされていないので、使える状態まで持っていくにはいくつかの設定が必要である。設定のいろはについてはD.3. Unix/Linux システムからの Debian GNU/Linux のインストールに詳しい。

ハードウェアクロックの時系をシステムに伝える

まずは/etc/default/rcSを編集してハードウェアクロック(マザーボードにあるCMOSの時間)の1秒の基準(GMT or UTC)をマシンに伝える。ハードウェアクロックの基準は不明だったがUTCと考えることにしよう。また、上のようにインストールした場合はデフォルトでUTC=yesなので、編集する必要は無かった。しかし、debianのクロスインストールの手引きには書いてあるので一応確認。古めの情報だが、Linux Debian 2.0 でのrcS.dの動作についてによれば、/etc/default/rcSは起動時にS10checkroot.shから呼ばれて環境変数の初期設定を行うためのファイルのようだ。

# echo UTC=yes >> /etc/default/rcS
# grep -n UTC /etc/default/rcS
13:UTC=yes
18:UTC=yes

本来、この作業にはコンピュータのハードウェアクロックがUTCとGMTのどちらの基準で1秒を刻んでいるか知っていなければならない。ただ実際問題として、どこにでもある汎用のコンピュータこの設定を行う場合は、ハードウェアクロックがGMTとUTCのどちらを基準にしているかを知る必要は無く、単純にUTCを採用すればよいと思われる。なぜなら、どちらにしてもハードウェアクロックが基準に対してずれずに動くのはかなり難しそうな気がするからだ。GMTの場合は地球の自転を考慮して、UTCの場合はセシウム原子時計を基準にして、1秒を決めねばならず現実的ではない。どこかにあるGMTやUTC基準の時計から情報をもらうにしても、そのためのデバイス(電波時計)と汎用コンピュータの価格の比較から、現実的でない選択肢となってしまうと思うからである。

  1. Linux はどのように時間を計っているのか
  2. GMT と UTC の違いは何 ?
  3. 産総研・サイエンス・タウン 世の中の基準を創って守るために 「世界でいちばん正確な1秒!」

システムの時間帯をAsia/Tokyoに

初期状態ではタイムゾーンがUnknownなので、dateコマンドで表示される時間やlsのタイムスタンプも日本時間の9時間後。使いにくいかもしれないので、日本時間に変えておく。

# tzconfig

IPアドレスとデフォルトゲートウェイの設定

coLinuxからどのネットワークに接続したいのかによって設定は変化する。eth0に割り当てるアドレスを192.168.0.2とし、

まずは、eth0に割り振ったIPアドレスが所属するネットワークの外のネットワークにパケットを送るための出口(デフォルトゲートウェイ)を設定しなければ外のネットワークと通信できない。ここでは、192.168.0.1をデフォルトゲートウェイとした。一時的にゲートウェイを設定するには下のようにコマンドを打つ。この場合、再起動後に設定は消える。

# route add -net 0.0.0.0 network 0.0.0.0 gw 192.168.0.1 eth0

永続的にゲートウェイを設定するには下のように/etc/network/interfacesを編集して、eth0のブロックにgateway 192.168.0.1を追加する。このようにすると起動時に自動的にルーティングテーブルにデフォルトゲートウェイが追加される。このあたりの解説はデフォルトゲートウェイの設定が詳しい。

# vi /etc/network/interfaces
>auto eth0
>iface eth0 inet static
>    address 192.168.0.2
>    network 255.255.255.0
>    gateway 192.168.0.1

下のようにしてupとpre-downを使って設定することも可能だが、煩雑。

# vi /etc/network/interfaces
>auto eth0
>iface eth0 inet static
>    address 192.168.0.2
>    network 255.255.255.0
>    up route add -net 0.0.0.0 network 0.0.0.0 gw 192.168.0.1 eth0
>    pre-down route add -net 192.168.0.0 network 255.255.255.0 eth0

ルーティングテーブルの確認は下のようにして行う。ルーティングテーブルの読み方は、他のネットワークのコンピュータとはどうやって通信しているの?が詳しい。gateway 192.168.0.1を追加したことで、一番下の行が追加され、192.168.0.0/255.255.255.0のネットワークに所属しないアドレスを宛先に持つパケットは全て、eth0を通して192.168.0.1へ送られることになった。

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

「外のネットワークにパケットを送ることができる」とかいたが、注意がある。この場合なら、自分の所属するネットワーク192.168.0.0/255.255.255.0に属するアドレスを持つコンピュータがデフォルトゲートウェイの外にあってもパケットを送ることが出来ないということだ。ということで、最終的な設定ファイルは下のようになる。

# vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 192.168.0.2
        network 255.255.255.0
        gateway 192.168.0.1

ロケールのインストールと設定

まずはインストール。

# apt-get install locales

其の後、設定。とりあえずja_JP.UTF-8のロケールを作成して、システムのデフォルトをこれにしておく。

# dpkg-reconfigure locales

windows上で動くXmingをcoLinuxからsshを経由せずに使う

coLinuxにXアプリケーションをインストールして使うためには、XサーバとXアプリケーションが必要だ。Xサーバはユーザの使うキーボードが直接繋がったマシンでXアプリケーションからの接続を待機して、Xアプリケーションは別のどこかにあるマシンで走っている。このあたりについて上手く説明できていない(よくわかっていない)感じがする。XmingとXming-fontsをインストールする。で、Xmingをインストールしたディレクトリ(c:\Program Files\Xming\)中のX0.hostsを編集して、coLinuxマシンのIPアドレスを入れておく。

まずは、下のようにしてcoLinuxで割り当てられたIPアドレスをチェックする。この場合は192.168.0.2がcoLinuxに割り当てたIPアドレス。Windowsマシンで動いているXサーバ(Xming)にこのIPアドレスからの接続を許可する設定を追記する。

coLinux:~# ifconfig eth0 | grep inet
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0

で、現状の確認。Xmingをインストールしたディレクトリ内のX0.hostsというファイルに接続を許可するIPアドレスが書いてあるので、これを見てみるとlocalhostからの接続のみが許可されている。

> type "C:\Program Files\Xming\X0.hosts"
localhost

coLinuxはlocalhostで動いているわけではないのでこのままではcoLinuxから起動したXアプリケーションはwindowsで動いているXmingから接続拒否されるはずだ。ためしに下のようにしてcoLinuxでxeyesを起動してみる。

coLinux:~# xeyes
Xlib: connection to "192.168.0.1:0.0" refused by server
Xlib: No protocol specified
Error: Can't open display 192.168.0.1:0.0

ということで、拒否された。Xmingのログにも下のように拒否したとある。

reject from IP 192.168.0.2

ということで、X0.hostsにcoLinuxのIPアドレスを追記してcoLinuxからXmingへの接続を許可してみる。

> echo 192.168.0.2>> "C:\Program Files\Xming\X0.hosts"
> type "C:\Program Files\Xming\X0.hosts"
localhost
192.168.0.2

これで設定ファイルはOKのはずだ。この設定を反映させるためにXmingを終了して起動する。

最後にcoLinux側でDISPLAY変数をセットすれば、coLinuxでxeyesを起動出来るはずだ。

coLinux:~# export DISPLAY=192.168.0.1:0.0
coLinux:~# xeyes

そもそも、coLinuxでXアプリケーションを使うのにわざわざsshdを立てたり、sshコネクションを貼る必要は一切ない。それどころか、sshの暗号変換処理を挟むことで、体感速度が遅くなるようなきがする。

ssh

ソーシャルブックマーク

  1. はてなブックマーク
  2. Google Bookmarks
  3. del.icio.us

ChangeLog

  1. Posted: 2003-12-26T14:32:12+09:00
  2. Modified: 2003-12-26T14:19:06+09:00
  3. Generated: 2023-08-27T23:09:17+09:00