Author Topic: query memory usage of a job (python or cmdline)  (Read 2977 times)

pfranz

  • Newbie
  • *
  • Posts: 1
query memory usage of a job (python or cmdline)
« on: July 25, 2011, 05:40:38 PM »
Any pointers on querying a job's memory usage after it has completed?  I can find the data under the Stats tab in the gui, but I'm having trouble getting at it in Python or via command line.

Centos 5
Python 2.5

jburk

  • Administrator
  • *****
  • Posts: 493
Re: query memory usage of a job (python or cmdline)
« Reply #1 on: August 24, 2011, 08:09:03 PM »
The stats for a subjob can be retrieved via API; they're returned as 1 long string, so you'll have to split them.

Code: [Select]
>>> import qb
>>> stats = qb.stats('605.0')
>>> print stats[0]['data']
605.0 start: [Aug 24, 2011 12:28:32] 367511312 end: [Aug 24, 2011 12:28:41] 367511321 time: [9 s] 9 host: jburk-17-mbPro.local thread: 0 mem: 4740 swap: 0