使用Crash工具查看一个TCP listen sock内存布局实例
利用crash工具,我们可以很方便的查看正在运行内核的一些全局变量的数据结构,如TCP的ehash、bhash哈希桶,全局变量的查看比较简单。Crash工具还允许我们查看调用堆栈内部的局部变量,下面示例查看一个进程的listen sock结构(实际上从file->private_data中查看更为方便)
******@Inspiron:~$nc -lk 45678
#接着在另一个终端上运行下面命令
root@Inspiron:/home/******$ps -aux | grep 45678
- ******
5184 0.0 0.0 9184 816 pts/23 S+ 23:20 0:00 nc -lk 45678
root 5187 0.0 0.0 15984 944 pts/20 S+ 23:20 0:00 grep --color=auto 45678
root@Inspiron:/home/******$crash
crash 7.1.4
Copyright(C)2002-2015 RedHat,Inc.
Copyright(C)2004,2005,2006,2010 IBM Corporation
Copyright(C)1999-2006 Hewlett-PackardCo
Copyright(C)2005,2006,2011,2012 FujitsuLimited
Copyright(C)2006,2007 VA LinuxSystemsJapan K.K.
Copyright(C)2005,2011 NEC Corporation
Copyright(C)1999,2002,2007 SiliconGraphics,Inc.
Copyright(C)1999,2000,2001,2002 MissionCriticalLinux,Inc.
This program is free software, covered by the GNU GeneralPublicLicense,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter"help copying" to see the conditions.
This program has absolutely no warranty. Enter"help warranty"for details.
GNU gdb (GDB)7.6
Copyright(C)2013FreeSoftwareFoundation,Inc.
LicenseGPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type"show copying"
and "show warranty"for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
crash: read error: kernel virtual address: ffffffff81a11e30 type:"cpu_possible_mask"
crash: this kernel may be configured with CONFIG_STRICT_DEVMEM, which
renders /dev/mem unusable as a live memory source.
crash: trying /proc/kcore as an alternative to /dev/mem
KERNEL:/lib/modules/4.4.13+/build/vmlinux
DUMPFILE:/proc/kcore
CPUS:4
DATE:MonNov 723:20:532016
UPTIME:02:28:15
LOAD AVERAGE:1.10,0.86,0.77
TASKS:663
NODENAME: ******-Inspiron-N5010
RELEASE:4.4.13+
VERSION:#5 SMP Sat Nov 5 15:51:12 CST 2016
MACHINE: x86_64 (2526Mhz)
MEMORY:3.9 GB
PID:5191
COMMAND:"crash"
TASK: ffff88006fc80000 [THREAD_INFO: ffff8800672bc000]
CPU:1
STATE: TASK_RUNNING (ACTIVE)
crash>set pid 5184
set: invalid task or pid value: pid
PID:5184
COMMAND:"nc"
TASK: ffff880035687080 [THREAD_INFO: ffff88006ca34000]
CPU:2
STATE: TASK_INTERRUPTIBLE
crash> bt
PID:5184 TASK: ffff880035687080 CPU:2 COMMAND:"nc"
#0 [ffff88006ca37ca0] __schedule at ffffffff81825b8e
#1 [ffff88006ca37cf0] schedule at ffffffff81826275
#2 [ffff88006ca37d08] schedule_timeout at ffffffff81829395
#3 [ffff88006ca37db8] inet_csk_accept at ffffffff81766b8b
#4 [ffff88006ca37e30] inet_accept at ffffffff8179897c
#5 [ffff88006ca37e68] SYSC_accept4 at ffffffff816fe523
#6 [ffff88006ca37f40] sys_accept at ffffffff81700110
#7 [ffff88006ca37f50] entry_SYSCALL_64_fastpath at ffffffff8182a372
RIP:00007fb0c2b504b0 RSP:00007ffd3bde40c8 RFLAGS:00000246
RAX: ffffffffffffffda RBX:0000000001978010 RCX:00007fb0c2b504b0
RDX:00007ffd3bde4154 RSI:00007ffd3bde41e0 RDI:0000000000000003
RBP:0000000000000000 R8:0000000000000000 R9:0000000000000000
R10:000000000000071a R11:0000000000000246 R12:0000000000000005
R13:0000000000405a21 R14:0000000000000000 R15:0000000000000000
ORIG_RAX:000000000000002b CS:0033 SS:002b
crash> bt -f
PID:5184 TASK: ffff880035687080 CPU:2 COMMAND:"nc"
#0 [ffff88006ca37ca0] __schedule at ffffffff81825b8e
ffff88006ca37ca8: ffffffff811e9d79 ffff880132818c80
ffff88006ca37cb8: ffff880035687080 ffff88006ca38000
ffff88006ca37cc8: ffff88006ca37e3c 7fffffffffffffff
ffff88006ca37cd8: ffff880035687080 ffff880106ad8780
ffff88006ca37ce8: ffff88006ca37d00 ffffffff81826275
#1 [ffff88006ca37cf0] schedule at ffffffff81826275
ffff88006ca37cf8:7fffffffffffffff ffff88006ca37db0
ffff88006ca37d08: ffffffff81829395
#2 [ffff88006ca37d08] schedule_timeout at ffffffff81829395
ffff88006ca37d10:7fffffffffffffff ffffffff81d6021d
ffff88006ca37d20:00000000000000000000000000000000
ffff88006ca37d30:00000000000000000000000000000000
ffff88006ca37d40:00000000000000000000000600000001
ffff88006ca37d50:00000000000000000000000000000246
ffff88006ca37d60:7fffffffffffffff ffff88006ca37d78
ffff88006ca37d70: ffffffff81829eae 0000000028c4ff93
ffff88006ca37d80: ffffffff817033ad 7fffffffffffffff
ffff88006ca37d90: ffff88006ca37e3c 7fffffffffffffff
ffff88006ca37da0: ffff880035687080 ffff880106ad8780
ffff88006ca37db0: ffff88006ca37e28 ffffffff81766b8b
#3 [ffff88006ca37db8] inet_csk_accept at ffffffff81766b8b
ffff88006ca37dc0: ffff880035687080 ffff880035687080
ffff88006ca37dd0:0000000000000001 ffff880035687080
ffff88006ca37de0: ffffffff810c2a80 ffff88006c990908
ffff88006ca37df0: ffff88006c990908 0000000028c4ff93
ffff88006ca37e00: ffff88009a505b80 ffff88009a505400
ffff88006ca37e10:000000000000000400007ffd3bde41e0
ffff88006ca37e20: ffff88009a505400 ffff88006ca37e60
#从inet_csk_accept反汇编代码中可以确定listen sock存储与R15寄存器,在函数调用过程中,R15寄存器存于调用堆栈中,如下代码push %r15
crash> dis -l schedule_timeout
/home/******/MyRes/linux-source-4.4.0/kernel/time/timer.c:1494
0xffffffff818291e0<schedule_timeout>: data32 data32 data32 xchg %ax,%ax [FTRACE NOP]
0xffffffff818291e5<schedule_timeout+5>: push %rbp
0xffffffff818291e6<schedule_timeout+6>: mov %rsp,%rbp
0xffffffff818291e9<schedule_timeout+9>: push %r15
0xffffffff818291eb<schedule_timeout+11>: push %r14
0xffffffff818291ed<schedule_timeout+13>: push %r13
0xffffffff818291ef<schedule_timeout+15>: push %r12
0xffffffff818291f1<schedule_timeout+17>: push %rbx
0xffffffff818291f2<schedule_timeout+18>: and $0xfffffffffffffff0,%rsp
0xffffffff818291f6<schedule_timeout+22>: sub $0x70,%rsp
0xffffffff818291fa<schedule_timeout+26>: mov %gs:0x28,%rax
0xffffffff81829203<schedule_timeout+35>: mov %rax,0x68(%rsp)
0xffffffff81829208<schedule_timeout+40>: xor %eax,%eax
/home/******/MyRes/linux-source-4.4.0/kernel/time/timer.c:1498
0xffffffff8182920a<schedule_timeout+42>: movabs $0x7fffffffffffffff,%rax
0xffffffff81829214<schedule_timeout+52>: cmp %rax,%rdi
0xffffffff81829217<schedule_timeout+55>: je 0xffffffff8182938c<schedule_timeout+428>
/home/******/MyRes/linux-source-4.4.0/kernel/time/timer.c:1518
0xffffffff8182921d<schedule_timeout+61>: test %rdi,%rdi
0xffffffff81829220<schedule_timeout+64>: js 0xffffffff81829422<schedule_timeout+578>
/home/******/MyRes/linux-source-4.4.0/kernel/time/timer.c:1527
#从bt -f显示的调用堆栈中确定在运行inet_csk_accept函数的时候,R15寄存器的值为ffff880106ad8780,取出listen sock地址
crash> struct sock ffff880106ad8780
struct sock {
__sk_common ={
{
skc_addrpair =0,
{
skc_daddr =0,
skc_rcv_saddr =0
}
},
{
skc_hash =0,
skc_u16hashes ={0,0}
},
{
skc_portpair =2993553408,
{
skc_dport =0,
skc_num =45678
}
},
skc_family =2,
skc_state =10'\n',
skc_reuse =1'\001',
skc_reuseport =0'\000',
skc_ipv6only =0'\000',
skc_net_refcnt =1'\001',
debug =0'\000',
skc_bound_dev_if =0,
{
skc_bind_node ={
next =0x0,
pprev =0xffff88006c9909e8
},
skc_portaddr_node ={
next =0x0,
pprev =0xffff88006c9909e8
}
},
skc_prot =0xffffffff81efa160<tcp_prot>,
skc_net ={
net =0xffffffff81ef3e00<init_net>
},
skc_v6_daddr ={
in6_u ={
u6_addr8 ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
u6_addr16 ={0,0,0,0,0,0,0,0},
u6_addr32 ={0,0,0,0}
}
},
skc_v6_rcv_saddr ={
in6_u ={
u6_addr8 ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
u6_addr16 ={0,0,0,0,0,0,0,0},
u6_addr32 ={0,0,0,0}
}
},
skc_cookie ={
counter =0
},
{
skc_flags =768,
skc_listener =0x300,
skc_tw_dr =0x300
},
skc_dontcopy_begin =0xffff880106ad87e8,
{
skc_node ={
next =0x4000000d,
pprev =0xffffffff821f61a8<tcp_hashinfo+168>
},
skc_nulls_node ={
next =0x4000000d,
pprev =0xffffffff821f61a8<tcp_hashinfo+168>
}
},
skc_tx_queue_mapping =-1,
{
skc_incoming_cpu =-1,
skc_rcv_wnd =4294967295,
skc_tw_rcv_nxt =4294967295
},
skc_refcnt ={
counter =1
},
skc_dontcopy_end =0xffff880106ad8804,
{
skc_rxhash =0,
skc_window_clamp =0,
skc_tw_snd_nxt =0
}
},
sk_lock ={
slock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
},
owned =0,
wq ={
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
},
task_list ={
next =0xffff880106ad8818,
prev =0xffff880106ad8818
}
}
},
sk_receive_queue ={
next =0xffff880106ad8828,
prev =0xffff880106ad8828,
qlen =0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
}
},
sk_backlog ={
rmem_alloc ={
counter =0
},
len =0,
head =0x0,
tail =0x0
},
sk_forward_alloc =0,
sk_txhash =0,
sk_napi_id =0,
sk_ll_usec =0,
sk_drops ={
counter =0
},
sk_rcvbuf =87380,
sk_filter =0x0,
{
sk_wq =0xffff88006c990900,
sk_wq_raw =0xffff88006c990900
},
sk_policy ={0x0,0x0},
sk_rx_dst =0x0,
sk_dst_cache =0x0,
sk_wmem_alloc ={
counter =1
},
sk_omem_alloc ={
counter =0
},
sk_sndbuf =16384,
sk_write_queue ={
next =0xffff880106ad88b0,
prev =0xffff880106ad88b0,
qlen =0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
}
},
sk_shutdown =0,
sk_no_check_tx =0,
sk_no_check_rx =0,
sk_userlocks =8,
sk_protocol =6,
sk_type =1,
sk_wmem_queued =0,
sk_allocation =37748928,
sk_pacing_rate =4294967295,
sk_max_pacing_rate =4294967295,
sk_route_caps =0,
sk_route_nocaps =0,
sk_gso_type =0,
sk_gso_max_size =0,
sk_gso_max_segs =0,
sk_rcvlowat =1,
sk_lingertime =0,
sk_error_queue ={
next =0xffff880106ad8908,
prev =0xffff880106ad8908,
qlen =0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
}
},
sk_prot_creator =0xffffffff81efa160<tcp_prot>,
sk_callback_lock ={
raw_lock ={
cnts ={
counter =0
},
wait_lock ={
val ={
counter =0
}
}
}
},
sk_err =0,
sk_err_soft =0,
sk_ack_backlog =0,
sk_max_ack_backlog =1,
sk_priority =0,
sk_cgrp_prioidx =1,
sk_peer_pid =0x0,
sk_peer_cred =0x0,
sk_rcvtimeo =9223372036854775807,
sk_sndtimeo =9223372036854775807,
sk_timer ={
entry ={
next =0x0,
pprev =0x0
},
expires =0,
function=0xffffffff8177d710<tcp_keepalive_timer>,
data =18446612136721221504,
flags =2,
slack =-1,
start_pid =-1,
start_site =0x0,
start_comm ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
},
sk_stamp ={
tv64 =-1000000000
},
sk_tsflags =0,
sk_tskey =0,
sk_socket =0xffff88009a505b80,
sk_user_data =0x0,
sk_frag ={
page =0x0,
offset =0,
size =0
},
sk_send_head =0x0,
sk_peek_off =-1,
sk_write_pending =0,
sk_security =0xffff88006caaf340,
sk_mark =0,
sk_classid =0,
sk_cgrp =0x0,
sk_state_change =0xffffffff81701ee0<sock_def_wakeup>,
sk_data_ready =0xffffffff81702930<sock_def_readable>,
sk_write_space =0xffffffff8170f670<sk_stream_write_space>,
sk_error_report =0xffffffff81702840<sock_def_error_report>,
sk_backlog_rcv =0xffffffff81781da0<tcp_v4_do_rcv>,
sk_destruct =0xffffffff817998f0<inet_sock_destruct>
}
crash> struct inet_connection_sock ffff880106ad8780
struct inet_connection_sock {
icsk_inet ={
sk ={
__sk_common ={
{
skc_addrpair =0,
{
skc_daddr =0,
skc_rcv_saddr =0
}
},
{
skc_hash =0,
skc_u16hashes ={0,0}
},
{
skc_portpair =2993553408,
{
skc_dport =0,
skc_num =45678
}
},
skc_family =2,
skc_state =10'\n',
skc_reuse =1'\001',
skc_reuseport =0'\000',
skc_ipv6only =0'\000',
skc_net_refcnt =1'\001',
debug =0'\000',
skc_bound_dev_if =0,
{
skc_bind_node ={
next =0x0,
pprev =0xffff88006c9909e8
},
skc_portaddr_node ={
next =0x0,
pprev =0xffff88006c9909e8
}
},
skc_prot =0xffffffff81efa160<tcp_prot>,
skc_net ={
net =0xffffffff81ef3e00<init_net>
},
skc_v6_daddr ={
in6_u ={
u6_addr8 ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
u6_addr16 ={0,0,0,0,0,0,0,0},
u6_addr32 ={0,0,0,0}
}
},
skc_v6_rcv_saddr ={
in6_u ={
u6_addr8 ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
u6_addr16 ={0,0,0,0,0,0,0,0},
u6_addr32 ={0,0,0,0}
}
},
skc_cookie ={
counter =0
},
{
skc_flags =768,
skc_listener =0x300,
skc_tw_dr =0x300
},
skc_dontcopy_begin =0xffff880106ad87e8,
{
skc_node ={
next =0x4000000d,
pprev =0xffffffff821f61a8<tcp_hashinfo+168>
},
skc_nulls_node ={
next =0x4000000d,
pprev =0xffffffff821f61a8<tcp_hashinfo+168>
}
},
skc_tx_queue_mapping =-1,
{
skc_incoming_cpu =-1,
skc_rcv_wnd =4294967295,
skc_tw_rcv_nxt =4294967295
},
skc_refcnt ={
counter =1
},
skc_dontcopy_end =0xffff880106ad8804,
{
skc_rxhash =0,
skc_window_clamp =0,
skc_tw_snd_nxt =0
}
},
sk_lock ={
slock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
},
owned =0,
wq ={
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
},
task_list ={
next =0xffff880106ad8818,
prev =0xffff880106ad8818
}
}
},
sk_receive_queue ={
next =0xffff880106ad8828,
prev =0xffff880106ad8828,
qlen =0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
}
},
sk_backlog ={
rmem_alloc ={
counter =0
},
len =0,
head =0x0,
tail =0x0
},
sk_forward_alloc =0,
sk_txhash =0,
sk_napi_id =0,
sk_ll_usec =0,
sk_drops ={
counter =0
},
sk_rcvbuf =87380,
sk_filter =0x0,
{
sk_wq =0xffff88006c990900,
sk_wq_raw =0xffff88006c990900
},
sk_policy ={0x0,0x0},
sk_rx_dst =0x0,
sk_dst_cache =0x0,
sk_wmem_alloc ={
counter =1
},
sk_omem_alloc ={
counter =0
},
sk_sndbuf =16384,
sk_write_queue ={
next =0xffff880106ad88b0,
prev =0xffff880106ad88b0,
qlen =0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
}
},
sk_shutdown =0,
sk_no_check_tx =0,
sk_no_check_rx =0,
sk_userlocks =8,
sk_protocol =6,
sk_type =1,
sk_wmem_queued =0,
sk_allocation =37748928,
sk_pacing_rate =4294967295,
sk_max_pacing_rate =4294967295,
sk_route_caps =0,
sk_route_nocaps =0,
sk_gso_type =0,
sk_gso_max_size =0,
sk_gso_max_segs =0,
sk_rcvlowat =1,
sk_lingertime =0,
sk_error_queue ={
next =0xffff880106ad8908,
prev =0xffff880106ad8908,
qlen =0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
}
},
sk_prot_creator =0xffffffff81efa160<tcp_prot>,
sk_callback_lock ={
raw_lock ={
cnts ={
counter =0
},
wait_lock ={
val ={
counter =0
}
}
}
},
sk_err =0,
sk_err_soft =0,
sk_ack_backlog =0,
sk_max_ack_backlog =1,
sk_priority =0,
sk_cgrp_prioidx =1,
sk_peer_pid =0x0,
sk_peer_cred =0x0,
sk_rcvtimeo =9223372036854775807,
sk_sndtimeo =9223372036854775807,
sk_timer ={
entry ={
next =0x0,
pprev =0x0
},
expires =0,
function=0xffffffff8177d710<tcp_keepalive_timer>,
data =18446612136721221504,
flags =2,
slack =-1,
start_pid =-1,
start_site =0x0,
start_comm ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
},
sk_stamp ={
tv64 =-1000000000
},
sk_tsflags =0,
sk_tskey =0,
sk_socket =0xffff88009a505b80,
sk_user_data =0x0,
sk_frag ={
page =0x0,
offset =0,
size =0
},
sk_send_head =0x0,
sk_peek_off =-1,
sk_write_pending =0,
sk_security =0xffff88006caaf340,
sk_mark =0,
sk_classid =0,
sk_cgrp =0x0,
sk_state_change =0xffffffff81701ee0<sock_def_wakeup>,
sk_data_ready =0xffffffff81702930<sock_def_readable>,
sk_write_space =0xffffffff8170f670<sk_stream_write_space>,
sk_error_report =0xffffffff81702840<sock_def_error_report>,
sk_backlog_rcv =0xffffffff81781da0<tcp_v4_do_rcv>,
sk_destruct =0xffffffff817998f0<inet_sock_destruct>
},
pinet6 =0x0,
inet_saddr =0,
uc_ttl =-1,
cmsg_flags =0,
inet_sport =28338,
inet_id =0,
inet_opt =0x0,
rx_dst_ifindex =0,
tos =0'\000',
min_ttl =0'\000',
mc_ttl =1'\001',
pmtudisc =1'\001',
recverr =0'\000',
is_icsk =1'\001',
freebind =0'\000',
hdrincl =0'\000',
mc_loop =1'\001',
transparent =0'\000',
mc_all =1'\001',
nodefrag =0'\000',
bind_address_no_port =0'\000',
rcv_tos =0'\000',
convert_csum =0'\000',
uc_index =0,
mc_index =0,
mc_addr =0,
mc_list =0x0,
cork ={
base ={
flags =0,
addr =0,
opt =0x0,
fragsize =0,
length =0,
dst =0x0,
tx_flags =0'\000',
ttl =0'\000',
tos =0,
priority =0'\000'
},
fl ={
u ={
__fl_common ={
flowic_oif =0,
flowic_iif =0,
flowic_mark =0,
flowic_tos =0'\000',
flowic_scope =0'\000',
flowic_proto =0'\000',
flowic_flags =0'\000',
flowic_secid =0,
flowic_tun_key ={
tun_id =0
}
},
ip4 ={
__fl_common ={
flowic_oif =0,
flowic_iif =0,
flowic_mark =0,
flowic_tos =0'\000',
flowic_scope =0'\000',
flowic_proto =0'\000',
flowic_flags =0'\000',
flowic_secid =0,
flowic_tun_key ={
tun_id =0
}
},
saddr =0,
daddr =0,
uli ={
ports ={
dport =0,
sport =0
},
icmpt ={
type =0'\000',
code =0'\000'
},
dnports ={
dport =0,
sport =0
},
spi =0,
gre_key =0,
mht ={
type =0'\000'
}
}
},
ip6 ={
__fl_common ={
flowic_oif =0,
flowic_iif =0,
flowic_mark =0,
flowic_tos =0'\000',
flowic_scope =0'\000',
flowic_proto =0'\000',
flowic_flags =0'\000',
flowic_secid =0,
flowic_tun_key ={
tun_id =0
}
},
daddr ={
in6_u ={
u6_addr8 ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
u6_addr16 ={0,0,0,0,0,0,0,0},
u6_addr32 ={0,0,0,0}
}
},
saddr ={
in6_u ={
u6_addr8 ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000",
u6_addr16 ={0,0,0,0,0,0,0,0},
u6_addr32 ={0,0,0,0}
}
},
flowlabel =0,
uli ={
ports ={
dport =0,
sport =0
},
icmpt ={
type =0'\000',
code =0'\000'
},
dnports ={
dport =0,
sport =0
},
spi =0,
gre_key =0,
mht ={
type =0'\000'
}
}
},
dn ={
__fl_common ={
flowic_oif =0,
flowic_iif =0,
flowic_mark =0,
flowic_tos =0'\000',
flowic_scope =0'\000',
flowic_proto =0'\000',
flowic_flags =0'\000',
flowic_secid =0,
flowic_tun_key ={
tun_id =0
}
},
daddr =0,
saddr =0,
uli ={
ports ={
dport =0,
sport =0
},
icmpt ={
type =0'\000',
code =0'\000'
},
dnports ={
dport =0,
sport =0
},
spi =0,
gre_key =0,
mht ={
type =0'\000'
}
}
}
}
}
}
},
icsk_accept_queue ={
rskq_lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
},
rskq_defer_accept =0'\000',
synflood_warned =0,
qlen ={
counter =0
},
young ={
counter =0
},
rskq_accept_head =0x0,
rskq_accept_tail =0x0,
fastopenq ={
rskq_rst_head =0x0,
rskq_rst_tail =0x0,
lock ={
{
rlock ={
raw_lock ={
val ={
counter =0
}
}
}
}
},
qlen =0,
max_qlen =0
}
},
icsk_bind_hash =0xffff88006c9909c0,
icsk_timeout =0,
icsk_retransmit_timer ={
entry ={
next =0x0,
pprev =0x0
},
expires =0,
function=0xffffffff8177e850<tcp_write_timer>,
data =18446612136721221504,
flags =2,
slack =-1,
start_pid =-1,
start_site =0x0,
start_comm ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
},
icsk_delack_timer ={
entry ={
next =0x0,
pprev =0x0
},
expires =0,
function=0xffffffff8177dd10<tcp_delack_timer>,
data =18446612136721221504,
flags =2,
slack =-1,
start_pid =-1,
start_site =0x0,
start_comm ="\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
},
icsk_rto =250,
icsk_pmtu_cookie =0,
icsk_ca_ops =0xffffffff81f3e2e0<cubictcp>,
icsk_af_ops =0xffffffff81ac1fc0<ipv4_specific>,
icsk_sync_mss =0xffffffff81778240<tcp_sync_mss>,
icsk_ca_state =0'\000',
icsk_ca_setsockopt =0'\000',
icsk_ca_dst_locked =0'\000',
icsk_retransmits =0'\000',
icsk_pending =0'\000',
icsk_backoff =0'\000',
icsk_syn_retries =0'\000',
icsk_probes_out =0'\000',
icsk_ext_hdr_len =0,
icsk_ack ={
pending =0'\000',
quick =0'\000',
pingpong =0'\000',
blocked =0'\000',
ato =0,
timeout =0,
lrcvtime =0,
last_seg_size =0,
rcv_mss =0
},
icsk_mtup ={
enabled =0,
search_high =0,
search_low =0,
probe_size =0,
probe_timestamp =0
},
icsk_user_timeout =0,
icsk_ca_priv ={0,0,0,0,0,0,0,0}
}
crash>
crash>
crash>
crash>
crash>
使用Crash工具查看一个TCP listen sock内存布局实例的更多相关文章
- 利用jmap和MAT等工具查看JVM运行时堆内存
jmap JDK自带了一些工具可以帮助我们查看JVM运行的堆内存情况,常用的是jmap命令 jmap -heap <pid> 打印堆的使用情况 那么,从这个输出中我们也可以大致看出堆的结构 ...
- windows下使用adb工具查看android程序cpu和内存消耗情况
在实际的开发当中,尤其软件运行在一个硬件设备比较差的环境下,对软件占用资源大的问题是开发者们必须要解决的问题,系统比较卡.觉得应该看看程序的cpu和内存消耗 一直以来都在windows下编程,已经习惯 ...
- 一个Java对象的内存布局
1.对象的创建过程 class loading class linking(verification,preparation,resolution) class initializing 申请对象内存 ...
- 查看struct或class的内存布局
适用于VC编译器(Visual Studio) 附加选项: /d1 reportSingleClassLayout[foo] 例如CItem(注意后面没有空格) /d1 reportSingleCla ...
- wireshark抓包工具简介以及tcp三次握手的一些含义
wireshark是非常流行的网络封包分析软件,功能十分强大.可以截取各种网络封包,显示网络封包的详细信息.使用wireshark的人必须了解网络协议,否则就看不懂wireshark了.为了安全考虑, ...
- 查看JVM运行时堆内存
利用jmap和MAT等工具查看JVM运行时堆内存 https://www.cnblogs.com/cjsblog/p/9561375.html jmap JDK自带了一些工具可以帮助我们查看JVM运行 ...
- 一个suse11 sp1的crash工具版本问题
这几年排查的各种类型的crash也比较多了,各种类型的也算见过,但是排查这个crash,走了不该走的弯路,事后显得很low,为了防止自己犯类似错误,也同时提醒后人,记录之. 内核是suse11,sp1 ...
- 使用Crash工具分析 Linux dump文件【转】
转自:https://blog.csdn.net/bytxl/article/details/45025183 前言 Linux 内核(以下简称内核)是一个不与特定进程相关的功能集合,内核的代码很难轻 ...
- 使用 Crash 工具分析 Linux dump 文件
转自:http://blog.csdn.net/commsea/article/details/11804897 简介: Linux 内核由于其复杂性,使得对内核出现的各种异常的追踪变得异常困难.本文 ...
随机推荐
- 【转】netty源码分析之LengthFieldBasedFrameDecoder
原文:https://www.jianshu.com/p/a0a51fd79f62 拆包的原理 关于拆包原理的上一篇博文 netty源码分析之拆包器的奥秘 中已详细阐述,这里简单总结下:netty的拆 ...
- Deep Learning Tutorial 李宏毅(一)深度学习介绍
大纲 深度学习介绍 深度学习训练的技巧 神经网络的变体 展望 深度学习介绍 深度学习介绍 深度学习属于机器学习的一种.介绍深度学习之前,我们先大致了解一下机器学习. 机器学习,拿监督学习为例,其本质上 ...
- spark-client 一直 accepted,无法提交任务,报错Failed to connect to driver at
这个问题的原因有几个: 1.客户端安装的机器一般是虚拟机,虚拟机的名称可能是随便搞的,然而,yarn-client模式提交任务,是默认把本机当成driver的.所以导致其他的机器无法通过host的na ...
- [SYZOJ279]滑♂稽♂树
主♂席♂树♂裸♂题 https://syzoj.com/problem/279 https://oj.changjun.com.cn/problem/detail/pid/2425 // It is ...
- mongodb原生node驱动
写在前面 最近读<node.js学习指南>,对于mongodb没有介绍太多的工作原理,但是对于一个前端开发者,即使你还没有用过这种数据库也可以让你很好的理解和使用 一本非常好的 ...
- Linux之linux入门
学习linux之前先了解一下操作系统: 操作系统的定义: 操作系统(英语:operating system,缩写作 OS)是管理计算机硬件与软件资源的计算机程序,同时也是计算机系统的内 ...
- MySQL与DevC++的连接问题
0.引言 MySQL作为当前的一个主流的开源的关系型数据库,受到大家的广泛关注.DevC++也作为一个开源的简单的C++编辑器,有着比VS更简便更快捷的编译.但是目前网上,却很少有对 MySQL连接D ...
- 180918-JDK之Deflater压缩与Inflater解压
JDK 压缩与解压工具类 在实际的应用场景中,特别是对外传输数据时,将原始数据压缩之后丢出去,可以说是非常常见的一个case了,平常倒是没有直接使用JDK原生的压缩工具类,使用Protosutff和K ...
- 自动化工具 fastmonkey
Android Monkey 二次开发,实现高速点击的 Android Monkey 一.工具介绍: 1.本工具是testhome上 zhangzhao_lenovo开源出来的工具,源码暂时还未开源: ...
- 关于jsp中引用css外部样式无效时的处理方法
今天做项目遇到的一个小问题,如下所示: <link href="./bootstrap/css/bootstrap.min.css" rel="stylesheet ...