Guest User

Untitled

a guest
Aug 26th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.22 KB | None | 0 0
  1. Facter.add(:ulimit) do
  2.   setcode do
  3.     proc_file = '/proc/self/limits'
  4.     limits = File.readlines(proc_file)
  5.       if limits.include?("Max open files")
  6.          val = line.split[3]
  7.          break
  8.       end
  9.   end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment