Class: Netscaler::System
- Inherits:
-
Object
- Object
- Netscaler::System
- Defined in:
- lib/netscaler/system.rb,
lib/netscaler/system/file.rb,
lib/netscaler/system/interface.rb
Defined Under Namespace
Instance Method Summary collapse
- #cpu ⇒ Object
- #file ⇒ Object
- #hostname ⇒ Object
-
#initialize(netscaler) ⇒ System
constructor
A new instance of System.
- #interface ⇒ Object
- #memory ⇒ Object
- #stat ⇒ Object
Constructor Details
#initialize(netscaler) ⇒ System
Returns a new instance of System.
7 8 9 |
# File 'lib/netscaler/system.rb', line 7 def initialize(netscaler) @netscaler = netscaler end |
Instance Method Details
#cpu ⇒ Object
23 24 25 |
# File 'lib/netscaler/system.rb', line 23 def cpu @netscaler.adapter.get('stat/systemcpu') end |
#hostname ⇒ Object
31 32 33 34 |
# File 'lib/netscaler/system.rb', line 31 def hostname hostname = @netscaler.adapter.get('config/nshostname') hostname['nshostname'].first['hostname'] end |
#interface ⇒ Object
15 16 17 |
# File 'lib/netscaler/system.rb', line 15 def interface Interface.new @netscaler end |
#memory ⇒ Object
27 28 29 |
# File 'lib/netscaler/system.rb', line 27 def memory @netscaler.adapter.get('stat/systemmemory') end |
#stat ⇒ Object
19 20 21 |
# File 'lib/netscaler/system.rb', line 19 def stat @netscaler.adapter.get('stat/system') end |