Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. Nv_NODE_DATE_TIME
  2.  
  3. Nv_stats_172550_160211_230030
  4. Nv_stats_172550_160212_142624
  5. Nv_stats_75AKPD0_160211_230030
  6. Nv_stats_75AKPD0_160212_142624
  7.  
  8. Nv_stats_172550_160211_230030
  9. Nv_stats_75AKPD0_160212_142624
  10. Nv_stats_172550_160211_230030
  11. Nv_stats_75AKPD0_160212_142624
  12.  
  13. import os
  14.  
  15. iostatslocalpath="/root/svc/testing/"
  16. svchost='SVC_Cluster01'
  17. nodenames=['75AKMX0', '75AKPD0', '172550', '172561']
  18.  
  19. filelist=sorted(os.listdir(iostatslocalpath+svchost+'/.'))
  20. totalfilenumber=len(filelist)
  21.  
  22. def parse(filename, length):
  23. print filename[0]
  24. print test[length-1]
  25.  
  26. for nodename in nodenames:
  27. test=[]
  28. test[:]=[]
  29. for file in filelist:
  30. if nodename and "Nv" in file:
  31. test.append(file)
  32. parse(test, len(test))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement