Sha256: ef7ea4d0d9d2f7eb5f0259d589e281af9de0c4012f87a5da699f8f24bc7aeb79
Contents?: true
Size: 576 Bytes
Versions: 8
Compression:
Stored size: 576 Bytes
Contents
module Keystone module Os class Unix < AbstractOs def ip_address ifconfig = `/sbin/ifconfig` ips = [] # TODO mac ifconfig.gsub(/inet addr:(\d+\.\d+\.\d+\.\d+)/){|ip| if $1 != '127.0.0.1' ips << $1 end } return ips end def hostname `/bin/hostname`.chomp end def disk `/bin/df -h`.chomp end def process_list `/bin/ps -ef`.chomp end def netstat `/usr/sbin/netstat -an`.chomp end end end end
Version data entries
8 entries across 8 versions & 2 rubygems