Modifying for use with destruct #5

wants to merge 1 commit into


None yet

2 participants


I leave this up to you if you want to merge it or not.

I modified this to use the node destruct module I wrote to make unpacking values easier and cleaner.


(tag @papertigers)

@dshaw dshaw commented on the diff Jul 19, 2012
if (typeof pid === 'function') {
callback = pid;
pid = 'self';
- fs.readFile('/proc/'+pid+'/usage', function (err, buf) {
+ parseProc('psinfo', 'iia8a8a8a8a8a8a8a8a8a8a8a8a8a8a48LLLLLLLLLLLLa40', keys, timespec_keys, pid, function(err, res) {
dshaw Jul 19, 2012 Owner

'iia8a8a8a8a8a8a8a8a8a8a8a8a8a8a48LLLLLLLLLLLLa40' - that's a crazy string. I love where you're going with this though. Seems much easier to manage.


oh yeah, it's definitely a crazy string. I modeled the unpack function after the one in perl. if you search for one of those crazy strings you'll see 2 results. the node destruct module, and brendan gregg's prustat script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment