{"_id":"kang","_rev":"64-265ead34dabf7a90b5c156534d194f4f","name":"kang","dist-tags":{"latest":"1.3.0"},"versions":{"0.0.1":{"name":"kang","version":"0.0.1","_id":"kang@0.0.1","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./cmd/kang.js"},"dist":{"shasum":"20281714e5b8538f987b752ab8bb3fd2f6c7d360","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.1.tgz","integrity":"sha512-vFQoBlZcUUvl7JAF6p0Lj5FaNKMGQEchiSAutYyb+DnJKzdJ+F2Nl5xyrquzqx1Dj0tKIPCYY/gIEIWK7kiJHw==","signatures":[{"sig":"MEQCIBSkfedtwFcMj/ROIbhsQQYFK48wRmsHSXNHK9uT5q3pAiA/04tI+6mSwnmanFsRA0Ly36GETk1gt+0AAkvgILYBJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.1.4","description":"debugging for distributed systems","directories":{},"_nodeVersion":"v0.6.10","dependencies":{"restify":"1.2.0","posix-getopt":"0.0.1"},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"optionalDependencies":{}},"0.0.2":{"name":"kang","version":"0.0.2","_id":"kang@0.0.2","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./cmd/kang.js"},"dist":{"shasum":"e64f6434b0bb5a7c1bd908b5b0718e61d2990231","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.2.tgz","integrity":"sha512-MncsAbJCWyL5/IX6IfDBh7+283D49CoSJUUIsQv5dV9H07dqemmmegec48X4PJZKTp2YgLYPcGkAb3oqu7aryA==","signatures":[{"sig":"MEUCIDEYrv69aWD8EvQE8BIhBYzfgBW+ql025IWtgNPKpxTWAiEAjdpZwyzia17rvKR3u/5sqFoGok/4FE9PLVf1V6GBdcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.0.94","description":"debugging for distributed systems","directories":{},"_nodeVersion":"v0.4.2","dependencies":{"restify":"1.2.0","posix-getopt":"0.0.1"},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":false},"0.0.3":{"name":"kang","version":"0.0.3","_id":"kang@0.0.3","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./cmd/kang.js"},"dist":{"shasum":"0eb5534f1ff2c8db0672e8560cebc269f1fd310d","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.3.tgz","integrity":"sha512-efp17utK6HZszZeQdX5Hk9JUinLey9v4Xge37ENQHQXsFcd0/t/lu4xFpiDI3JAYhwM+hJq2aJPUwP2F2qGDxQ==","signatures":[{"sig":"MEUCIGlAvJyh903hlR3nEuNELU6GvmurpLK+My/CqTduMTwSAiEAuPsbMMQawo2zxI56KxqouXSo1GKQEoCWts4Q+otX3j0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.1.65","description":"debugging for distributed systems","directories":{},"dependencies":{"restify":"1.2.0","posix-getopt":"0.0.1"}},"0.0.5":{"name":"kang","version":"0.0.5","_id":"kang@0.0.5","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"41bb4b364fbcd10da535b9179471d04668f5ad65","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.5.tgz","integrity":"sha512-B4NVMVPp4ocHX6Ty/G9RpTDp/YGWULRV2BZ1isvFxX6Xkw0hLTITYWOvcxn7aF72K49D5CzGQIJNJ6rb/ttRzQ==","signatures":[{"sig":"MEYCIQD9tOngZX6NFhl5p/JnfV3nrF2pX4myGbGan5729xXVBgIhAINHqkoHbMmPreXorvRFoPhHVmrfvwIZmYbBmxjsetaC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.2.14","description":"debugging for distributed systems","directories":{},"dependencies":{"jsprim":"0.4.0","vasync":"1.3.3","restify":"2.3.3","strsplit":"1.0.0","posix-getopt":"0.0.1"},"optionalDependencies":{"restify":"2.3.3"}},"0.0.6":{"name":"kang","version":"0.0.6","_id":"kang@0.0.6","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"402d79b43896881721d18fda8b9ba33455dad347","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.6.tgz","integrity":"sha512-yxZ7YtEIm3hImQgQ47VzZhfvlTOhrR9THdjpIeldV7wZFp4SRkmEotFj/w65oJV9LFB62LTe74GvBbJQnY0UFA==","signatures":[{"sig":"MEUCIQDEa6Ml+/llBqtoGMAuvtt+wuu9I7IXNqp2E15xj0CVuQIgcSPagnUu2fsqtBGyBmA5Xxa376vN54jVIYVfG7mitek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.2.14","description":"debugging for distributed systems","directories":{},"dependencies":{"jsprim":"0.4.0","vasync":"1.3.3","strsplit":"1.0.0","posix-getopt":"0.0.1"}},"0.0.7":{"name":"kang","version":"0.0.7","_id":"kang@0.0.7","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"e2090133d1497c69d6a340676639aa766b4faad4","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.7.tgz","integrity":"sha512-ZWw6XxiHYwYNVVO142chRTUkTPEitE/qT3xsihA2pN5myU4/6wmGhVSGeznHa1EkoP3aRR1pb4/wVk7XHn0V8Q==","signatures":[{"sig":"MEUCIQDIXMo03jF1xZH8L6tClLPZYiKQKtRopbuR3q6HuCo7rQIgO43A5kBSVS0Iub8CLFFYn/goKF8FLPwJRqoZmrscAbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.2.18","description":"debugging for distributed systems","directories":{},"dependencies":{"jsprim":"0.4.0","vasync":"1.3.3","strsplit":"1.0.0","posix-getopt":"0.0.1"}},"0.0.8":{"name":"kang","version":"0.0.8","_id":"kang@0.0.8","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"5679ad936bf13fc1daf396e1301d1250509ce111","tarball":"https://registry.npmjs.org/kang/-/kang-0.0.8.tgz","integrity":"sha512-KPdOS9A9S94frw+deyAMNEYlbbg8GNXj/FQW3yJ+Bqymh8m+JiqiZIdI/QYeLPHR0BktPuC3UQGvK/eKrWmf/g==","signatures":[{"sig":"MEUCIQCdGMNU8Q/J2nJaUG1XdNAWg5pXQEDV5jLLpRom/7X/5gIgJhN8i9gLKHk8Y2pMsVUSZudXWHp7TMwGFXrqTKs4Glo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","engines":["node >=0.6.0"],"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.2.14","description":"debugging for distributed systems","directories":{},"dependencies":{"jsprim":"0.4.0","vasync":"1.3.3","restify":"2.6.0","strsplit":"1.0.0","posix-getopt":"0.0.1"}},"1.0.0":{"name":"kang","version":"1.0.0","license":"MIT","_id":"kang@1.0.0","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"homepage":"https://github.com/davepacheco/kang","bugs":{"url":"https://github.com/davepacheco/kang/issues"},"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"8583c8278a6e5d92eb0f6d0d48d8c53e1ef9858f","tarball":"https://registry.npmjs.org/kang/-/kang-1.0.0.tgz","integrity":"sha512-6c7lguJUvn39t05nR9rhqcVdZSB1Fohrk0BmJyKMWoxsdbZ8saVCtyOeAbP5OT5rnGmOZucpAI5E7NO3sMsX6A==","signatures":[{"sig":"MEYCIQD3Xfnn9MDSt52jL6n/3GALxCl5vQ1iJ+kK2Vk5pifuswIhAJk/yGkE4gBPjVsQI26btSy06k5lghzpdOabCXv4YO0t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","_shasum":"8583c8278a6e5d92eb0f6d0d48d8c53e1ef9858f","engines":["node >=0.6.0"],"gitHead":"a9bdf1b1f1bcba3d93dbbad20ce0cf69c554fcc7","scripts":{},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"2.7.4","description":"debugging for distributed systems","directories":{},"_nodeVersion":"0.12.2","dependencies":{"jsprim":"0.4.0","vasync":"1.3.3","restify":"2.6.0","strsplit":"1.0.0","posix-getopt":"0.0.1","restify-clients":"1.1.0"}},"1.0.1":{"name":"kang","version":"1.0.1","license":"MIT","_id":"kang@1.0.1","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"homepage":"https://github.com/davepacheco/kang","bugs":{"url":"https://github.com/davepacheco/kang/issues"},"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"240cf2a3c72ab34ff5a53756b9b1c385c91d0dab","tarball":"https://registry.npmjs.org/kang/-/kang-1.0.1.tgz","integrity":"sha512-RRDuzO4isnsxuzVFFlv8KSEDrwvFy8cgyKONI8NicFcppwUye+iQyy1n5uBuWuTcuLXR6pARGaXeifQQjULlrA==","signatures":[{"sig":"MEQCIAbP0sAxra3wSj5HlPq4bNLqQDctxkVptStofAuaokzhAiAjmoJx49Bz3K74uiPaCbRHL4qau6X8Qo8C5FZOnnnPlw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","_shasum":"240cf2a3c72ab34ff5a53756b9b1c385c91d0dab","engines":["node >=0.6.0"],"gitHead":"75b14fe648fbff7c18644c18da18a0fb8c8d051b","scripts":{},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"1.4.21","description":"debugging for distributed systems","directories":{},"dependencies":{"jsprim":"0.4.0","vasync":"1.3.3","restify":"2.6.0","strsplit":"1.0.0","posix-getopt":"0.0.1","restify-clients":"1.1.1"}},"1.1.0":{"name":"kang","version":"1.1.0","license":"MIT","_id":"kang@1.1.0","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"homepage":"https://github.com/davepacheco/kang#readme","bugs":{"url":"https://github.com/davepacheco/kang/issues"},"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"1b4df5e63041e26e4440c0089876cc12d1727271","tarball":"https://registry.npmjs.org/kang/-/kang-1.1.0.tgz","integrity":"sha512-Tdln1PuPcKtApu2Ce8znTYddzjQLbHGBmyQWtw7mN4vmsi5ADkA6uYhZtt3N9F88Tk9ZCj95Lji4YTVTPqJg4g==","signatures":[{"sig":"MEYCIQDCZkmkigQ7uLY3M2tA98njTsNINXfJNtCHB77ZifNArwIhANz+PTguJZFxL9poJA6rw/rfWiiOxcerKqrpd/2UIkPb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","_shasum":"1b4df5e63041e26e4440c0089876cc12d1727271","engines":["node >=0.6.0"],"gitHead":"c29d5a8e21837d34070f309596000cd503b4700b","scripts":{},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"2.15.9","description":"debugging for distributed systems","directories":{},"_nodeVersion":"0.12.7","dependencies":{"jsprim":"^1.3.1","vasync":"^1.6.4","restify":"4.1.1","strsplit":"^1.0.0","posix-getopt":"^1.2.0","restify-clients":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/kang-1.1.0.tgz_1476395341688_0.5360655174590647","host":"packages-12-west.internal.npmjs.com"}},"1.2.0":{"name":"kang","version":"1.2.0","license":"MIT","_id":"kang@1.2.0","maintainers":[{"name":"dap","email":"dap@cs.brown.edu"}],"homepage":"https://github.com/davepacheco/kang#readme","bugs":{"url":"https://github.com/davepacheco/kang/issues"},"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"883afb11da6dfa56293357551d9c3901d6f53f7c","tarball":"https://registry.npmjs.org/kang/-/kang-1.2.0.tgz","integrity":"sha512-bnn+pf2p3tHUPkofNIoU09RO0rzUBQvh7UYvLUBx3gzW/zYlVoSrV4NluNHEpcmFVApp4xtYCpdKaK6gyr7dUQ==","signatures":[{"sig":"MEUCIDdaRhgv1TyjD7HuS1HWdAhm8yiNEX/O9LOib+F2PsOkAiEAj9SBADU20oikHs2dx3rzPDbRoFi25DnifH+790qn+jE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/kang.js","_from":".","_shasum":"883afb11da6dfa56293357551d9c3901d6f53f7c","engines":["node >=0.6.0"],"gitHead":"9b138f2b4fb7873b9b0f271516daf36e20c9c037","scripts":{},"_npmUser":{"name":"dap","email":"dap@cs.brown.edu"},"repository":{"url":"git://github.com/davepacheco/kang.git","type":"git"},"_npmVersion":"2.15.1","description":"debugging for distributed systems","directories":{},"_nodeVersion":"0.10.45","dependencies":{"jsprim":"^1.4.0","vasync":"^1.6.4","verror":"^1.9.0","restify":"4.1.1","strsplit":"^1.0.0","posix-getopt":"^1.2.0","restify-clients":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/kang-1.2.0.tgz_1493169770593_0.2381270555779338","host":"packages-12-west.internal.npmjs.com"}},"1.3.0":{"name":"kang","version":"1.3.0","license":"MIT","_id":"kang@1.3.0","maintainers":[{"name":"arekinath","email":"alex@cooperi.net"},{"name":"dap","email":"dap@cs.brown.edu"},{"name":"jclulow","email":"josh@sysmgr.org"},{"name":"melloc","email":"cody.mello@joyent.com"},{"name":"todd.whiteman","email":"todd.whiteman@joyent.com"},{"name":"trentm","email":"trentm@gmail.com"}],"homepage":"https://github.com/joyent/kang#readme","bugs":{"url":"https://github.com/joyent/kang/issues"},"bin":{"kang":"./bin/kang.js"},"dist":{"shasum":"a2c83edf261e5bec4be8f88c169e93980ea2fd72","tarball":"https://registry.npmjs.org/kang/-/kang-1.3.0.tgz","fileCount":8,"integrity":"sha512-w1+5eDBwICFC3WH2U/l2Qjo7FMd8u0/A2psEPZxuK18/ChbJcRaHtZ6zni7kIzMe1UQSaj/K8WG8weA4IfC7TA==","signatures":[{"sig":"MEYCIQDoeonOBosVkr3ABAqZjeLjmiq+nMepKKS/nvZjTy3/8gIhALqBwu5MA+PyLcJaozWMDdnmRG+CGywBW6zMEnongym0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTJhmCRA9TVsSAnZWagAAOLYQAI+bQ8jDLxWNTTEKNs8t\n3WMoMii0r1DehGWt6PgIodGr4zcNkDFpCKLXs2npMj5fY93yGMyr9dIUY/+G\nUW/CaOgK2DenNUsjHRHYgikG6hmHJ82J70lqKrXVY03GktE0JLKSBRqut1OT\nbK6RFzHa+iw06fG9zSb9zP8EGU5LRjIQ+eHNZw9gJDgiuN3iscqMPraiXYnn\nRpJxnq9myVmPGzuGSEPvi6HHe9wfOXgXd+LyRFSfRySx9BCrN4k8uJ7totey\nvJrxonBUn2FSS7FwkgnSkCD+tcL+1bChR/nQR+QMBSzpoDf5juCpsnnfNpDO\nCxBuyR3LUsrGFn/DqcAGR92buWVJNm7iANXNx5ih7o8axOvizze9HGk+fz5T\nt+lHT0dWVPmZsJeyMP9IBsc+f/onjQtj+lzTnxlvqi4D6vzDLM4fbowhWi+X\n2REvIDChkjEz9yYGQtSNXkiODS8wXuO5RRfNIz+RRF8ItjlTKj+aYt+pMDrZ\ncmIQFhAopy3JaoecdUwj5hDyIITZyXEp48UbmPFtLc07o70/f8iTAgWLNXWC\nc71PZQ7h+/r5/27it3wr6SMV6XLy5YS77Nk+F8HRCeXot/bmHMYOETYuv54g\niTb8L44tfZ9YmlwLreKeOKEGo89//vZY6q6KhiuauinvGvl8AsFx/V8H/hVA\nl6Kb\r\n=aWU4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/kang.js","engines":{"node":">=0.10.x"},"gitHead":"bec4024c2ca8d60ced55f32453601cf46d14d568","_npmUser":{"name":"trentm","email":"trentm@gmail.com"},"repository":{"url":"git://github.com/joyent/kang.git","type":"git"},"_npmVersion":"6.4.1","description":"debugging for distributed systems","directories":{},"_nodeVersion":"10.15.3","dependencies":{"jsprim":"^1.4.0","vasync":"^1.6.4","verror":"^1.9.0","restify":"4.3.3","strsplit":"^1.0.0","posix-getopt":"^1.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kang_1.3.0_1565300837873_0.755243619559113","host":"s3://npm-registry-packages"}}},"time":{"created":"2012-03-21T16:52:26.427Z","modified":"2025-11-26T18:15:53.081Z","0.0.1":"2012-03-21T16:52:27.566Z","0.0.2":"2012-04-20T18:17:23.404Z","0.0.3":"2013-01-26T22:16:51.849Z","0.0.5":"2013-03-14T20:25:35.318Z","0.0.6":"2013-06-05T18:20:53.599Z","0.0.7":"2013-06-12T04:45:55.991Z","0.0.8":"2013-06-25T23:10:28.493Z","1.0.0":"2015-10-13T23:32:03.993Z","1.0.1":"2015-10-14T03:40:48.470Z","1.1.0":"2016-10-13T21:49:01.929Z","1.2.0":"2017-04-26T01:22:50.889Z","1.3.0":"2019-08-08T21:47:18.041Z"},"bugs":{"url":"https://github.com/joyent/kang/issues"},"license":"MIT","homepage":"https://github.com/joyent/kang#readme","repository":{"url":"git://github.com/joyent/kang.git","type":"git"},"description":"debugging for distributed systems","maintainers":[{"email":"todd.whiteman@joyent.com","name":"todd.whiteman"},{"email":"kusorbox@gmail.com","name":"kusor"},{"email":"michael.hicks@joyent.com","name":"michael.hicks"},{"email":"bahamat@digitalelf.net","name":"bahamat"},{"email":"Tr@visPaul.me","name":"tpaul"},{"email":"danmcd@edgecast.io","name":"kebesays"},{"email":"trentm@gmail.com","name":"trentm"},{"email":"dap@cs.brown.edu","name":"dap"},{"email":"josh@sysmgr.org","name":"jclulow"}],"readme":"# kang: distributed system observability\n\nKang is a facility for debugging networked software services by exposing\ninternal state via a simple HTTP API.  Service state is organized into a\ntwo-level hierarchy of \"objects\" organized by \"type\".  For example, a simple\nHTTP server may have two types of objects: \"requests\" and \"connections\", and\nthere may be many objects of each type.  Each server defines its own types and\nthe structures of its objects.\n\n## Demo\n\nFirst, install the command-line tool:\n\n    # npm install -g kang\n\nThen run the example server in this repo:\n\n    # node examples/server.js\n    server listening at http://0.0.0.0:8080\n\nNow run the kang debugger:\n\n    # kang -hlocalhost:8080\n\nRun \"help\" for some suggested examples and try them out.\n\n\n## kang tool\n\nUsage: `kang [-h host1[host2...]]`\n\nRemote servers are specified using the following format:\n\n    [http[s]://]host[:port][/uri]\n\nAll fields other than the host are optional.  Nearly any combination may be\nspecified, as in:\n\n      REMOTE HOST              MEANS\n      localhost                http://localhost:80/status/snapshot\n      localhost:8080           http://localhost:8080/status/snapshot\n      localhost:8080/kang      http://localhost:8080/kang\n      https://localhost/kang   https://localhost:443/kang\n\nMultiple servers may be specified in a comma-separated list.  Servers are\nspecified using the -h option or (if none is present) the KANG\\_SOURCES\nenvironment variable.\n\nWhen you run `kang`, it creates a snapshot of the distributed system's state by\nquerying each of the servers.  You can browse the state interactively.  Type\n\"help\" for more information.\n\n## Background\n\nWhile interactive program execution is a useful feature during development, the\nmost important feature for debuggers in both development and production\nenvironments is the presentation of current program state.  Program state is\noften examined on an ad-hoc basis by engineers debugging a particular problem,\nbut it's often useful to build tools to automatically analyze this state as\nwell, either to summarize it for humans or to automatically look for certain\nclasses of problems.  In this regard, kang is a debugger for distributed\nsystems: it fetches, aggregates, and presents program state for consumption by\nboth humans and automated tools.  The goal is to allow each component of the\ndistributed system to describe the objects it knows about (and potentially a\nsmall amount of metadata suggesting what to do with this information) so that\nthe kang system can fetch, aggregate, and present this information usefully.\n\nIn debugging distributed systems of heterogeneous components, it's critical to\nbe able to quickly understand the internal state of each component. We have\n[https://github.com/trentm/node-bunyan](logs) and\n[https://github.com/joyent/node-panic](dumps) to understand explicit errors and\nfatal failures, but you need more to understand why a service is simply\nbehaving wrong.\n\nMost of the time, the internal state takes the form of just a few important\ntypes of objects. It would be really useful if each service provided a standard\nway of extracting this state for the purpose of debugging.\n\n## API\n\nkang defines a single HTTP entry point, `/kang/snapshot`, that returns a\nsnapshot of the service's internal state in the form of a JSON object that\nlooks like this:\n\n    {\n            /* service identification information */\n            \"service\": {\n                    \"name\": \"ca\",\n                    \"component\": \"configsvc\",\n                    \"ident\": \"us-sw-1.headnode\",\n                    \"version\": \"0.1.0vmaster-20120126-2-g92bf718\"\n            },\n\n            /* arbitrary service stats */\n            \"stats\": {\n                    \"started\": \"2012-03-20T17:03:59.221Z\",\n                    \"uptime\": 86403217,\n                    \"memory\": {\n                            \"rss\": 10850304,\n                            \"heaptotal\": 2665280,\n                            \"heapused\": 1700788\n                    },\n                    \"http\": {\n                        \"nrequests\": 1709,\n                        \"nrequestsbycode\": {\n                          \"200\": 1705,\n                          \"201\": 1,\n                          \"204\": 1,\n                          \"503\": 1\n                        }\n                    }\n            },\n\n            /* extra service-specific information */\n            \"types\": [ 'instrumentation', 'instrumenter' ],\n\n            \"instrumentation\": {\n                    \"cust:12345;1\": {\n\t\t\t    \"creation_time\": \"2012-01-26t19:20:30.450z\",\n\t\t\t    \"label\": \"12345/1\"\n                            \"module\": \"node\",\n                            \"stat\": \"httpd_ops\",\n                            \"decomposition\": \"latency\",\n                            \"granularity\": 1,\n                            \"instrumenters\": {\n                                    \"instrumenter:instr1\": \"enabled\",\n                                    \"instrumenter:instr2\": \"enabled\",\n                                    \"instrumenter:instr3\": \"disabled\"\n                            }\n                    }\n            },\n\n            \"instrumenter\": {\n                    \"instr1\": {\n                            \"creation_time\": \"2012-01-26t19:20:30.450z\",\n                            \"instrumentations\": [ \"instrumentation:cust:12345;1\" ],\n                            \"last_contact\": \"2012-01-26t19:20:30.450z\"\n                    },\n                    \"instr2\": {\n                            \"creation_time\": \"2012-01-26t19:20:30.450z\",\n                            \"instrumentations\": [ \"instrumentation:cust:12345;1\" ],\n                            \"last_contact\": \"2012-01-26t19:20:30.450z\"\n                    },\n                    \"instr3\": {\n                            \"creation_time\": \"2012-01-26t19:20:30.450z\",\n                            \"instrumentations\": [ ],\n                            \"last_contact\": \"2012-01-10t19:20:30.450z\"\n                    }\n            }\n    }\n\nNote that many of the above field names match the corresponding fields used in\nBunyan for logging.  Clients can link objects reported by multiple components\n(or even services) by assuming any given (type, id) tuple is unique.  Clients\ncan also link any string of the form \"type:id\" (for a known object type and id)\nto the corresponding object.  For example, the \"instrumenter:instr1\" key in the\ninstrumentation above can be linked directly to that object.\n\nIn the future we may define semantics for some fields like \"label\", and\n\"creation\\_time\" so that the tools can present this information more usefully.\n\n## Server library\n\nkang includes a server library for implementing the above API.  Any project that\nwants to take advantage need only implement a few entry points:\n\n* report service identification information\n* report stats\n* list object types\n* list objects for a given type\n* serialize one object\n\nServices can add information incrementally as desired.  The library takes care\nof formatting this data appropriately.\n\n## Client library\n\nkang includes a client library for listing and browsing objects from a set of\nservices.  See cmd/kang.js for example usage.\n\n## CLI\n\nSee above for details.\n\n## Future work\n\n- Remove prefixes on library function names\n","readmeFilename":"README.md","users":{"isao":true,"vectorhacker":true}}