Ohai in Chef is used to detect Chef node attributes and these are provided to chef-client during the Chef Client run. Ohai collects details about various platforms, network data, memory data, CPU data, kernel data and other configuration details. All these attributes collected are automatic attributes that are not changed even after Chef Client run. Automatic attributes are having higher precedence overall default, override, force-default and normal attributes. Ohai gets installed with the Chef Client installation. The ohai resource is available in Chef to reload the configuration of a node. These are often used to refer back system attributes that are changed by a recipe like a recipe that creates a new user during a Chef Client run. The syntax is as follows :  ohai 'name' do
plugin   String
action   Symbol # defaults to reload if not specified
end where: ohai is the resource executed. name is the resource block name. action is performed to bring the node into the desired state. a plugin is the property of the resource.