OLEDBのドライバーを列挙する

WindowsにおけるOLEDBの良い所は、ODBCのようにあらかじめODBCデータソースに登録しておく必要がないことだと思う。 しかし、事前に明示的に登録する作業がないせいで、OLEDBのドライバーがインストールされているかが分かりにくいように感じている。 PowerShellを使うとOLEDBドライバーを列挙できる。

> (New-Object data.oledb.oledbenumerator).getElements()

例えばOracle Provider for OLE DBがあるかは、OraOLEDB.Oracleがあるかで分かる。


SOURCES_NAME        : OraOLEDB.Oracle
SOURCES_PARSENAME   : {3F63C36E-51A3-11D2-BB7D-00C04FA30080}
SOURCES_DESCRIPTION : Oracle Provider for OLE DB
SOURCES_TYPE        : 1
SOURCES_ISPARENT    : False
SOURCES_CLSID       : {3F63C36E-51A3-11D2-BB7D-00C04FA30080}

ADO+OLEDBでTNSをJScriptから直接指定してOracle Databaseにアクセスする

WindowsにおけるOLEDBの良い所は、あらかじめODBCデータソースを設定しておかなくて良いというところだと思う。これは特に複数のクライアントPCにからデータベースにアクセスしなくてはいけない状況で、そのクライアントPCのユーザーがODBCのことを理解していない場合には、重要であると思う。ODBCデータソースに自動登録するスクリプトも書けるものだとは思うが。

しかし、Oracle Databaseにアクセスする場合には、インスタントクライアントのインストールが必要であるのは仕方がないとしても、tnsnames.oraを配置するのは面倒である。

ADOとOLEDBの組み合わせで、TNSの文字列をそのままサーバー名として与えることで、tnsnames.oraに追記する必要はないことが分かったので例を示しておく。

ADOをWindows Scripting Host (WSH)のJScriptから使った場合でまとめておく。


/*
 * テーブルをTSVファイルにダンプする
 * Copyright (c) 2016 Ryo ONODERA, All rights reserved.
 * License: 2-clause BSD
 */

var bTable = "table1";

// Define columns
var columns = ["column1", "column2", "column3", "column4", "column5", "column6", "column7", "column8", "column9", "column10", "column11", "column12"];

// Start
main();

// YYYYMMDDhhmm
function getNow()
{
 var date = new Date();
 //date = new Date(2016, 1, 3);
 var dateString = ("" + date.getFullYear()
  + ("0" + (date.getMonth() + 1)).slice(-2)
  + ("0" + (date.getDate())).slice(-2)
  + ("0" + (date.getHours())).slice(-2)
  + ("0" + (date.getMinutes())).slice(-2)
 );

 // debug
 //var Wsh = WScript.CreateObject("WScript.Shell");
 //Wsh.Popup(dateString);

 return dateString;
}

// Concatenate array with ", "
function concatColumns(columns, delimiter)
{
 var columnsString = "";
 for (var i = 0; i < columns.length - 1 ; i++) {
  columnsString = columnsString + columns[i] + delimiter + " ";
 }
 columnsString = columnsString + columns[columns.length - 1];

 return columnsString;
}

// Get CSV string
function getCsvLine(recordSet, delimiter)
{
 var csvLine = "";
 for (var i = 0; i < recordSet.Fields.Count - 1; i++) {
  csvLine = csvLine + recordSet.Fields(i) + delimiter + " ";
 }
 csvLine = csvLine + recordSet.Fields(recordSet.Fields.Count - 1);

 return csvLine;
}

// Main function
function main() {
 // For Popup
 var Wsh = WScript.CreateObject("WScript.Shell");
 
 var serverName = "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = serviceName)))";
 var userName = "username";
 var password = "password";

 // Connect to Oracle DB
 var ADOConn = WScript.CreateObject("ADODB.Connection");
 ADOConn.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=" + serverName + ";User ID=" + userName + ";Password=" + password + ";";
 ADOConn.Open();

 var SQLString = "select " + concatColumns(columns, ",") + " from " + bTable;
 //Wsh.Popup(SQLString);
 var rs = ADOConn.Execute(SQLString);

 // Popup debug
 //Wsh.Popup(rs(columns[0]) + rs(columns[1]));

 // Write CSV file
 var outputFileName = "D:\\tmp\\dump\\" + bTable + "-"+ getNow() + ".tsv";
 var fso = WScript.CreateObject("Scripting.FileSystemObject");
 var outputCsvFile = fso.CreateTextFile(outputFileName, true, true);
 outputCsvFile.WriteLine(concatColumns(columns, "\t"));
 while (!rs.EOF) {
  var rsLine = getCsvLine(rs, "\t");
  outputCsvFile.WriteLine(rsLine);
  rs.MoveNext();
 }

 // Finish notification
 //Wsh.Popup("Finished");
}

GXemul 0.6.0.1のエミュレートする環境

GXemul 0.6.0.1でエミュレートしているマシンの情報がGoogleで検索してもうまく出て来ないので、gxemul -Hの結果を掲載しておく。

改めて見てみると、知らないアーキテクチャーも含めて本当に多くをエミュレートしている。


Available template machines:

  testm88k      Experimental M88K machine.
  testmips      Experimental MIPS machine.

--------------------------------------------------------------------------

The following applies to the LEGACY modes only:

Available CPU types:

        Alpha:
            21064        21066        21164        21164A-2     
            21164PC      21264        21364        
        ARM:
            ARM3         ARM610       ARM610       ARM620       ARM700       
            ARM710       ARM710A      ARM720T      ARM740T4K    ARM740T8K    
            ARM7500      ARM7500FE    ARM810       ARM920T      ARM922T      
            ARM940T      ARM946ES     ARM966ES     ARM966ESR1   ARM1020E     
            ARM1022ES    ARM1026EJS   ARM1136JS    ARM1136JSR1  SA110        
            SA1100       SA1110       TI925T       IXP1200      80200        
            PXA210       PXA210A      PXA210B      PXA210C      PXA250       
            PXA250A      PXA250B      PXA250C      PXA27X       IXP425_255   
            IXP425_400   IXP425_533   80219_400    80219_600    80321_400    
            80321_400_B0 80321_600    80321_600_B0 80321_600_2  
        M88K:
            88100        88110        
        MIPS:
            R2000     R2000A    R3000     R3000A    R6000     R4000     
            R4000PC   R10000    R4200     R4300     R4100     VR4102    
            VR4181    VR4121    VR4122    VR4131    R4400     R4600     
            R4700     R4650     R8000     R12000    R14000    R5000     
            R5900     TX3920    TX7901    VR5432    RM5200    RM7000    
            RM7900    RM9000    RC32334   4Kc       4KEc      5Kc       
            5KE       BCM4710   BCM4712   AU1000    AU1500    AU1100    
            SB1       SR7100    Allegrex  
        PPC:
            PPC405GP  PPC601    PPC603    PPC603e   PPC604    PPC620    
            MPC7400   PPC750    G4e       PPC970    
        SH:
            SH7708R   SH7750    SH7750R   SH7751R   

Most of the CPU types are bogus, and not really implemented. The main effect of
selecting a specific CPU type is to choose what kind of 'id' it will have.

Available machine types (with aliases) and their subtypes:

        Algor evaluation board [MIPS] ("algor")
            - P4032 ("p4032")
            - P5064 ("p5064")
        Alpha [Alpha] ("alpha")
            - AlphaBook 1 ("alphabook1")
            - AlphaServer 4100 ("alphaserver4100")
            - DEC 3000/300 ("3000/300")
            - EB164 ("eb164")
        ARC [MIPS] ("arc")
            - Acer PICA-61 ("pica-61", "acer pica", "pica")
            - Jazz Magnum ("magnum", "jazz magnum")
        Artesyn's PM/PPC board [PPC] ("pmppc")
        CATS evaluation board [ARM] ("cats")
        Cobalt [MIPS] ("cobalt")
        DECstation/DECsystem [MIPS] ("decstation", "decsystem", "dec")
            - DECstation 3100 (PMAX) ("pmax", "3100", "2100")
            - DECstation 5000/200 (3MAX) ("3max", "5000/200")
            - DECstation 5000/1xx (3MIN) ("3min", "5000/1xx")
            - DECstation 5000 (3MAXPLUS) ("3maxplus", "3max+")
            - DECsystem 58x0 ("5800", "58x0")
            - DECsystem 5400 ("5400")
            - DECstation Maxine (5000) ("maxine")
            - DECsystem 5500 ("5500")
            - DECstation MipsMate (5100) ("5100", "mipsmate")
        Dreamcast [SH] ("dreamcast")
        Generic "bare" ARM machine [ARM] ("barearm")
        Generic "bare" M88K machine [M88K] ("barem88k")
        Generic "bare" MIPS machine [MIPS] ("baremips")
        Generic "bare" PPC machine [PPC] ("bareppc")
        Generic "bare" SH machine [SH] ("baresh")
        Handhelp ARM (HPCarm) [ARM] ("hpcarm")
            - Ipaq ("ipaq")
            - Jornada 720 ("jornada720")
            - Jornada 728 ("jornada728")
        Handhelp MIPS (HPCmips) [MIPS] ("hpcmips")
            - Casio Cassiopeia BE-300 ("be-300", "be300")
            - Casio Cassiopeia E-105 ("e-105", "e105")
            - Agenda VR3 ("agenda", "vr3")
            - IBM WorkPad Z50 ("workpad", "z50")
            - NEC MobilePro 770 ("mobilepro770")
            - NEC MobilePro 780 ("mobilepro780")
            - NEC MobilePro 800 ("mobilepro800")
            - NEC MobilePro 880 ("mobilepro880")
        Handhelp SH (HPCsh) [SH] ("hpcsh")
            - Jornada 680 ("jornada680")
            - Jornada 690 ("jornada690")
        Intel IQ80321 [ARM] ("iq80321")
        Iyonix [ARM] ("iyonix")
        Landisk [SH] ("landisk", "usl-5p")
        Macintosh [PPC] ("macppc")
            - MacPPC G3 ("g3")
            - MacPPC G4 ("g4")
            - MacPPC G5 ("g5")
        MIPS evaluation boards (evbmips) [MIPS] ("evbmips")
            - Malta ("malta")
            - Malta (Big-Endian) ("maltabe")
        MVME88K [M88K] ("mvme88k")
            - MVME187 ("mvme187old")
            - MVME188 ("mvme188")
            - MVME197 ("mvme197")
        MVMEPPC [PPC] ("mvmeppc")
            - MVME1600 ("mvme1600")
            - MVME2100 ("mvme2100")
            - MVME5500 ("mvme5500")
        NetWinder [ARM] ("netwinder")
        Playstation 2 [MIPS] ("playstation2", "ps2")
        PowerPC Reference Platform [PPC] ("prep")
            - IBM 6050/6070 ("ibm6050", "ibm6070")
            - MVME2400 ("mvme2400")
        QEMU MIPS [MIPS] ("qemu_mips")
        SGI [MIPS] ("silicon graphics", "sgi")
            - IP12 ("ip12")
            - IP19 ("ip19")
            - IP20 ("ip20")
            - IP22 ("ip22", "indy")
            - IP24 ("ip24")
            - IP27 ("ip27", "origin 200", "origin 2000")
            - IP28 ("ip28")
            - IP30 ("ip30", "octane")
            - IP32 ("ip32", "o2")
            - IP35 ("ip35")
        Test-machine for ARM [ARM] ("testarm")
        Test-machine for M88K [M88K] ("oldtestm88k")
        Test-machine for MIPS [MIPS] ("oldtestmips")
        Test-machine for PPC [PPC] ("testppc")
        Test-machine for SH [SH] ("testsh")

Most of the machine types are bogus too. Please read the GXemul documentation
for information about which machine types that actually work. Use the alias
when selecting a machine type or subtype, not the real name.


NetBSD on Panasonic CF-S10ETHDS

ちょっとした理由で、Panasonic Let's Note CF-S10を使う機会があったので、NetBSD/amd64 currentを動かしてみた。build.sh live-imageの作ってくれるlive imageをUSB stickに書き込んで使った。

CF-S10は左右にUSB端子があるのだが、右側はUSB 3.0専用らしく、そこにUSB stickを差し込むと7.99.27はsd0がなくroot file systemが見付けられずに起動できなかった。左側の端子にUSB stickを差し込めば問題ない。

NetBSD/amd64 7.99.29にしたdmesgは紛失してしまったのだが、7.99.29ではXHCI USB 3.0が有効になっているので、右側の端子に差し込んでもちゃんと起動する。

native X.orgも何も設定することなく起動した。

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.27 (GENERIC) #0: Tue Apr 19 08:46:20 JST 2016
 ryo_on@brownie:/usr/world/7.99/amd64/obj/sys/arch/amd64/compile/GENERIC
total memory = 3983 MB
avail memory = 3847 MB
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Panasonic Corporation CF-S10ETHDS (003)
mainbus0 (root)
ACPI: RSDP 0x00000000000F0430 000024 (v02 MATBIO)
ACPI: XSDT 0x00000000DAFFEE18 000094 (v01 MATBIO CFS10-3  06222004 MSFT 00010013)
ACPI: FACP 0x00000000DAFFDC18 0000F4 (v04 MATBIO CFS10-3  06222004 MSFT 00010013)
ACPI: DSDT 0x00000000DAFF1018 00B278 (v01 MATBIO CFS10-3  00000000 INTL 20091112)
ACPI: FACS 0x00000000DAFD4E40 000040
ACPI: FACS 0x00000000DAFD4D40 000040
ACPI: APIC 0x00000000DAFFDF18 0000CC (v02 MATBIO CFS10-3  06222004 MSFT 00010013)
ACPI: HPET 0x00000000DAFFFF18 000038 (v01 MATBIO CFS10-3  06222004 AMI. 00000003)
ACPI: SLIC 0x00000000DAFF0E18 000176 (v01 MATBIO CFS10-3  06222004 AMI  00010013)
ACPI: MCFG 0x00000000DAFFFE98 00003C (v01 MATBIO CFS10-3  06222004 MSFT 00000097)
ACPI: SSDT 0x00000000DAFEF018 000846 (v01 PmRef  Cpu0Ist  00003000 INTL 20091112)
ACPI: SSDT 0x00000000DAFEE018 0009A0 (v01 PmRef  CpuPm    00003000 INTL 20091112)
ACPI: SSDT 0x00000000DAFEDA98 0002EC (v01 PmRef  Cpu0Tst  00003000 INTL 20091112)
ACPI: SSDT 0x00000000DAFEC918 000452 (v01 PmRef  ApTst    00003000 INTL 20091112)
ACPI: DMAR 0x00000000DAFFDA98 0000E8 (v01 INTEL  SNB      00000001 INTL 00000001)
ACPI: SSDT 0x00000000DAF81018 006DF3 (v01 DppmRe OemDppm  00001000 INTL 20091112)
ACPI: TCPA 0x00000000DAFFFE18 000032 (v02 MATBIO CFS10-3  00000001 MSFT 01000013)
ACPI: ASF! 0x00000000DAFFEA18 000074 (v32 MATBIO CFS10-3  06222004 INTL 000F4240)
ACPI: SSDT 0x00000000DAFED718 0002DB (v01 SataRe SataTabl 00001000 INTL 20091112)
ACPI: 7 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 24 pins
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, id 0x206a7
cpu1 at mainbus0 apid 2
cpu1: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, id 0x206a7
cpu2 at mainbus0 apid 1
cpu2: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, id 0x206a7
cpu3 at mainbus0 apid 3
cpu3: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz, id 0x206a7
acpi0 at mainbus0: Intel ACPICA 20160108
acpi0: X/RSDT: OemId , AslId 
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE811D4EA340 000056 (v01 DynTbl VistaTbl 00000001 INTL 20091112)
acpi0: MCFG: segment 0, bus 0-63, address 0x00000000f8000000
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE810722C010 000869 (v01 PmRef  Cpu0Cst  00003001 INTL 20091112)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE8107196810 000303 (v01 PmRef  ApIst    00003000 INTL 20091112)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE810712E010 000119 (v01 PmRef  ApCst    00003000 INTL 20091112)
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
acpiec0 at acpi0 (EC0, PNP0C09)
: io 0x62,0x66
OPRM (PNP0C02) at acpi0 not configured
LDRC (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
CWDT (INT3F0D) at acpi0 not configured
pckbc1 at acpi0 (K106, PNP0320) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, SYN0502) (aux port): irq 12
TPM (IFX0102) at acpi0 not configured
TFN1 (INT3404) at acpi0 not configured
TSK1 (INT3403) at acpi0 not configured
TSK2 (INT3403) at acpi0 not configured
T_VR (INT3403) at acpi0 not configured
TCG1 (INT3403) at acpi0 not configured
acpivga0 at acpi0 (GFX0): ACPI Display Adapter
acpiout0 at acpivga0 (DD01, 0x0100): ACPI Display Output Device
acpiout1 at acpivga0 (DD02, 0x0400): ACPI Display Output Device
acpiout1: brightness levels: [0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]
acpiout2 at acpivga0 (DD03, 0x0300): ACPI Display Output Device
acpiout3 at acpivga0 (DD04, 0x0301): ACPI Display Output Device
acpiout4 at acpivga0 (DD05, 0x0302): ACPI Display Output Device
acpiout5 at acpivga0 (DD06, 0x0303): ACPI Display Output Device
acpiout6 at acpivga0 (DD07, 0x0304): ACPI Display Output Device
acpiout7 at acpivga0 (DD08, 0x0305): ACPI Display Output Device
acpivga0: unknown output device acpiout0
acpivga0: unknown output device acpiout2
acpivga0: unknown output device acpiout3
acpivga0: unknown output device acpiout4
acpivga0: unknown output device acpiout5
acpivga0: unknown output device acpiout6
acpivga0: unknown output device acpiout7
acpivga0: connected output devices:
acpivga0:   0x0400 (acpiout1): Unknown Output Device, head 0
PDRC (PNP0C02) at acpi0 not configured
TMEM (INT3402) at acpi0 not configured
BEXA (PNP0C02) at acpi0 not configured
MEM2 (PNP0C01) at acpi0 not configured
MISC (MAT0021) at acpi0 not configured
HKEY (MAT0019) at acpi0 not configured
acpiacad0 at acpi0 (AC, ACPI0003-0): ACPI AC Adapter
acpibat0 at acpi0 (BAT1, PNP0C0A-0): ACPI Battery
acpibat0: Panasonic LION rechargeable battery
acpibat0: granularity: low->warn 0.010 Wh, warn->full 0.010 Wh
acpilid0 at acpi0 (LID, PNP0C0D-0): ACPI Lid Switch
acpibut0 at acpi0 (PWRB, PNP0C0C-0): ACPI Power Button
DDRC (PNP0C02) at acpi0 not configured
DPPM (INT3400) at acpi0 not configured
acpitz0 at acpi0 (TZ00)
acpitz0: levels: critical 105.0 C, passive cooling
acpitz1 at acpi0 (TZ01): cpu0 cpu1 cpu2 cpu3
acpitz1: levels: critical 130.0 C, passive 81.0 C, passive cooling
ACPI: Enabled 4 GPEs in block 00 to 3F
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 6.2
pms0: Palm detect, Two button click pad
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 8086 product 0104 (rev. 0x09)
i915drmkms0 at pci0 dev 2 function 0: vendor 8086 product 0126 (rev. 0x09)
drm: Memory usable by graphics device = 2048M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
drm: Wrong MCH_SSKPD value: 0x17050407
drm: This can cause pipe underruns and display issues.
drm: Please upgrade your BIOS to fix this.
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier
intelfb0: framebuffer at 0xffff800046c17000, size 1280x800, depth 32, stride 5120
wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
vendor 8086 product 0103 (miscellaneous DASP, revision 0x09) at pci0 dev 4 function 0 not configured
vendor 8086 product 1c3a (miscellaneous communications, revision 0x04) at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3: Intel 6 Series KT (com)
com2 at puc0 port 0 (16550-compatible): ioaddr 0xe0e0, interrupting at ioapic0 pin 19
com2: ns16550a, working fifo
wm0 at pci0 dev 25 function 0: PCH2 LAN (82579LM) Controller (rev. 0x04)
wm0: interrupting at msi0 vec 0
wm0: PCI-Express bus
wm0: 2048 words FLASH
wm0: Ethernet address 70:58:12:dc:41:d4
ihphy0 at wm0 phy 2: i82579 10/100/1000 media interface, rev. 3
ihphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ehci0 at pci0 dev 26 function 0: vendor 8086 product 1c2d (rev. 0x04)
ehci0: interrupting at ioapic0 pin 16
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
usb0 at ehci0: USB revision 2.0
hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 22
hdafg0 at hdaudio0: vendor 10ec product 0269
hdafg0: DAC00 2ch: Speaker [Built-In], HP Out [Jack]
hdafg0: ADC01 2ch: Mic In [Jack]
hdafg0: 2ch/2ch 44100Hz 48000Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
hdvsmfg at hdaudio0 not configured
hdafg1 at hdaudio0: vendor 8086 product 2805
hdafg1: DP00 8ch: Digital Out [Jack]
hdafg1: 8ch/0ch 48000Hz PCM16*
ppb0 at pci0 dev 28 function 0: vendor 8086 product 1c10 (rev. 0xb4)
ppb0: PCI Express capability version 2  x1 @ 5.0GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
ppb1 at pci0 dev 28 function 1: vendor 8086 product 1c12 (rev. 0xb4)
ppb1: PCI Express capability version 2  x1 @ 5.0GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 1033 product 0194 (USB serial bus, xHCI, revision 0x04) at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 28 function 2: vendor 8086 product 1c14 (rev. 0xb4)
ppb2: PCI Express capability version 2  x1 @ 5.0GT/s
ppb2: link is x1 @ 2.5GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
iwn0 at pci3 dev 0 function 0: vendor 8086 product 0087 (rev. 0x5e)
iwn0: interrupting at ioapic0 pin 18
iwn0: MIMO 1T2R, MoW, address 64:80:99:45:17:f4
iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ppb3 at pci0 dev 28 function 3: vendor 8086 product 2448 (rev. 0xb4)
ppb3: PCI Express capability version 2  x1 @ 5.0GT/s
ppb3: link is x1 @ 2.5GT/s
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
cbb0 at pci4 dev 0 function 0: vendor 1180 product e476 (rev. 0x02)
cbb0: cacheline 0x0 lattimer 0x0
cbb0: bhlc 0x820000
cbb0: interrupting at ioapic0 pin 19
cardslot0 at cbb0
cardbus0 at cardslot0: bus 5
pcmcia0 at cardslot0
ppb4 at pci0 dev 28 function 4: vendor 8086 product 1c18 (rev. 0xb4)
ppb4: PCI Express capability version 2  x1 @ 5.0GT/s
ppb4: link is x1 @ 2.5GT/s
pci5 at ppb4 bus 13
pci5: i/o space, memory space enabled, rd/line, wr/inv ok
rtsx0 at pci5 dev 0 function 0: vendor 10ec product 5209 (rev. 0x01)
rtsx0: interrupting at msi1 vec 0
sdmmc0 at rtsx0
sdhc0 at pci5 dev 0 function 1: vendor 10ec product 5209 (rev. 0x01)
sdhc0: interrupting at ioapic0 pin 17
sdhc0: SDHC 1.0, rev 0, PIO, 32000 kHz, HS 3.0V 3.3V, 512 byte blocks
sdmmc1 at sdhc0 slot 0
ehci1 at pci0 dev 29 function 0: vendor 8086 product 1c26 (rev. 0x04)
ehci1: interrupting at ioapic0 pin 23
ehci1: BIOS has given up ownership
ehci1: EHCI version 1.0
usb1 at ehci1: USB revision 2.0
ichlpcib0 at pci0 dev 31 function 0: vendor 8086 product 1c4f (rev. 0x04)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
tco0 at ichlpcib0: TCO (watchdog) timer configured.
tco0: Min/Max interval 1/367 seconds
gpio0 at ichlpcib0: 64 pins
ahcisata0 at pci0 dev 31 function 2: vendor 8086 product 1c03 (rev. 0x04)
ahcisata0: interrupting at ioapic0 pin 19
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.30, 6 ports, 32 slots, CAP 0xef20ff45
atabus0 at ahcisata0 channel 0
atabus1 at ahcisata0 channel 1
ichsmb0 at pci0 dev 31 function 3: vendor 8086 product 1c22 (rev. 0x04)
ichsmb0: interrupting at ioapic0 pin 18
iic0 at ichsmb0: I2C bus
vendor 8086 product 1c24 (miscellaneous DASP, revision 0x04) at pci0 dev 31 function 6 not configured
isa0 at ichlpcib0
tpm0 at isa0 iomem 0xfed40000-0xfed44fff irq 7: IFX SLB 9635 TT 1.2 rev 0x10
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
attimer1: attached to pcppi0
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: FFH, lat   1 us, pow  1000 mW
acpicpu0: C2: FFH, lat  80 us, pow   500 mW
acpicpu0: P0: FFH, lat  10 us, pow 35000 mW, 2601 MHz, turbo boost
acpicpu0: P1: FFH, lat  10 us, pow 35000 mW, 2600 MHz
acpicpu0: P2: FFH, lat  10 us, pow 31470 mW, 2400 MHz
acpicpu0: P3: FFH, lat  10 us, pow 28074 mW, 2200 MHz
acpicpu0: P4: FFH, lat  10 us, pow 24816 mW, 2000 MHz
acpicpu0: P5: FFH, lat  10 us, pow 22002 mW, 1800 MHz
acpicpu0: P6: FFH, lat  10 us, pow 18989 mW, 1600 MHz
acpicpu0: P7: FFH, lat  10 us, pow 16106 mW, 1400 MHz
acpicpu0: P8: FFH, lat  10 us, pow 13638 mW, 1200 MHz
acpicpu0: P9: FFH, lat  10 us, pow 10989 mW, 1000 MHz
acpicpu0: P10: FFH, lat  10 us, pow  8461 mW,  800 MHz
acpicpu0: T0: FFH, lat   1 us, pow  8461 mW, 100 %
acpicpu0: T1: FFH, lat   1 us, pow  7896 mW,  94 %
acpicpu0: T2: FFH, lat   1 us, pow  7332 mW,  88 %
acpicpu0: T3: FFH, lat   1 us, pow  6768 mW,  82 %
acpicpu0: T4: FFH, lat   1 us, pow  6204 mW,  75 %
acpicpu0: T5: FFH, lat   1 us, pow  5640 mW,  69 %
acpicpu0: T6: FFH, lat   1 us, pow  5076 mW,  63 %
acpicpu0: T7: FFH, lat   1 us, pow  4512 mW,  57 %
acpicpu0: T8: FFH, lat   1 us, pow  3948 mW,  50 %
acpicpu0: T9: FFH, lat   1 us, pow  3384 mW,  44 %
acpicpu0: T10: FFH, lat   1 us, pow  2820 mW,  38 %
acpicpu0: T11: FFH, lat   1 us, pow  2256 mW,  32 %
acpicpu0: T12: FFH, lat   1 us, pow  1692 mW,  25 %
acpicpu0: T13: FFH, lat   1 us, pow  1128 mW,  19 %
acpicpu0: T14: FFH, lat   1 us, pow   564 mW,  13 %
coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=100
acpicpu1 at cpu1: ACPI CPU
coretemp1 at cpu1: thermal sensor, 1 C resolution, Tjmax=100
acpicpu2 at cpu2: ACPI CPU
acpicpu3 at cpu3: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
ERROR: 265 cycle TSC drift observed
acpiacad0: AC adapter online.
IPsec: Initialized Security Association Processing.
uhub0 at usb0: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
uhub1 at usb1: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
ahcisata0 port 0: device present, speed: 3.0Gb/s
drm: Enabling RC6 states: RC6 on, RC6p off, RC6pp off
ahcisata0 port 1: PHY offline
wd0 at atabus0 drive 0
wd0: 
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
uhub2 at uhub1 port 1: vendor 8087 product 0024, class 9/0, rev 2.00/0.00, addr 2
uhub2: single transaction translator
uhub2: 8 ports with 8 removable, self powered
uhub3 at uhub0 port 1: vendor 8087 product 0024, class 9/0, rev 2.00/0.00, addr 2
uhub3: single transaction translator
uhub3: 6 ports with 6 removable, self powered
umass0 at uhub2 port 2 configuration 1 interface 0
umass0: SanDisk Extreme, rev 2.10/0.10, addr 3
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0:  disk removable
umodem0 at uhub3 port 1 configuration 1 interface 1
umodem0: Ericsson F5521gw, rev 2.00/0.00, addr 3, iclass 2/2
umodem0: data interface 2, has CM over data, has break
umodem0: status change notification available
ucom0 at umodem0
umodem1 at uhub3 port 1 configuration 1 interface 3
umodem1: Ericsson F5521gw, rev 2.00/0.00, addr 3, iclass 2/2
umodem1: data interface 4, has CM over data, has break
umodem1: status change notification available
ucom1 at umodem1
umodem2 at uhub3 port 1 configuration 1 interface 9
umodem2: Ericsson F5521gw, rev 2.00/0.00, addr 3, iclass 2/2
umodem2: data interface 10, has CM over data, has break
umodem2: status change notification available
ucom2 at umodem2
sd0(umass0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Is in Process Of Becoming Ready

sd0: drive offline
sd0: fabricating a geometry
ugen0 at uhub3 port 3
ugen0: Intel(R) Corporation Intel(R) Centrino(R) Advanced-N + WiMAX 6250, rev 2.00/0.00, addr 4
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
kern.module.path=/stand/amd64/7.99.27/modules

PostgreSQLのOracle Foreign Data WrapperをWindowsで使う

はじめに

Oracle DatabaseにWindows上のMicrosoft ExcelからVBAでアクセスしたい。 個々の端末にODBCデータソースを設定するのはスクリプトで可能かもしれないが、面倒なのでADOとOLEDBの組み合わせでアクセスすることを考えている。 しかし、Oracle Instant Clientをアクセスする全ての端末にインストールするのは現実的ではない場合があると思う。 この場合のアクセスは読み取り専用であって、select文以外を処理できる必要はない。

そこで、PostgreSQLのOracle Foreign Data Wrapper Extensionを使って、PostgreSQL上にOracleのテーブルとビューを透過的に作成して、PostgreSQLのOLEDB Providerを端末にインストールし、OLEDBで参照するようにしたい。 つまり、Oracle同士でのDATABASE LINKのようなことをやりたい。

今回は理由があって最終的な環境では、サーバーはWindows Server 2012 R2 Standard (64-bit)で決まっている。 なので、全てWindows上で処理しなくてはならない。 空いているWindows環境がこれしかないと言う理由で、Windows 10 Home (64-bit)を使うことにした。 Oracle DatabaseとしてもOracle Database Express Edition 11g Release 2を新規にローカルにインストールして使うことにした。 PostgreSQLは9.5.2を使用し、これも新規にローカルにインストールして使う。

Oracle Databaseの準備

この記事を執筆している時点では、最新のOracle Express Editionは、Oracle Database Express Edition 11g Release 2である。 12系列のExpress Editionは存在していないようである。 Oracle Express Edition 11g Release 2Downloadsページより、x86_64のWindows用のバイナリーと言うことで、Oracle Database Express Edition 11g Release 2 for Windows x64をダウンロードしておく。 ダウンロードされたファイルは、OracleXE112_Win64.zipである。 これを展開しておき、DISK1ディレクトリーにあるsetup.exeを実行する。 特に既定値から変更することはなくインストールした。

sqlplusがインストールされるので起動させ、

> conn scott/tiger
のようにして、scott/tigerでログインし、サンプルデータを使おうと思ったが、そもそもscottユーザーが存在していない。 ウェブで検索すると、Oracle Express Edition 11g Release 2にはscottユーザーは存在せず、utlsampl.sqlを実行することで、旧来のOracle Database同様にこのデータが用意できるようである。 utlsampl.sqlで、C:\oraclexeディレクトリー以下を検索すると、
C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\utlsampl.sql
が存在するので、以下のようにして実行しておく。
> conn / as sysdba
> @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\utlsampl.sql
再度sqlplusでscott/tigerでログインしてみると、以下のようになる。
> conn scott/tiger
> select table_names from user_tables;
(DEPT、EMP、BONUS、SALGRADEが存在することを確認)
> desc emp;
(EMPの定義が表示できることを確認)
> select * from emp;
(EMPの内容が表示できることを確認)

最終的な環境では、Oracle Database上のビューをPostgreSQL経由で参照したいので、ビューの例を一つ作成しておく。

> conn / as sysdba
> create view scott.test_view as select * from scott.dept;
> select view_name from user_view;
(test_viewが表示されることを確認)

PostgreSQLの準備

PostgreSQL 9.5.2を使うことにしているので、EnterpriseDBのWebサイトより、postgresql-9.5.2-1-windows-x64.exeをダウンロードする。 インストールの途中では既定値からは変更はしなかった。

Oracle Foreign Data Wrapperのインストール

githubのoracle_fdwのリリースページより、今日時点の最新版であるバージョン1.4.0をダウンロードする。PostgreSQL 9.5用と言うことで、oracle_fdw-1.4.0-pg95-win64.zipをダウンロードする。 ZIPファイルを展開し、その中にあるlib、share、symbolsの3つのディレクトリーを、C:\Program Files\PostgreSQL\9.5にコピーする。既にそれらのディレクトリーは存在しているので、コピーするファイルを追加するようにする。 ここで、PostgreSQLのインストールに伴って作成されたスタートメニューのPostgreSQL 9.5というグループにあるReload Configurationを管理者として実行する。 これによって、oracle_fdwが認識されるようになるっぽい。

Oracle Foreign Data Wrapperの設定

この手順は、Connecting your PostgreSQL instance to an Oracle database – The PostgreSQL 9.5 wayが非常に参考になった。

PostgreSQL側にscottスキーマを作成し、Oracle Databaseのscottスキーマのテーブルとビューへの参照をそこに作成する方針である。

まずは、Oracle Foreign Data Wrapperが使用できる状態になっているか確認する。

# create extension oracle_fdw;
これが正常に作成でき、
# \dew
でoracle_fdwが表示されれば、Oracle Foreign Data Wrapperは使用できるようになっている。 Ocacle Express Edition 11g Release 2がインストールされていない Oracle Instant Clientだけがインストールされている環境では、 oci.dllが存在するディレクトリーがPATH環境変数に含まれていない場合が、一度あったので、PATH環境変数をまずは確認したら良いと思う。 他にもインストール時にコピーするファイルが不足していると、その旨のエラーメッセージが表示される。

以下のようにして、PostgreSQLでscottスキーマを作成する。ここにOracle Databaseのscottスキーマを参照する内容を展開する。

# create schema scott;

次に、参照するサーバーを設定する。 今回はOracle Database Express Edition 11g Release 2を参照するので、XEで識別される。 Oracle Database Express Edition以外の場合には、ローカルのtnsnames.oraの内容を確認しておく。

# create server remote_db foreign data wrapper oracle_fdw options (dbserver 'XE' );
ここで、dbserverとするのが昔とは違っているようなので注意点である。

次にユーザー名の変換規則を設定する。 今回は、Oracle Database側はユーザー名scott、パスワードtigerである。PostgreSQL側は、ユーザー名postgresでログインしているものとする。

# create user mapping for postgres server remote_db options (user 'SCOTT', password 'tiger');

次にOracle Databaseのscottスキーマの内容を全てPostgreSQLのscottスキーマに展開する。

# import foreign schema "SCOTT" from server remote_db into scott;

以下のようにして、全てのテーブルとビューに対して参照できるようになっていることを確認する。

# set search_path='scott';
# \d
(テーブルとビューへの参照の一覧が表示される)
# \d+ emp
(Oracle DatabaseのEMPに対応する項目定義が表示される)

課題

良く分からないのは、マルチバイト文字についてである。 今回の環境では、Oracle DatabaseはAL32UTF8であり、PostgreSQL側はSJISだと思うのだが、Oracle Database側のsqlplusで登録した日本語のレコードは、PostgreSQLのpsqlでも文字化けせずに見えてしまった。 PostgreSQLに接続するNetBSDのターミナルがmltermでUTF-8で使っているせいかもしれない。 コマンドプロンプトでも文字化けしないのは良く分からないが…

NetBSD on Vaio Pro 13 mk2

とある事情で、Vaio Pro 13 mk2をしばらく使う機会があったので、NetBSD/amd64を動かしてみた。7.0_STABLEと7.99.26をUSB stickにインストールしたlive imageで動かした結果を書いておく。

Synapticsのtouchpadも、ハードウェアキーになって使いやすくなったし、Ethernet (有線LAN) も搭載されるようになったので、使いやすくなったと思う。

currentと7.0_STABLEでの共通事項

USB 3.0 (xHCI)がGENERICカーネルでは無効になっているので使えない (おそらく有効にしても、まともには使えない) 以外は、 主要な機能で認識されないものはなかった。 X window systemも特に設定することなく使える (アクセラレーションが効いているかは、確認方法を理解していないため未確認)。 Vaio Pro 11では、起動前にSDカードをスロットに挿入しておかないと、SDカードリーダー自体が認識されなかったが、Vaio Pro 13 mk2では挿入しておかなくても、sdmmc0 at rtsx0として認識される。

VGA端子が搭載されるようになったが、使えるかは確認しなかった。

LCDの明るさを設定できないようであった。NetBSDのACPIの仕組みがこのマシンには合っていないのかもしれない。他にも同じ症状のマシンはあるので、追求しておかないといけないが、できていない。

NetBSD/amd64 currentの場合

Wi-Fiは、iwm(4)として認識され、特にエラー等は発生せずに使用できる。

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.99.26 (GENERIC) #0: Sat Mar 19 19:10:30 JST 2016
 ryo_on@carrotcake:/usr/world/7.99/amd64/obj/sys/arch/amd64/compile/GENERIC
total memory = 3997 MB
avail memory = 3862 MB
cpu_rng: RDSEED
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Generic PC
mainbus0 (root)
ACPI: RSDP 0x00000000000F0120 000024 (v02 VAIO  )
ACPI: XSDT 0x00000000A4FFD1C0 0000CC (v01 Sony   VAIO     20151201 PTEC 00000002)
ACPI: FACP 0x00000000A4FF9000 00010C (v05 Sony   VAIO     20151201 PTEC 00000002)
ACPI: DSDT 0x00000000A4FDD000 017A49 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: FACS 0x00000000A4F9A000 000040
ACPI: SLIC 0x00000000A4FFC000 000176 (v01 Sony   VAIO     20151201 PTEC 00000002)
ACPI: ASF! 0x00000000A4FFB000 0000A5 (v32 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: HPET 0x00000000A4FF8000 000038 (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: LPIT 0x00000000A4FF7000 000094 (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: APIC 0x00000000A4FF6000 000098 (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: MCFG 0x00000000A4FF5000 00003C (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: SSDT 0x00000000A4FDC000 000250 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: SSDT 0x00000000A4FD8000 0037AA (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: SSDT 0x00000000A4FD7000 000539 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: SSDT 0x00000000A4FD6000 000B74 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: SSDT 0x00000000A4FD0000 005458 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: SSDT 0x00000000A4FCF000 000394 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: PCCT 0x00000000A4FCE000 00006E (v05 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: SSDT 0x00000000A4FCD000 000AC4 (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: UEFI 0x00000000A4FCC000 000042 (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: MSDM 0x00000000A4F73000 000055 (v03 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: BATB 0x00000000A4FCB000 000046 (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: FPDT 0x00000000A4FCA000 000044 (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: SSDT 0x00000000A4FC9000 00004B (v02 VAIO   VAIO     20151201 INTL 20120711)
ACPI: UEFI 0x00000000A4FC8000 00030A (v01 VAIO   VAIO     20151201 PTEC 00000002)
ACPI: 9 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 40 pins
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
cpu1 at mainbus0 apid 1
cpu1: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
cpu2 at mainbus0 apid 2
cpu2: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
cpu3 at mainbus0 apid 3
cpu3: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
acpi0 at mainbus0: Intel ACPICA 20160108
acpi0: X/RSDT: OemId <  Sony,    VAIO,20151201>, AslId 
acpi0: MCFG: segment 0, bus 0-63, address 0x00000000f8000000
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE81071DD810 0003D3 (v02 PmRef  Cpu0Cst  00003001 INTL 20120711)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE81072A7010 0005AA (v02 PmRef  ApIst    00003000 INTL 20120711)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFE8107201B90 000119 (v02 PmRef  ApCst    00003000 INTL 20120711)
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
acpiec0 at acpi0 (EC0, PNP0C09)
: io 0x62,0x66
acpivga0 at acpi0 (GFX0): ACPI Display Adapter
acpiout0 at acpivga0 (DD01, 0x0100): ACPI Display Output Device
acpiout1 at acpivga0 (DD02, 0x0002): ACPI Display Output Device
acpiout2 at acpivga0 (DD03, 0x0300): ACPI Display Output Device
acpiout3 at acpivga0 (DD04, 0x0301): ACPI Display Output Device
acpiout4 at acpivga0 (DD05, 0x0302): ACPI Display Output Device
acpiout5 at acpivga0 (DD06, 0x0303): ACPI Display Output Device
acpiout6 at acpivga0 (DD07, 0x0304): ACPI Display Output Device
acpiout7 at acpivga0 (DD08, 0x0305): ACPI Display Output Device
acpiout8 at acpivga0 (DD09, 0x0009): ACPI Display Output Device
acpiout9 at acpivga0 (DD0A, 0x000a): ACPI Display Output Device
acpiout10 at acpivga0 (DD0B, 0x000b): ACPI Display Output Device
acpiout11 at acpivga0 (DD0C, 0x000c): ACPI Display Output Device
acpiout12 at acpivga0 (DD0D, 0x000d): ACPI Display Output Device
acpiout13 at acpivga0 (DD0E, 0x000e): ACPI Display Output Device
acpiout14 at acpivga0 (DD0F, 0x000f): ACPI Display Output Device
acpiout15 at acpivga0 (DD1F, 0x0400): ACPI Display Output Device
acpiout15: brightness levels: [0-100]
acpivga0: unknown output device acpiout0
acpivga0: unknown output device acpiout1
acpivga0: unknown output device acpiout2
acpivga0: unknown output device acpiout3
acpivga0: unknown output device acpiout4
acpivga0: unknown output device acpiout5
acpivga0: unknown output device acpiout6
acpivga0: unknown output device acpiout7
acpivga0: unknown output device acpiout8
acpivga0: unknown output device acpiout9
acpivga0: unknown output device acpiout10
acpivga0: unknown output device acpiout11
acpivga0: unknown output device acpiout12
acpivga0: unknown output device acpiout13
acpivga0: unknown output device acpiout14
acpivga0: connected output devices:
acpivga0:   0x0400 (acpiout15): Unknown Output Device, head 0
FWHD (INT0800) at acpi0 not configured
LDRC (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
CWDT (INT3F0D) at acpi0 not configured
pckbc1 at acpi0 (PS2K, VAI0002) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, SYN2711) (aux port): irq 12
SIRC (PNP0C02) at acpi0 not configured
PDRC (PNP0C02) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
acpilid0 at acpi0 (LID0, PNP0C0D): ACPI Lid Switch
acpiacad0 at acpi0 (ACAD, ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (BAT1, PNP0C0A-1): ACPI Battery
acpibat0: VAIO Corp.  LION rechargeable battery
acpibat0: granularity: low->warn 0.064 Wh, warn->full 0.064 Wh
PEPD (INT33A1) at acpi0 not configured
PTID (INT340E) at acpi0 not configured
PCCD (INT340F) at acpi0 not configured
acpitz0 at acpi0 (THRM): cpu0 cpu1 cpu2 cpu3
acpitz0: levels: critical 130.0 C, hot 102.0 C, passive 130.0 C, passive cooling
acpiwmi0 at acpi0 (WMTF, PNP0C14-TBFP): ACPI WMI Interface
acpiwmibus at acpiwmi0 not configured
ACPI: Enabled 5 GPEs in block 00 to 7F
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 8.1
pms0: Extended W mode, Palm detect, Multi-finger Report, Multi-finger
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 8086 product 1604 (rev. 0x09)
i915drmkms0 at pci0 dev 2 function 0: vendor 8086 product 1616 (rev. 0x09)
drm: Memory usable by graphics device = 4096M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier
i915drmkms0: More than 8 outputs detected via ACPI
intelfb0: framebuffer at 0xffff800047669000, size 1920x1080, depth 32, stride 7680
wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
hdaudio0 at pci0 dev 3 function 0: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 16
hdaudio0: timeout leaving reset state
hdaudio0: device driver failed to attach
vendor 8086 product 9cb1 (USB serial bus, xHCI, revision 0x03) at pci0 dev 20 function 0 not configured
vendor 8086 product 9cba (miscellaneous communications, revision 0x03) at pci0 dev 22 function 0 not configured
hdaudio1 at pci0 dev 27 function 0: HD Audio Controller
hdaudio1: interrupting at ioapic0 pin 22
hdafg0 at hdaudio1: vendor 10ec product 0233
hdafg0: DAC00 2ch: Speaker [Built-In], HP Out [Jack]
hdafg0: ADC01 2ch: Mic In [Jack]
hdafg0: ADC02 2ch: Mic In [Built-In]
hdafg0: 2ch/2ch 44100Hz 48000Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
ppb0 at pci0 dev 28 function 0: vendor 8086 product 9c98 (rev. 0xe3)
ppb0: PCI Express capability version 2  x1 @ 5.0GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
ppb1 at pci0 dev 28 function 2: vendor 8086 product 9c94 (rev. 0xe3)
ppb1: PCI Express capability version 2  x1 @ 5.0GT/s
ppb1: link is x1 @ 2.5GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
iwm0 at pci2 dev 0 function 0: vendor 8086 product 095a (rev. 0x59)
iwm0: interrupting at msi0 vec 0
ppb2 at pci0 dev 28 function 3: vendor 8086 product 9c96 (rev. 0xe3)
ppb2: PCI Express capability version 2  x1 @ 5.0GT/s
ppb2: link is x1 @ 2.5GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
rtsx0 at pci3 dev 0 function 0: vendor 10ec product 5227 (rev. 0x01)
rtsx0: interrupting at msi1 vec 0
sdmmc0 at rtsx0
ppb3 at pci0 dev 28 function 4: vendor 8086 product 9c90 (rev. 0xe3)
ppb3: PCI Express capability version 2  x1 @ 5.0GT/s
ppb3: link is x1 @ 2.5GT/s
pci4 at ppb3 bus 8
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
re0 at pci4 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x0c)
re0: interrupting at msi2 vec 0
re0: Ethernet address XX:XX:XX:XX:XX:XX
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8251 1000BASE-T media interface, rev. 0
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
ehci0 at pci0 dev 29 function 0: vendor 8086 product 9ca6 (rev. 0x03)
ehci0: interrupting at ioapic0 pin 23
ehci0: EHCI version 1.0
usb0 at ehci0: USB revision 2.0
ichlpcib0 at pci0 dev 31 function 0: vendor 8086 product 9cc5 (rev. 0x03)
timecounter: Timecounter "ichlpcib0" frequency 3579545 Hz quality 1000
ichlpcib0: 24-bit timer
tco0 at ichlpcib0: TCO (watchdog) timer configured.
tco0: Min/Max interval 1/367 seconds
gpio0 at ichlpcib0: 64 pins
ahcisata0 at pci0 dev 31 function 2: vendor 8086 product 9c83 (rev. 0x03)
ahcisata0: interrupting at ioapic0 pin 19
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.30, 2 ports, 32 slots, CAP 0xc734ff01
atabus0 at ahcisata0 channel 0
ichsmb0 at pci0 dev 31 function 3: vendor 8086 product 9ca2 (rev. 0x03)
ichsmb0: interrupting at ioapic0 pin 18
iic0 at ichsmb0: I2C bus
isa0 at ichlpcib0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
attimer1: attached to pcppi0
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: FFH, lat   1 us, pow  1000 mW
acpicpu0: C2: FFH, lat 230 us, pow   200 mW
acpicpu0: C3: FFH, lat 233 us, pow   200 mW
acpicpu0: P0: FFH, lat  10 us, pow 15000 mW, 2001 MHz, turbo boost
acpicpu0: P1: FFH, lat  10 us, pow 15000 mW, 2000 MHz
acpicpu0: P2: FFH, lat  10 us, pow 14088 mW, 1900 MHz
acpicpu0: P3: FFH, lat  10 us, pow 13193 mW, 1800 MHz
acpicpu0: P4: FFH, lat  10 us, pow 12317 mW, 1700 MHz
acpicpu0: P5: FFH, lat  10 us, pow 11459 mW, 1600 MHz
acpicpu0: P6: FFH, lat  10 us, pow 10617 mW, 1500 MHz
acpicpu0: P7: FFH, lat  10 us, pow  9796 mW, 1400 MHz
acpicpu0: P8: FFH, lat  10 us, pow  8199 mW, 1200 MHz
acpicpu0: P9: FFH, lat  10 us, pow  7426 mW, 1100 MHz
acpicpu0: P10: FFH, lat  10 us, pow  6670 mW, 1000 MHz
acpicpu0: P11: FFH, lat  10 us, pow  5932 mW,  900 MHz
acpicpu0: P12: FFH, lat  10 us, pow  5209 mW,  800 MHz
acpicpu0: P13: FFH, lat  10 us, pow  4502 mW,  700 MHz
acpicpu0: P14: FFH, lat  10 us, pow  3812 mW,  600 MHz
acpicpu0: P15: FFH, lat  10 us, pow  3137 mW,  500 MHz
acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  88 %
acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  76 %
acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  64 %
acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  52 %
acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  40 %
acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  28 %
acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  16 %
coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=105
acpicpu1 at cpu1: ACPI CPU
acpicpu2 at cpu2: ACPI CPU
coretemp1 at cpu2: thermal sensor, 1 C resolution, Tjmax=105
acpicpu3 at cpu3: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 1995527000 Hz quality 3000
acpiacad0: AC adapter online.
IPsec: Initialized Security Association Processing.
uhub0 at usb0: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ahcisata0 port 0: device present, speed: 6.0Gb/s
acpibat0: VAIO Corp.  LION rechargeable battery
acpibat0: granularity: low->warn 0.064 Wh, warn->full 0.064 Wh
wd0 at atabus0 drive 0
wd0: 
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 119 GB, 248085 cyl, 16 head, 63 sec, 512 bytes/sect x 250069680 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
uhub1 at uhub0 port 1: vendor 8087 product 8001, class 9/0, rev 2.00/0.03, addr 2
uhub1: single transaction translator
uhub1: 8 ports with 8 removable, self powered
umass0 at uhub1 port 2 configuration 1 interface 0
umass0: SanDisk Extreme, rev 2.10/0.10, addr 3
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0:  disk removable
sd0(umass0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Is in Process Of Becoming Ready

sd0: drive offline
sd0: fabricating a geometry
uvideo0 at uhub1 port 5 configuration 1 interface 0: Chicony Electronics Co.,Ltd. Front Camera, rev 2.01/58.30, addr 4
video0 at uvideo0: Chicony Electronics Co.,Ltd. Front Camera, rev 2.01/58.30, addr 4
ubt0 at uhub1 port 6
ubt0: vendor 8087 product 0a2a, rev 2.01/0.01, addr 5
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
kern.module.path=/stand/amd64/7.99.26/modules
iwm0: hw rev: 0x210, fw ver 25.228 (API ver 9), address XX:XX:XX:XX:XX:XX
iwm0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

NetBSD/amd64 7.0_STABLEの場合

Wi-Fiは認識されない。iwm(4)は7.0_STABLEには存在しないし、MSI/MSI-Xサポートが7.0_STABLEには存在しないので、移植するのは難しいのではないだろうか。

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 7.0_STABLE (GENERIC) #0: Sat Mar 19 20:36:53 JST 2016
 ryo_on@carrotcake:/usr/world/7/amd64/obj/sys/arch/amd64/compile/GENERIC
total memory = 3997 MB
avail memory = 3864 MB
kern.module.path=/stand/amd64/7.0/modules
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Generic PC
mainbus0 (root)
ACPI: RSDP 0xf0120 000024 (v02   VAIO)
ACPI: XSDT 0xa4ffd1c0 0000CC (v01   Sony     VAIO 20151201 PTEC 00000002)
ACPI: FACP 0xa4ff9000 00010C (v05   Sony     VAIO 20151201 PTEC 00000002)
ACPI: DSDT 0xa4fdd000 017A49 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: FACS 0xa4f9a000 000040
ACPI: SLIC 0xa4ffc000 000176 (v01   Sony     VAIO 20151201 PTEC 00000002)
ACPI: ASF! 0xa4ffb000 0000A5 (v32   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: HPET 0xa4ff8000 000038 (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: LPIT 0xa4ff7000 000094 (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: APIC 0xa4ff6000 000098 (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: MCFG 0xa4ff5000 00003C (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: SSDT 0xa4fdc000 000250 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: SSDT 0xa4fd8000 0037AA (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: SSDT 0xa4fd7000 000539 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: SSDT 0xa4fd6000 000B74 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: SSDT 0xa4fd0000 005458 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: SSDT 0xa4fcf000 000394 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: PCCT 0xa4fce000 00006E (v05   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: SSDT 0xa4fcd000 000AC4 (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: UEFI 0xa4fcc000 000042 (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: MSDM 0xa4f73000 000055 (v03   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: BATB 0xa4fcb000 000046 (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: FPDT 0xa4fca000 000044 (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: SSDT 0xa4fc9000 00004B (v02   VAIO     VAIO 20151201 INTL 20120711)
ACPI: UEFI 0xa4fc8000 00030A (v01   VAIO     VAIO 20151201 PTEC 00000002)
ACPI: All ACPI Tables successfully acquired
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 40 pins
cpu0 at mainbus0 apid 0: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
cpu1 at mainbus0 apid 1: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
cpu2 at mainbus0 apid 2: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
cpu3 at mainbus0 apid 3: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz, id 0x306d4
acpi0 at mainbus0: Intel ACPICA 20131218
acpi0: X/RSDT: OemId <  Sony,    VAIO,20151201>, AslId 
ACPI: SSDT 0xa4d7dc18 0003D3 (v02  PmRef  Cpu0Cst 00003001 INTL 20120711)
ACPI: SSDT 0x0 0003D3 (v02  PmRef  Cpu0Cst 00003001 INTL 20120711)
ACPI: SSDT 0xa4d7d618 0005AA (v02  PmRef    ApIst 00003000 INTL 20120711)
ACPI: SSDT 0x0 0005AA (v02  PmRef    ApIst 00003000 INTL 20120711)
ACPI: SSDT 0xa4d7cd98 000119 (v02  PmRef    ApCst 00003000 INTL 20120711)
ACPI: SSDT 0x0 000119 (v02  PmRef    ApCst 00003000 INTL 20120711)
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
acpiec0 at acpi0 (EC0, PNP0C09)
: io 0x62,0x66
acpivga0 at acpi0 (GFX0): ACPI Display Adapter
acpiout0 at acpivga0 (DD01, 0x0100): ACPI Display Output Device
acpiout1 at acpivga0 (DD02, 0x0002): ACPI Display Output Device
acpiout2 at acpivga0 (DD03, 0x0300): ACPI Display Output Device
acpiout3 at acpivga0 (DD04, 0x0301): ACPI Display Output Device
acpiout4 at acpivga0 (DD05, 0x0302): ACPI Display Output Device
acpiout5 at acpivga0 (DD06, 0x0303): ACPI Display Output Device
acpiout6 at acpivga0 (DD07, 0x0304): ACPI Display Output Device
acpiout7 at acpivga0 (DD08, 0x0305): ACPI Display Output Device
acpiout8 at acpivga0 (DD09, 0x0009): ACPI Display Output Device
acpiout9 at acpivga0 (DD0A, 0x000a): ACPI Display Output Device
acpiout10 at acpivga0 (DD0B, 0x000b): ACPI Display Output Device
acpiout11 at acpivga0 (DD0C, 0x000c): ACPI Display Output Device
acpiout12 at acpivga0 (DD0D, 0x000d): ACPI Display Output Device
acpiout13 at acpivga0 (DD0E, 0x000e): ACPI Display Output Device
acpiout14 at acpivga0 (DD0F, 0x000f): ACPI Display Output Device
acpiout15 at acpivga0 (DD1F, 0x0400): ACPI Display Output Device
acpiout15: brightness levels: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
acpivga0: unknown output device acpiout0
acpivga0: unknown output device acpiout1
acpivga0: unknown output device acpiout2
acpivga0: unknown output device acpiout3
acpivga0: unknown output device acpiout4
acpivga0: unknown output device acpiout5
acpivga0: unknown output device acpiout6
acpivga0: unknown output device acpiout7
acpivga0: unknown output device acpiout8
acpivga0: unknown output device acpiout9
acpivga0: unknown output device acpiout10
acpivga0: unknown output device acpiout11
acpivga0: unknown output device acpiout12
acpivga0: unknown output device acpiout13
acpivga0: unknown output device acpiout14
acpivga0: connected output devices:
acpivga0:   0x0400 (acpiout15): Unknown Output Device, head 0
FWHD (INT0800) at acpi0 not configured
LDRC (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
CWDT (INT3F0D) at acpi0 not configured
pckbc1 at acpi0 (PS2K, VAI0002) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, SYN2711) (aux port): irq 12
SIRC (PNP0C02) at acpi0 not configured
PDRC (PNP0C02) at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
acpilid0 at acpi0 (LID0, PNP0C0D): ACPI Lid Switch
acpiacad0 at acpi0 (ACAD, ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (BAT1, PNP0C0A-1): ACPI Battery
acpibat0: VAIO Corp.  LION rechargeable battery
acpibat0: granularity: low->warn 0.064 Wh, warn->full 0.064 Wh
PTID (INT340E) at acpi0 not configured
PCCD (INT340F) at acpi0 not configured
acpitz0 at acpi0 (THRM): cpu0 cpu1 cpu2 cpu3
acpitz0: levels: critical 130.0 C, hot 102.0 C, passive 130.0 C, passive cooling
acpiwmi0 at acpi0 (WMTF, PNP0C14-TBFP): ACPI WMI Interface
acpiwmibus at acpiwmi0 not configured
ACPI: Enabled 5 GPEs in block 00 to 7F
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20131218/hwxface-646)
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20131218/hwxface-646)
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 8.1
pms0: Extended W mode, Palm detect, Multi-finger Report, Multi-finger
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 0x8086 product 0x1604 (rev. 0x09)
i915drmkms0 at pci0 dev 2 function 0: vendor 0x8086 product 0x1616 (rev. 0x09)
drm: Memory usable by graphics device = 4096M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier
i915drmkms0: More than 8 outputs detected via ACPI
intelfb0: framebuffer at 0xffff80004766d000, size 1920x1080, depth 32, stride 7680
wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
hdaudio0 at pci0 dev 3 function 0: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 16
hdaudio0: timeout leaving reset state
hdaudio0: device driver failed to attach
vendor 0x8086 product 0x9cb1 (USB serial bus, xHCI, revision 0x03) at pci0 dev 20 function 0 not configured
vendor 0x8086 product 0x9cba (miscellaneous communications, revision 0x03) at pci0 dev 22 function 0 not configured
hdaudio1 at pci0 dev 27 function 0: HD Audio Controller
hdaudio1: interrupting at ioapic0 pin 22
hdafg0 at hdaudio1: Realtek product 0x0233
hdafg0: DAC00 2ch: Speaker [Built-In], HP Out [Jack]
hdafg0: ADC01 2ch: Mic In [Jack]
hdafg0: ADC02 2ch: Mic In [Built-In]
hdafg0: 2ch/2ch 44100Hz 48000Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
ppb0 at pci0 dev 28 function 0: vendor 0x8086 product 0x9c98 (rev. 0xe3)
ppb0: PCI Express capability version 2  x1 @ 5.0GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
ppb1 at pci0 dev 28 function 2: vendor 0x8086 product 0x9c94 (rev. 0xe3)
ppb1: PCI Express capability version 2  x1 @ 5.0GT/s
ppb1: link is x1 @ 2.5GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
vendor 0x8086 product 0x095a (miscellaneous network, revision 0x59) at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 28 function 3: vendor 0x8086 product 0x9c96 (rev. 0xe3)
ppb2: PCI Express capability version 2  x1 @ 5.0GT/s
ppb2: link is x1 @ 2.5GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
rtsx0 at pci3 dev 0 function 0: vendor 0x10ec product 0x5227 (rev. 0x01)
rtsx0: interrupting at ioapic0 pin 19
sdmmc0 at rtsx0
ppb3 at pci0 dev 28 function 4: vendor 0x8086 product 0x9c90 (rev. 0xe3)
ppb3: PCI Express capability version 2  x1 @ 5.0GT/s
ppb3: link is x1 @ 2.5GT/s
pci4 at ppb3 bus 8
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
re0 at pci4 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x0c)
re0: interrupting at ioapic0 pin 16
re0: Unknown revision (0x4c000000)
re0: Ethernet address XX:XX:XX:XX:XX:XX
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8251 1000BASE-T media interface, rev. 0
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
ehci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x9ca6 (rev. 0x03)
ehci0: interrupting at ioapic0 pin 23
ehci0: EHCI version 1.0
usb0 at ehci0: USB revision 2.0
pcib0 at pci0 dev 31 function 0: vendor 0x8086 product 0x9cc5 (rev. 0x03)
ahcisata0 at pci0 dev 31 function 2: vendor 0x8086 product 0x9c83 (rev. 0x03)
ahcisata0: interrupting at ioapic0 pin 19
ahcisata0: 64-bit DMA
ahcisata0: AHCI revision 1.30, 2 ports, 32 slots, CAP 0xc734ff01
atabus0 at ahcisata0 channel 0
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x9ca2 (rev. 0x03)
ichsmb0: interrupting at ioapic0 pin 18
iic0 at ichsmb0: I2C bus
isa0 at pcib0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
attimer1: attached to pcppi0
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: FFH, lat   1 us, pow  1000 mW
acpicpu0: C2: FFH, lat 230 us, pow   200 mW
acpicpu0: C3: FFH, lat 233 us, pow   200 mW
acpicpu0: P0: FFH, lat  10 us, pow 15000 mW, 2001 MHz, turbo boost
acpicpu0: P1: FFH, lat  10 us, pow 15000 mW, 2000 MHz
acpicpu0: P2: FFH, lat  10 us, pow 14088 mW, 1900 MHz
acpicpu0: P3: FFH, lat  10 us, pow 13193 mW, 1800 MHz
acpicpu0: P4: FFH, lat  10 us, pow 12317 mW, 1700 MHz
acpicpu0: P5: FFH, lat  10 us, pow 11459 mW, 1600 MHz
acpicpu0: P6: FFH, lat  10 us, pow 10617 mW, 1500 MHz
acpicpu0: P7: FFH, lat  10 us, pow  9796 mW, 1400 MHz
acpicpu0: P8: FFH, lat  10 us, pow  8199 mW, 1200 MHz
acpicpu0: P9: FFH, lat  10 us, pow  7426 mW, 1100 MHz
acpicpu0: P10: FFH, lat  10 us, pow  6670 mW, 1000 MHz
acpicpu0: P11: FFH, lat  10 us, pow  5932 mW,  900 MHz
acpicpu0: P12: FFH, lat  10 us, pow  5209 mW,  800 MHz
acpicpu0: P13: FFH, lat  10 us, pow  4502 mW,  700 MHz
acpicpu0: P14: FFH, lat  10 us, pow  3812 mW,  600 MHz
acpicpu0: P15: FFH, lat  10 us, pow  3137 mW,  500 MHz
acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  88 %
acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  76 %
acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  64 %
acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  52 %
acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  40 %
acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  28 %
acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  16 %
coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=105
acpicpu1 at cpu1: ACPI CPU
acpicpu2 at cpu2: ACPI CPU
coretemp1 at cpu2: thermal sensor, 1 C resolution, Tjmax=105
acpicpu3 at cpu3: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 1995491680 Hz quality 3000
acpiacad0: AC adapter online.
IPsec: Initialized Security Association Processing.
uhub0 at usb0: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ahcisata0 port 0: device present, speed: 6.0Gb/s
acpibat0: VAIO Corp.  LION rechargeable battery
acpibat0: granularity: low->warn 0.064 Wh, warn->full 0.064 Wh
wd0 at atabus0 drive 0
wd0: 
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 119 GB, 248085 cyl, 16 head, 63 sec, 512 bytes/sect x 250069680 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
uhub1 at uhub0 port 1: vendor 0x8087 product 0x8001, class 9/0, rev 2.00/0.03, addr 2
uhub1: single transaction translator
uhub1: 8 ports with 8 removable, self powered
umass0 at uhub1 port 4 configuration 1 interface 0
umass0: SanDisk Extreme, rev 2.10/0.10, addr 3
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0:  disk removable
sd0(umass0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Is in Process Of Becoming Ready

sd0: drive offline
sd0: fabricating a geometry
uvideo0 at uhub1 port 5 configuration 1 interface 0: Chicony Electronics Co.,Ltd. Front Camera, rev 2.01/58.30, addr 4
video0 at uvideo0: Chicony Electronics Co.,Ltd. Front Camera, rev 2.01/58.30, addr 4
ubt0 at uhub1 port 6
ubt0: vendor 0x8087 product 0x0a2a, rev 2.01/0.01, addr 5
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex, playback, capture
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs

Go言語で書かれたプログラムでHTTP/HTTPSプロキシーサーバーを指定する方法

kintone on Cybozu.comのデータをダウンロードしたり、アップロードしたりするためのソフトウェアとして、cli-kintoneというものが公開されている。 これは、subtableもexport/importできる大変に便利なソフトウェアである。

http/httpsなプロキシーサーバーの設置されている環境では、プロキシーサーバーを経由してcybozu.comにアクセスしないといけない。 しかし、Go言語で、プロキシーサーバーを使うようなコードの例が見当たらない。

良く調べてみると、Go言語で書かれたプログラムは、標準的に環境変数で指定されたプロキシーサーバーを指定できることが分かった。

HTTP_PROXY=http://username:password@proxy.local:8080/
HTTPS_PROXY=https://username:password@proxy.local:8080/

のように設定すれば良い。おそらくどちらか適切な方だけで良いはずだ。 これは、Windows環境でも同じで、システム環境変数かユーザー環境変数に指定しておけば良い。 ちなみに、環境変数NO_PROXYが存在すると、プロキシーサーバーは使用しないらしい。

NetBSDからneocities.orgにウェブサイトを展開してみる

この記事は、 NetBSD Advent Calendar 2024 の25日目の記事です。 はじめに NeoCities というウェブサイトのホスティングサービスがあります。 クラシックな感じな静的なファイルをホスティングしてくれるサービスですが、さすが...