Skip to content

Instantly share code, notes, and snippets.

@wyukawa
Created March 16, 2014 12:43
Show Gist options
  • Select an option

  • Save wyukawa/9582670 to your computer and use it in GitHub Desktop.

Select an option

Save wyukawa/9582670 to your computer and use it in GitHub Desktop.
jstat ruby
io=IO.popen("jstat -gcutil 1000", "r")
a=io.readlines()
headers=a[0].split()
datas=a[1].split()
h=Hash.new
headers.each_with_index{|header, i|
h[header]=datas[i]
}
p h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment