In a recipe -- how to get ram?

How do I get server memory (ram) in gigs?


You can base on node['memory']['total'] / 1024 as the ohai attribute is in kB.

more about ohai here

And to see all attributes on a node: knife node show 'node fqdn' -l.
Usually it’s better to redirect this to a file and search in the file.

On 11/20/2015 3:37 AM, Tensibai wrote:

@Jeff_Blaine You should top answer for now, Discourse does not parse properly inline answers :confused:

Bah. I replied via email only to correct ‘2014’ --> ‘1024’. It looks like that’s corrected here in Discourse by an edit probably, which doesn’t get sent through as an email “correction” message.

Thanks for the heads-up. Yay software.

Ooops, yes Mike did correct me.