雑記

いち情報系大学生

2018年の某の応募課題を今更ながら...

一部書き換えてますが、2018年のseccampに応募したときに書いたやつです。落ちましたが。

アップするかどうか迷いましたが、"2018年ももう終わるしなんとなく上げておくかぁ”くらいの気持ちです。

----(以下本文)----

大学のSoralis演習室を使いました。

いきなりですが、”prtconf -D”を実行した時の結果が以下になります。

$prtconf -D 

 

System Configuration:  Oracle Corporation  i86pc

Memory size: 65404 Megabytes

System Peripherals (Software Nodes):

 

i86pc

    scsi_vhci, instance #0

        disk, instance #3

        disk, instance #1

        disk, instance #2

        disk, instance #0

    pci, instance #0

        pci8086,0 (pciex8086,6f00) (driver not attached)

        pci8086,6f02 (pciex8086,6f02) (driver not attached)

        pci8086,6f04 (pciex8086,6f04) (driver not attached)

        pci8086,6f08 (pciex8086,6f08), instance #2

            pci1000,9361 (pciex1000,5d), instance #0

                iport, instance #1

        pci8086,6f0a (pciex8086,6f0a), instance #3

            pci108e,4852 (pciex8086,1528), instance #0

            pci108e,4852 (pciex8086,1528), instance #1

        pci8086,0 (pciex8086,6f20) (driver not attached)

        pci8086,0 (pciex8086,6f21) (driver not attached)

        pci8086,0 (pciex8086,6f22) (driver not attached)

        pci8086,0 (pciex8086,6f23) (driver not attached)

        pci8086,0 (pciex8086,6f24) (driver not attached)

        pci8086,0 (pciex8086,6f25) (driver not attached)

        pci8086,0 (pciex8086,6f26) (driver not attached)

        pci8086,0 (pciex8086,6f27) (driver not attached)

        pci8086,6f28 (pciex8086,6f28) (driver not attached)

        pci8086,6f29 (pciex8086,6f29) (driver not attached)

        pci8086,6f2a (pciex8086,6f2a) (driver not attached)

        pci8086,0 (pciex8086,6f2c) (driver not attached)

        pci108e,4852 (pciex8086,8d7c) (driver not attached)

        pci108e,4852 (pciex8086,8d3a) (driver not attached)

        pci108e,4852 (pciex8086,8d3b) (driver not attached)

        pci108e,4852 (pciex8086,8d2d), instance #0

            hub, instance #0

        pci8086,8d10 (pciex8086,8d10) (driver not attached)

        pci8086,8d1e (pciex8086,8d1e), instance #5

            display (pciex102b,522), instance #0

        pci108e,4852 (pciex8086,8d26), instance #1

            hub, instance #1

                hub, instance #2

                    device, instance #3

                        keyboard, instance #8

                        input, instance #9

                        mouse, instance #10

                        mouse, instance #11

                communications, instance #0

        isa (pciex8086,8d44), instance #0

            asy, instance #0

            pit_beep, instance #0

        pci108e,4852 (pciex8086,8d02), instance #0

            cdrom, instance #4

        pci108e,4852 (pciex8086,8d22) (driver not attached)

    ioapics (driver not attached)

        ioapic, instance #0 (driver not attached)

        ioapic, instance #1 (driver not attached)

    pci, instance #1

        pci8086,6f80 (pciex8086,6f80) (driver not attached)

        pci8086,6f32 (pciex8086,6f32) (driver not attached)

        pci8086,6f83 (pciex8086,6f83) (driver not attached)

        pci8086,6f90 (pciex8086,6f90) (driver not attached)

        pci8086,6f33 (pciex8086,6f33) (driver not attached)

        pci8086,6f93 (pciex8086,6f93) (driver not attached)

        pci8086,6f81 (pciex8086,6f81) (driver not attached)

        pci8086,6f36 (pciex8086,6f36) (driver not attached)

        pci8086,6f37 (pciex8086,6f37) (driver not attached)

        pci8086,6f76 (pciex8086,6f76) (driver not attached)

        pci8086,6fe0 (pciex8086,6fe0) (driver not attached)

        pci8086,6fe1 (pciex8086,6fe1) (driver not attached)

        pci8086,6fe2 (pciex8086,6fe2) (driver not attached)

        pci8086,6fe3 (pciex8086,6fe3) (driver not attached)

        pci8086,6fe4 (pciex8086,6fe4) (driver not attached)

        pci8086,6fe5 (pciex8086,6fe5) (driver not attached)

        pci8086,6fe6 (pciex8086,6fe6) (driver not attached)

        pci8086,6fe7 (pciex8086,6fe7) (driver not attached)

        pci8086,6ff8 (pciex8086,6ff8) (driver not attached)

        pci8086,6ff9 (pciex8086,6ff9) (driver not attached)

        pci8086,6fe0 (pciex8086,6ffc) (driver not attached)

        pci8086,6fe0 (pciex8086,6ffd) (driver not attached)

        pci8086,6fe0 (pciex8086,6ffe) (driver not attached)

        pci8086,6f1d (pciex8086,6f1d) (driver not attached)

        pci8086,6f34 (pciex8086,6f34) (driver not attached)

        pci8086,6f1e (pciex8086,6f1e) (driver not attached)

        pci8086,6f7d (pciex8086,6f7d) (driver not attached)

        pci8086,6f1f (pciex8086,6f1f) (driver not attached)

        pci8086,6fa0 (pciex8086,6fa0) (driver not attached)

        pci8086,6f30 (pciex8086,6f30) (driver not attached)

        pci8086,6fa8 (pciex8086,6fa8) (driver not attached)

        pci8086,6f71 (pciex8086,6f71) (driver not attached)

        pci8086,6faa (pciex8086,6faa) (driver not attached)

        pci8086,6fab (pciex8086,6fab) (driver not attached)

        pci8086,6fac (pciex8086,6fac) (driver not attached)

        pci8086,6fad (pciex8086,6fad) (driver not attached)

        pci8086,6fae (pciex8086,6fae) (driver not attached)

        pci8086,6faf (pciex8086,6faf) (driver not attached)

        pci8086,6fb0 (pciex8086,6fb0) (driver not attached)

        pci8086,6fb1 (pciex8086,6fb1) (driver not attached)

        pci8086,6fb2 (pciex8086,6fb2) (driver not attached)

        pci8086,6fb3 (pciex8086,6fb3) (driver not attached)

        pci8086,6fbc (pciex8086,6fbc) (driver not attached)

        pci8086,6fbd (pciex8086,6fbd) (driver not attached)

        pci8086,6fbe (pciex8086,6fbe) (driver not attached)

        pci8086,6fbf (pciex8086,6fbf) (driver not attached)

        pci8086,6fb4 (pciex8086,6fb4) (driver not attached)

        pci8086,6fb5 (pciex8086,6fb5) (driver not attached)

        pci8086,6fb6 (pciex8086,6fb6) (driver not attached)

        pci8086,6fb7 (pciex8086,6fb7) (driver not attached)

        pci8086,6f68 (pciex8086,6f68) (driver not attached)

        pci8086,6f6e (pciex8086,6f6e) (driver not attached)

        pci8086,6f6f (pciex8086,6f6f) (driver not attached)

        pci8086,6fd0 (pciex8086,6fd0) (driver not attached)

        pci8086,6fb8 (pciex8086,6fb8) (driver not attached)

        pci8086,6fb9 (pciex8086,6fb9) (driver not attached)

        pci8086,6fba (pciex8086,6fba) (driver not attached)

        pci8086,6fbb (pciex8086,6fbb) (driver not attached)

        pci8086,6f98 (pciex8086,6f98) (driver not attached)

        pci8086,6f99 (pciex8086,6f99) (driver not attached)

        pci8086,6f9a (pciex8086,6f9a) (driver not attached)

        pci8086,6fc0 (pciex8086,6fc0) (driver not attached)

        pci8086,6f9c (pciex8086,6f9c) (driver not attached)

        pci8086,6f88 (pciex8086,6f88) (driver not attached)

        pci8086,6f8a (pciex8086,6f8a) (driver not attached)

    pci, instance #2

        pci8086,6f02 (pciex8086,6f02), instance #6

            pci108e,4852 (pciex8086,1528), instance #2

            pci108e,4852 (pciex8086,1528), instance #3

        pci8086,6f08 (pciex8086,6f08) (driver not attached)

        pci8086,0 (pciex8086,6f20) (driver not attached)

        pci8086,0 (pciex8086,6f21) (driver not attached)

        pci8086,0 (pciex8086,6f22) (driver not attached)

        pci8086,0 (pciex8086,6f23) (driver not attached)

        pci8086,0 (pciex8086,6f24) (driver not attached)

        pci8086,0 (pciex8086,6f25) (driver not attached)

        pci8086,0 (pciex8086,6f26) (driver not attached)

        pci8086,0 (pciex8086,6f27) (driver not attached)

        pci8086,6f28 (pciex8086,6f28) (driver not attached)

        pci8086,6f29 (pciex8086,6f29) (driver not attached)

        pci8086,6f2a (pciex8086,6f2a) (driver not attached)

        pci8086,0 (pciex8086,6f2c) (driver not attached)

    fw, instance #0

        sb, instance #1

            socket, instance #2

                cpu, instance #0

                cpu, instance #1

                cpu, instance #2

                cpu, instance #3

                cpu, instance #4

                cpu, instance #5

                cpu, instance #6

                cpu, instance #7

                cpu, instance #8

                cpu, instance #9

                cpu, instance #10

                cpu, instance #11

            socket, instance #3

                cpu, instance #12

                cpu, instance #13

                cpu, instance #14

                cpu, instance #15

                cpu, instance #16

                cpu, instance #17

                cpu, instance #18

                cpu, instance #19

                cpu, instance #20

                cpu, instance #21

                cpu, instance #22

                cpu, instance #23

    used-resources (driver not attached)

    fcoe, instance #0

    iscsi, instance #0

    agpgart, instance #0

    options, instance #0

    pseudo, instance #0

    vga_arbiter, instance #0

    xsvc, instance #0

    intel-iommu, instance #0

    intel-iommu, instance #1

partconfはシステム構成を出力するコマンドで、-Dオプションを指定すると、周辺機器ごとにそれを管理するために使用されているデバイスドライバの名前を表示してくれます。インデントで階層構造を表現してます(最初はこれをどうやって読むのかも分かりませんでした)

つまり以下の部分は、

pci, instance #0

        pci8086,0 (pciex8086,6f00) (driver not attached)

        pci8086,6f02 (pciex8086,6f02) (driver not attached)

        pci8086,6f04 (pciex8086,6f04) (driver not attached)

        pci8086,6f08 (pciex8086,6f08), instance #2

            pci1000,9361 (pciex1000,5d), instance #0

                iport, instance #1

        pci8086,6f0a (pciex8086,6f0a), instance #3

            pci108e,4852 (pciex8086,1528), instance #0

下図ようになってます

f:id:unyamahiro:20180525002207p:plain

(ちなみにここで、実行結果の方で「driver not attached 」となっている部分がありますが、これはデバイスが繋がっていない(あるいは使用中ではない)ために、デバイスインスタンスに現在接続されているドライバがないことを意味していて、ドライバは、デバイスがアクセスされると自動的にロードされデバイスが使用されなくなると自動的にアンロードされます)

 

ここで、pci8086とpci1000などが何を意味しているのかが気になりました。「pciex8086は恐らくpci expressのことだろう」という感じで多少の類推はできるのですが、考えてもそれ以上のことが分からなかったので調べました。

The PCI ID Repositoryを見たら、どうやらこれらはデバイス名であるらしいことがわかりました。例えば”pciex8086,6f02”だと(https://pci-ids.ucw.cz/read/PC/8086/6f04PCI Express Root Port 2と書いてあって、詳細はともかく、「何をするためのものか」くらいは調べればなんとなく分かる状態になりました。

それがわかった上で、以下の部分を見てみます。

  pci, instance #2

        pci8086,6f02 (pciex8086,6f02), instance #6

            pci108e,4852 (pciex8086,1528), instance #2

            pci108e,4852 (pciex8086,1528), instance #3

まずいちばん上の”pci instance #2”と書いてあるところがおそらくホスト-PCIブリッジで、ここには今pciex8086,6f02が繋がれています。この記事によると、PCI Expressのシステムを構成する要素の一つにはルートコンプレックスというものが存在し、そこには1つ以上のPCIeポートがあるということなので、恐らくpci8086 6f02がそのルートコンプレックスなのだろうと分かります。そして、その下層に2つ繋がっているpci108e,4852 (pciex8086,1528)を調べてみると、デバイス名がEthernet Server Adapter X540ということで、ネットワークに関する何かなのだということが分かりました。 

 

他にも聞き覚えのないデバイスをいくつか調べてみました。

scsi_vhci

パソコンと周辺機器をつなぐ規格で主にハードディスクなどのドライブを接続するために使われるが、最近では同じ用途にUSBやIEEE1394を使用するのが一般的で、SCSIはあまり使われなくなった

ioapics

I/Oデバイスから受け取った割り込みを、CPUへ通知する

fcoe    

イーサネットを通じてファイバチャネルのフレーム転送を行うためのもの。Storage Area Networkという、(名前通りに)ストレージをネットワークを経由して利用する仕組みを構築するために使われる

iscsi

FCoeEと同じく、SANを利用する仕組みを実現するために使われる。上述したSCSIのデータをTCP/IPで利用できるようにするもの。

 

--(本文終わり)--

※他にも色々書きましたが、残っているのがこれだけでした。

なんか今になって読むと、もっと色々手動かせばできることあったんじゃない?って思います(まぁこれだけでもかなり時間かかった思い出あるのですが...)