GithubHelp home page GithubHelp logo

portsnoop's Introduction

portsnoop: trace event port activity

portsnoop is a DTrace script to trace event port activity on illumos-based systems. It traces:

* port\_get or port\_getn when either one fails or returns at least 1 event
* the first 30 events returned by each port\_get or port\_getn invocation
* all calls to port\_associate and port\_dissociate
* calls to read, write, accept, or close between a returned event and a call
  to port\_associate for the same file descriptor

There are probably useful cases that are missing. Contributions welcome.

Here's an example of watching Node.js:

TIME        TID  SYSCALL             FD  DETAILS                    ERROR      
 12.208422    1  port_associate       6  0x01
 12.242194    1  port_associate       9  0x01
 12.255736    1  port_getn            -  1 events
 12.274277    1   PORT_SOURCE_FD      9  fdevents 0x01
 12.328980    1      read             9  = 385                    
 12.271295    1  port_associate       9  0x01
 12.288007    1  port_getn            -  1 events
 12.298038    1   PORT_SOURCE_FD      4  fdevents 0x01
 12.328153    1      read             4  = 1                      
 12.629188    1  port_associate       4  0x01
 12.645012    1  port_getn            -  1 events
 12.654589    1   PORT_SOURCE_FD      4  fdevents 0x01
 12.682737    1      read             4  = 1                      
 12.416725    1  port_associate       4  0x01
 12.432715    1  port_getn            -  1 events
 12.442648    1   PORT_SOURCE_FD      4  fdevents 0x01
 12.471463    1      read             4  = 1                      
 12.508922    1  port_associate       4  0x01
 12.521278    1  port_getn            -  1 events
 12.528865    1   PORT_SOURCE_FD      4  fdevents 0x01
 12.553993    1      read             4  = 1                      
 12.574697    1  port_associate       4  0x01
 12.822090    1  port_getn            -  1 events
 12.831173    1   PORT_SOURCE_FD      6  fdevents 0x01
 12.869254    1      accept           6  = 11                     
 12.088036    1      accept           6  = -1                       (errno = 11)
 12.125804    1  port_associate       6  0x01
 12.149611    1  port_associate      11  0x01
 13.033215    1  port_getn            -  1 events
 13.043168    1   PORT_SOURCE_FD      6  fdevents 0x01
 13.078822    1      accept           6  = 12                     
 13.145472    1      accept           6  = 23                     
 13.194127    1      accept           6  = -1                       (errno = 11)
 13.225361    1  port_associate       6  0x01
 13.248414    1  port_associate      12  0x01
 13.269476    1  port_associate      23  0x01
 13.310552    1  port_getn            -  1 events
 13.320322    1   PORT_SOURCE_FD      6  fdevents 0x01
 13.353921    1      accept           6  = 30                     
 13.431817    1      accept           6  = 37                     
 13.478750    1      accept           6  = -1                       (errno = 11)
 13.510167    1  port_associate       6  0x01
 13.533580    1  port_associate      30  0x01
 13.554498    1  port_associate      37  0x01

portsnoop's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.