netstatの出力がおかしい

前から気になっていたんだけど、netstatにbスイッチとaスイッチを付けると不穏なメッセージが表示されるんだよね。

D:\>netstat -abn

アクティブな接続

  プロトコル  ローカル アドレス          外部アドレス        状態
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING

 所有者情報を取得できません

x: Windows Sockets を初期化できませんでした: 5

日本語で検索してもほとんど出てこないんだけど、誰もbスイッチは使わないのかな。

Microsoft Connectというサイトに記述があった。

Hi Mark, there was a bogus message print in the Vista version of netstat.exe that will display “x: Windows Sockets initialization failed: 5” everytime netstat fails to open a process handle for displaying the ownership information (needed only in the -b switch). A user mode process cannot open a handle to system process because of security reasons and netstat will display “Can not obtain ownership information” for such endpoints or connections owned by system process. The bogus error message is removed in windows 7 and you should no longer see it if you try it on Windows 7 RC builds (when they are available to you).

http://connect.microsoft.com/WNDP/feedback/ViewFeedback.aspx?FeedbackID=391292

こんにちはマーク。Vistaのバージョンのnetstat.exeには、所有者の情報を表示しようとしてプロセスのハンドルを開き損なうたびに毎回「x: Windows Sockets を初期化できませんでした: 5」が(bスイッチを付けた時にだけ)出るという意味不明なメッセージがある。いくつかセキュリティ上の理由から、ユーザーモードプロセスはシステムプロセスのハンドルを開くことが出来ないので、システムプロセスが持つエンドポイントや接続に対してnetstatは「所有者情報を取得できません」と表示する。この意味不明なエラーメッセージはwindows 7で除去されたから、もしWindows 7 リリース候補ビルドで試しても出ないはず(もし試せるならね)。

やたらと言い訳がましくて上手く訳せないけど、要するに「そのうち修正されるだろうから気にすんな」だ。

ちなみに、bogusの意味だがWiktionaryに記述があった。ここでも日本語の情報(英和辞典)は参考にならない。

The current use to mean useless is probably from the slang of computer hackers.

http://en.wiktionary.org/wiki/bogus

uselessを表す現在の意味は恐らくコンピュータ・ハッカーの俗語から来ている。