module Vnstat
The Vnstat
namespace.
Constants
- VERSION
Public Instance Methods
[](id)
click to toggle source
Returns traffic information for the given interface.
@param [String] id The network interface identifier. @return [Interface]
# File lib/vnstat.rb, line 49 def [](id) interfaces[id] end
cli_version()
click to toggle source
Returns information for the currently installed version of vnstat.
@return [String]
# File lib/vnstat.rb, line 65 def cli_version Utils.call_executable('-v') end
config()
click to toggle source
The configuration of the Vnstat
environment.
@return [Configuration]
# File lib/vnstat.rb, line 30 def config @config ||= Configuration.new end
configure() { |config| ... }
click to toggle source
Configures the Vnstat
environment.
@yieldparam [Configuration] config The environment configuration. @return [Configuration]
# File lib/vnstat.rb, line 39 def configure yield(config) config end
interfaces()
click to toggle source
Returns traffic information for all known interfaces.
@return [InterfaceCollection]
# File lib/vnstat.rb, line 57 def interfaces InterfaceCollection.open end