Skip to content

Instantly share code, notes, and snippets.

View jamez01's full-sized avatar
🏠
Working from home

James Paterni jamez01

🏠
Working from home
View GitHub Profile
@tonyc
tonyc / gist:1384523
Last active June 3, 2024 15:34
Using strace and lsof

Using strace and lsof to debug blocked processes

You can use strace on a specific pid to figure out what a specific process is doing, e.g.:

strace -fp <pid>

You might see something like:

select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)

@seeingidog
seeingidog / gist:1067821
Created July 6, 2011 17:34
redis ORMs/mongo ORM benchmarks
require 'benchmark'
require 'ohm'
require 'datamapper'
require 'dm-redis-adapter'
require "redis"
require 'json'
require 'mongo_mapper'
MongoMapper.connection = Mongo::Connection.new