
デバイスに次の奇妙な項目が表示されますmount
。
none on net:[4026532603] type proc (rw,relatime)
none on net:[4026532424] type proc (rw,relatime)
これが何なのか、なぜそうなのかご存知ですか? procf が /proc 以外の他の用途で使われるのを見たのは今回が初めてです。この「net:」とは何ですか?コンセントやパイプのようなものですか?
私はある種のBusyBoxベースのLinuxを使用する組み込みデバイスで3.8 rtカーネルを実行しています。
おそらく関連項目は次のとおりです/proc/mounts
。
rootfs / rootfs rw 0 0
none /proc proc rw,relatime 0 0
none net:[4026532603] proc rw,relatime 0 0
none net:[4026532424] proc rw,relatime 0 0
mgmt /sys sysfs rw,relatime 0 0
修正する:
@VenkatCの答えのおかげで、次の出力で確認されたように名前空間に関連していることがわかりました。
$ ls -l /proc/$$/ns
total 0
lrwxrwxrwx 1 root root 0 Nov 3 18:59 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 root root 0 Nov 3 18:59 mnt -> mnt:[4026532733]
lrwxrwxrwx 1 root root 0 Nov 3 18:59 net -> net:[4026532603]
lrwxrwxrwx 1 root root 0 Nov 3 18:59 pid -> pid:[4026531836]
lrwxrwxrwx 1 root root 0 Nov 3 18:59 uts -> uts:[4026531838]
答え1
これらのエントリはネットワークネームスペースに関連しています。 man 名前空間で(7)
The /proc/[pid]/ns/ directory
Each process has a /proc/[pid]/ns/ subdirectory containing one entry
for each namespace that supports being manipulated by setns(2):
$ ls -l /proc/$$/ns
total 0
lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 ipc -> ipc:[4026531839]
lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 mnt -> mnt:[4026531840]
lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 net -> net:[4026531956]
lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 pid -> pid:[4026531836]
lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 user -> user:[4026531837]
lrwxrwxrwx. 1 mtk mtk 0 Jan 14 01:20 uts -> uts:[4026531838]
ご覧のとおり順より高いエントリはネットワークネームスペースを参照します。問題のデバイスが複数の名前空間を使用して異なるプロセスを実行している可能性があることを理解してください。
テスト名前空間を作成し、/proc/mountsで同様のマウントを見ることができました。
[cv@cent2 ~]$ ip netns list
netns1
[cv@cent2 ~]$ grep net: /proc/mounts
proc net:[4026532238] proc rw,nosuid,nodev,noexec,relatime 0 0
proc net:[4026532238] proc rw,nosuid,nodev,noexec,relatime 0 0
答え2
死んだ接続のように見えますnfs
。あるいは、aufs
aufsを持つnfsのRO rootfs(またはliveCD)のようなものかもしれません。
数値 (4026532603 および 4026532424) を 32 ビット整数として解釈して IP アドレス形式に変換すると、次のようになります。
4026532603 => 240.0.2.72
4026532424 => 240.0.2.251
240.0.0.0/4は「今後の使用のために予約されています」(https://www.rfc-editor.org/rfc/rfc6890)...おそらく、ループバックインターフェイスのどれかによって使用することができます。どのような組み込みデバイスですか?
+----------------------+----------------------+
| Attribute | Value |
+----------------------+----------------------+
| Address Block | 240.0.0.0/4 |
| Name | Reserved |
| RFC | [RFC1112], Section 4 |
| Allocation Date | August 1989 |
| Termination Date | N/A |
| Source | False |
| Destination | False |
| Forwardable | False |
| Global | False |
| Reserved-by-Protocol | True |
+----------------------+----------------------+
(非公開リンクRFC1112、セクション4)
これらのIPアドレスへの接続またはリスニングがあったか、netstat
公開されていますか?lsof