Skip to content

Instantly share code, notes, and snippets.

@smerritt
Created December 19, 2013 19:05
Show Gist options
  • Save smerritt/8044467 to your computer and use it in GitHub Desktop.
Save smerritt/8044467 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
from swift.common.utils import get_logger
NLOGGERS = 500
for _ in xrange(NLOGGERS):
get_logger({})
nfds = len(os.listdir("/proc/%d/fd" % os.getpid()))
print "I have %d fds open after getting %d loggers" % (nfds, NLOGGERS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment