0

i am trying to run this script , and it shows no tcp connections any ideas? OS: centos 6.3

#! /usr/bin/env stap

probe begin {
  printf("%6s %16s %6s %6s %16s\n",
         "UID", "CMD", "PID", "PORT", "IP_SOURCE")
}

probe kernel.function("tcp_accept").return?,
      kernel.function("inet_csk_accept").return? {
  sock = $return
  if (sock != 0)
    printf("%6d %16s %6d %6d %16s\n", uid(), execname(), pid(),
           inet_get_local_port(sock), inet_get_ip_source(sock))
}

OUTPUT:

[root@server src]# ./tcp_con.stp 
   Missing separate debuginfos, use: debuginfo-install kernel-2.6.32-279.1.1.el6.centos.plus.x86_64 
   UID              CMD    PID   PORT        IP_SOURCE
krisdigitx
  • 7,068
  • 20
  • 61
  • 97

1 Answers1

2

Follow systemtap's advice and install kernel-debuginfo. The question marks after both kernel.function() probes let stap quietly drop both of those.

fche
  • 2,641
  • 20
  • 28
  • centos-plus does not the kernel-debug RPM, however all these are installed:kernel-firmware-2.6.32-279.14.1.el6.centos.plus.noarch kernel-devel-2.6.32-279.1.1.el6.centos.plus.x86_64 kernel-2.6.32-279.1.1.el6.centos.plus.x86_64 kernel-headers-2.6.32-279.1.1.el6.centos.plus.x86_64 – krisdigitx Nov 28 '12 at 14:30