Home > Erlang探索 > Shell Break模式下 ‘o’ 查看port消息

Shell Break模式下 ‘o’ 查看port消息

April 7th, 2010

原创文章,转载请注明: 转载自系统技术非业余研究

本文链接地址: Shell Break模式下 ‘o’ 查看port消息

这是未公开的一个特性, 很方便查看Erlang内部的port使用状态.

演示下:

root@ubuntu:~# erl
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1> 
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
o
=port:#Port<0.1>
Slot: 1
Connected: <0.3.0>
Links: <0.3.0>
Port controls linked-in driver: efile
=port:#Port<0.49>
Slot: 49
Connected: <0.18.0>
Links: <0.18.0>
Port controls linked-in driver: efile
=port:#Port<0.306>
Slot: 306
Connected: <0.21.0>
Links: <0.21.0>
Port is UNIX fd not opened by emulator: 2/2
=port:#Port<0.315>
Slot: 315
Connected: <0.23.0>
Links: <0.23.0>
Port controls linked-in driver: tty_sl -c -e

Post Footer automatically generated by wp-posturl plugin for wordpress.

Categories: Erlang探索 Tags:
  1. April 7th, 2010 at 09:31 | #1

    KAO!
    这么多好用的东西,一定是开发人员懒!不愿意细说!
    就靠 fu爷 挖掘了…

  2. 黑野兽
    April 7th, 2010 at 11:41 | #2

    又是隐藏属性!~老大一次发表太多文章,看不过来了,都.

Comments are closed.