Class: CheckDisk::Inode

Inherits:
Template show all
Defined in:
lib/check_disk/inodes.rb

Overview

Interface for checking Inodes.

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Inode

Returns a new instance of Inode.



6
7
8
# File 'lib/check_disk/inodes.rb', line 6

def initialize(config)
  super
end

Instance Method Details

#availableObject



14
15
16
# File 'lib/check_disk/inodes.rb', line 14

def available
  inodes_available
end

#critical?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/check_disk/inodes.rb', line 30

def critical?
  percent_of_inodes_used > critical
end

#messageObject



34
35
36
37
# File 'lib/check_disk/inodes.rb', line 34

def message
  "#{ percent_of_inodes_used }% of inodes used. " \
  "path: #{ path } total: #{ total } available: #{ available }"
end

#percent_usedObject



22
23
24
# File 'lib/check_disk/inodes.rb', line 22

def percent_used
  percent_of_inodes_used
end

#totalObject



10
11
12
# File 'lib/check_disk/inodes.rb', line 10

def total
  inodes_total
end

#usedObject



18
19
20
# File 'lib/check_disk/inodes.rb', line 18

def used
  inodes_used
end

#warning?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/check_disk/inodes.rb', line 26

def warning?
  percent_of_inodes_used > warning
end