Top Level Namespace
Defined Under Namespace
Modules: Enterprise
Instance Method Summary collapse
Instance Method Details
#disk_path(link) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/enterprise/ohai/plugins/linux/disk.rb', line 7 def disk_path(link) dir = File.dirname(link) path = File.readlink(link) File.(File.join(dir, path)) end |
#disk_size(path) ⇒ Object
14 15 16 |
# File 'lib/enterprise/ohai/plugins/linux/disk.rb', line 14 def disk_size(path) %x{fdisk -lu #{path} 2>&1}[%r{^Disk #{path}: (.*),}, 1] end |