| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/systemtap-1.0/examples/network/ |
Upload File : |
#!/usr/bin/stap
############################################################
# netdev.stp
# Author: Breno Leitao <leitao@linux.vnet.ibm.com>
# An example script to show how a netdev works and its
# functions
############################################################
probe netdev.get_stats{
printf("%s was asked for statistics structure\n", dev_name)
}
probe netdev.register{
printf("Registering netdev_name %s\n", dev_name)
}
probe netdev.unregister{
printf("Unregistering netdev %s\n", dev_name)
}
probe netdev.ioctl{
printf("Netdev ioctl raised with param: %d and arg: %s\n", cmd, arg)
}
probe netdev.set_promiscuity {
if (enable)
printf("Device %s entering in promiscuous mode\n", dev_name)
else
printf("Device %s leaving promiscuous mode\n", dev_name)
}
probe netdev.change_rx_flag {
printf("Device %s is changing its RX flags to %d\n", dev_name, flags)
}
probe netdev.change_mtu {
printf("Changing MTU on device %s from %d to %d\n", dev_name,
old_mtu, new_mtu)
}
probe netdev.change_mac {
printf("Changing MAC address on device %s from %s to %s\n",
dev_name, old_mac, new_mac)
}
probe netdev.transmit {
printf("Device %s is sending (queued) a packet with protocol %d\n", dev_name, protocol)
}
probe netdev.hard_transmit {
printf("Device %s is sending (hard) a packet with protocol %d\n", dev_name, protocol)
}
probe netdev.rx {
printf("Device %s received a packet with protocol %d\n", dev_name, protocol)
}