Created
March 9, 2012 16:04
-
-
Save daniel-garcia/2007257 to your computer and use it in GitHub Desktop.
get modeled device count over time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import glob | |
import os | |
import cPickle as pickle | |
pattern = '/'.join((os.environ['ZENHOME'], 'var/zenmodeler_*',)) | |
files = glob.glob(pattern) | |
modeledDevicesCount = 0 | |
for filename in files: | |
counters = pickle.load(open(filename)) | |
modeledDevicesCount += counters['modeledDevicesCount'] | |
print 'modeledDevicesCount: %d' % modeledDevicesCount | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment