npm install tcapUses pcap to inspect tchannel traffic over a network interface.
``
Usage: tcap [options]
Options:
-h, --help output usage information
-V, --version output the version number
-i --interface
-p --port
-f --filter
-s --service
use "~service-name" to exclude the service
-t --thrift
-1 --arg1
use "~arg1-method" to exclude the arg1
--m1 show arg1 name in call responses
-r --response
-b --buffer-size
-x --hex show hex dumps for all packets
--inspect show JSON dumps for all parsed frames
--color enables colors if not connected to a tty.
--no-color disables colors if connected to a tty.
`
To monitor tchannel traffic on ports 4040 and 4041 over the loopback and first
ethernet interface on a Mac:
``
tcap -i lo0 -i en0 -p 4040 -p 4041
Note that the interface names differ on other systems. Use ifconfig.
On Linux, ensure that the libpcap headers are available to the build toolchain. On Debian or Ubuntu:
sudo apt-get install libpcap-dev
Install tcap either in your project, or globally as depicted:
npm install uber/tcap -g
npm test
- npm run add-licence This will add the licence headers.npm run cover
- This runs the tests with code coveragenpm run lint
- This will run the linter on your codenpm test
- This will run the tests.npm run trace
- This will run your tests in tracing mode.npm run travis
- This is run by travis.CI to run your testsnpm run view-cover` This will show code coverage in a browser
-
- kriskowal
- shannili
[build-png]: https://secure.travis-ci.org/uber/tcap.png
[build]: https://travis-ci.org/uber/tcap
[cover-png]: https://coveralls.io/repos/uber/tcap/badge.png
[cover]: https://coveralls.io/r/uber/tcap
[dep-png]: https://david-dm.org/uber/tcap.png
[dep]: https://david-dm.org/uber/tcap
[test-png]: https://ci.testling.com/uber/tcap.png
[tes]: https://ci.testling.com/uber/tcap
[npm-png]: https://nodei.co/npm/tcap.png?stars&downloads
[npm]: https://nodei.co/npm/tcap