IET
cat /proc/net/iet/session
查看targetid 和target name对应关系
open-iscsi
查看服务状态
/etc/iscsi/iscsid.conf
The configuration file read by iscsid and iscsiadm on startup.
/etc/iscsi/initiatorname.iscsi
The file containing the iSCSI InitiatorName and InitiatorAlias read by iscsid and iscsiadm on startup.
/etc/iscsi/nodes/
This directory contains the nodes with their targets.
/etc/iscsi/send_targets
This directory contains the portals.
open-iscsi代码调用堆栈
====================send scsi======================= 0xffffffffa038df66 : iscsi_queuecommand+0x0/0x3aa [libiscsi] 0xffffffffa0029d78 : scsi_dispatch_cmd+0x180/0x240 [scsi_mod] 0xffffffffa002f565 : scsi_request_fn+0x4c8/0x4f4 [scsi_mod] 0xffffffff811b4d06 : __blk_run_queue_uncond+0x1e/0x26 [kernel] 0xffffffff811b4ddf : queue_unplugged+0x54/0x78 [kernel] 0xffffffff811b594f : blk_flush_plug_list+0x1b1/0x1c8 [kernel] 0xffffffff811b5971 : blk_finish_plug+0xb/0x2a [kernel] 0xffffffff8113dc42 : do_blockdev_direct_IO+0x964/0xae8 [kernel] 0xffffffff8113b0e8 : blkdev_direct_IO+0x4e/0x53 [kernel] 0xffffffff810c83ea : generic_file_aio_read+0xd8/0x5b9 [kernel] 0xffffffff8111212f : do_sync_read+0x55/0x7c [kernel] 0xffffffff81112ba9 : vfs_read+0x93/0xf5 [kernel] 0xffffffff81112d22 : SyS_read+0x51/0x80 [kernel] 0xffffffff8139ea69 : system_call_fastpath+0x16/0x1b [kernel] *************************recv scsi******************** 0xffffffffa038b74a : __iscsi_put_task+0x0/0xd8 [libiscsi] 0xffffffffa038b89d : iscsi_xmit_task+0x7b/0x8b [libiscsi] 0xffffffffa038f534 : iscsi_xmitworker+0x188/0x0 [libiscsi] 0xffffffff81054862 : process_one_work+0x191/0x294 [kernel] 0xffffffff81054aab : worker_thread+0x121/0x1e7 [kernel] 0xffffffff81059295 : kthread+0x81/0x89 [kernel] 0xffffffff8139e9bc : ret_from_fork+0x7c/0xb0 [kernel] *************************recv scsi******************** 0xffffffffa038b74a : __iscsi_put_task+0x0/0xd8 [libiscsi] 0xffffffffa038ea6a : __iscsi_complete_pdu+0x6df/0x70c [libiscsi] 0xffffffffa038f093 : iscsi_complete_pdu+0x3c/0x5a [libiscsi] 0xffffffffa03557b5 : iscsi_tcp_process_data_in+0x42/0x4b [libiscsi_tcp] 0xffffffffa0355ef8 : iscsi_tcp_recv_skb+0x2da/0x342 [libiscsi_tcp] 0xffffffffa03956ea : iscsi_sw_tcp_recv+0x65/0xbe [iscsi_tcp] 0xffffffff8130b8c5 : tcp_read_sock+0x6b/0x143 [kernel] 0xffffffffa0395fe7 : iscsi_sw_tcp_data_ready+0x4c/0x0 [iscsi_tcp] 0xffffffff8130f0c0 : tcp_data_queue+0x3d8/0x8c9 [kernel] 0xffffffff81311bb4 : tcp_rcv_established+0x3bf/0x43a [kernel] 0xffffffff8131a2f7 : tcp_v4_do_rcv+0x1d3/0x3d8 [kernel] 0xffffffff8131af4b : tcp_v4_rcv+0x268/0x50b [kernel] 0xffffffff812fe402 : ip_local_deliver_finish+0xe0/0x156 [kernel] 0xffffffff812d5f63 : __netif_receive_skb_core+0x447/0x4bf [kernel] 0xffffffff812d61b6 : netif_receive_skb+0x4c/0x7d [kernel] 0xffffffff812d6931 : napi_gro_receive+0x35/0x76 [kernel] 0xffffffffa0124603 : bnx2x_rx_int+0x94a/0x10aa [bnx2x] 0xffffffffa0124dd0 : bnx2x_poll+0x6d/0x1ad [bnx2x] 0xffffffff812d66cd : net_rx_action+0xa7/0x1dc [kernel] 0xffffffff8104373f : __do_softirq+0xec/0x209 [kernel] ====================send scsi======================= 0xffffffffa038df66 : iscsi_queuecommand+0x0/0x3aa [libiscsi] 0xffffffffa0029d78 : scsi_dispatch_cmd+0x180/0x240 [scsi_mod] 0xffffffffa002f565 : scsi_request_fn+0x4c8/0x4f4 [scsi_mod] 0xffffffff811b4d06 : __blk_run_queue_uncond+0x1e/0x26 [kernel] 0xffffffff811b84d0 : blk_execute_rq_nowait+0xa8/0xd1 [kernel] 0xffffffff811b8592 : blk_execute_rq+0x99/0xf7 [kernel] 0xffffffffa002e563 : scsi_execute+0xb3/0x132 [scsi_mod] 0xffffffffa002f69a : scsi_execute_req_flags+0x85/0xbd [scsi_mod] 0xffffffffa002fb67 : scsi_test_unit_ready+0x79/0xe5 [scsi_mod] 0xffffffffa0095b51 : sd_check_events+0xb9/0x116 [sd_mod] 0xffffffff811bbc19 : disk_check_events+0x40/0xe5 [kernel] 0xffffffff81054862 : process_one_work+0x191/0x294 [kernel] 0xffffffff81054aab : worker_thread+0x121/0x1e7 [kernel] 0xffffffff81059295 : kthread+0x81/0x89 [kernel] 0xffffffff8139e9bc : ret_from_fork+0x7c/0xb0 [kernel] *************************recv scsi******************** 0xffffffffa038b74a : __iscsi_put_task+0x0/0xd8 [libiscsi] 0xffffffffa038b89d : iscsi_xmit_task+0x7b/0x8b [libiscsi] 0xffffffffa038f534 : iscsi_xmitworker+0x188/0x0 [libiscsi] 0xffffffff81054862 : process_one_work+0x191/0x294 [kernel] 0xffffffff81054aab : worker_thread+0x121/0x1e7 [kernel] 0xffffffff81059295 : kthread+0x81/0x89 [kernel] 0xffffffff8139e9bc : ret_from_fork+0x7c/0xb0 [kernel] *************************recv scsi******************** 0xffffffffa038b74a : __iscsi_put_task+0x0/0xd8 [libiscsi] 0xffffffffa038ea6a : __iscsi_complete_pdu+0x6df/0x70c [libiscsi] 0xffffffffa038f093 : iscsi_complete_pdu+0x3c/0x5a [libiscsi] 0xffffffffa03566b8 : iscsi_tcp_hdr_recv_done+0x758/0x0 [libiscsi_tcp] 0xffffffffa0355ef8 : iscsi_tcp_recv_skb+0x2da/0x342 [libiscsi_tcp] 0xffffffffa03956ea : iscsi_sw_tcp_recv+0x65/0xbe [iscsi_tcp] 0xffffffff8130b8c5 : tcp_read_sock+0x6b/0x143 [kernel] 0xffffffffa0395fe7 : iscsi_sw_tcp_data_ready+0x4c/0x0 [iscsi_tcp] 0xffffffff81311afc : tcp_rcv_established+0x307/0x43a [kernel] 0xffffffff8131a2f7 : tcp_v4_do_rcv+0x1d3/0x3d8 [kernel] 0xffffffff8131af4b : tcp_v4_rcv+0x268/0x50b [kernel] 0xffffffff812fe402 : ip_local_deliver_finish+0xe0/0x156 [kernel] 0xffffffff812d5f63 : __netif_receive_skb_core+0x447/0x4bf [kernel] 0xffffffff812d61b6 : netif_receive_skb+0x4c/0x7d [kernel] 0xffffffff812d6931 : napi_gro_receive+0x35/0x76 [kernel] 0xffffffffa0124b8e : bnx2x_rx_int+0xed5/0x10aa [bnx2x] 0xffffffffa0124dd0 : bnx2x_poll+0x6d/0x1ad [bnx2x] 0xffffffff812d66cd : net_rx_action+0xa7/0x1dc [kernel] 0xffffffff8104373f : __do_softirq+0xec/0x209 [kernel] 0xffffffff8139fe1c : call_softirq+0x1c/0x30 [kernel]
原文地址:http://blog.csdn.net/zjufirefly/article/details/42083821