Created
September 23, 2013 01:41
-
-
Save ferd/6665591 to your computer and use it in GitHub Desktop.
tiny demo of the port_info function from recon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1> {ok,Port}=gen_tcp:connect("google.com", 80, []), | |
| 1> gen_tcp:send(Port,"GET /"), | |
| 1> recon:port_info(Port). % also: recon:port_info("#Port<0.826>") or recon:port_info(826) | |
| [{meta,[{id,6672}, | |
| {name,"tcp_inet"}, | |
| {os_pid,undefined}, | |
| {parallelism,false}]}, | |
| {signals,[{connected,<0.48.0>}, | |
| {links,[<0.48.0>]}, | |
| {monitors,[]}]}, | |
| {io,[{input,0},{output,5}]}, | |
| {memory_used,[{memory,40},{queue_size,0}]}, | |
| {type,[{statistics,[{recv_oct,0}, % inet specific data | |
| {recv_cnt,0}, | |
| {recv_max,0}, | |
| {recv_avg,0}, | |
| {recv_dvi,0}, | |
| {send_oct,5}, | |
| {send_cnt,1}, | |
| {send_max,5}, | |
| {send_avg,5}, | |
| {send_pend,0}]}, | |
| {peername,{{173,194,43,7},80}}, | |
| {sockname,{{97,107,140,172},58772}}, | |
| {options,[{active,true}, | |
| {broadcast,false}, | |
| {buffer,1460}, | |
| {delay_send,false}, | |
| {dontroute,false}, | |
| {exit_on_close,true}, | |
| {header,0}, | |
| {high_watermark,8192}, | |
| {keepalive,false}, | |
| {linger,{false,0}}, | |
| {low_watermark,4096}, | |
| {mode,list}, | |
| {nodelay,false}, | |
| {packet,0}, | |
| {packet_size,...}, | |
| {...}|...]}]}] | |
| 2> recon:files(). | |
| [#Port<0.0>,#Port<0.103>,#Port<0.610>] | |
| 3> recon:port_info("#Port<0.103>"). | |
| [{meta,[{id,824}, | |
| {name,"efile"}, | |
| {os_pid,undefined}, | |
| {parallelism,false}]}, | |
| {signals,[{connected,<0.18.0>}, | |
| {links,[<0.18.0>]}, | |
| {monitors,[]}]}, | |
| {io,[{input,69},{output,39}]}, | |
| {memory_used,[{memory,40},{queue_size,0}]}, | |
| {type,[]}] | |
| 4> recon:port_info(610). | |
| [{meta,[{id,4880}, | |
| {name,"efile"}, | |
| {os_pid,undefined}, | |
| {parallelism,false}]}, | |
| {signals,[{connected,<0.33.0>}, | |
| {links,[<0.33.0>]}, | |
| {monitors,[]}]}, | |
| {io,[{input,314188},{output,34668}]}, | |
| {memory_used,[{memory,40},{queue_size,0}]}, | |
| {type,[]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment