Alan Kasindorf > MogileFS-Server-2.70 > MogileFS::IOStatWatcher



Annotate this POD


View/Report Bugs
Source   Latest Release: MogileFS-Server-2.72

Methods ^

$iow = MogileFS::IOStatWatcher->new()

Returns a new IOStatWatcher object.

$iow->set_hosts( host1 [, host2 [, ...] ] )

Sets the list of hosts to connect to for collecting IOStat information. This call can block if you pass it hostnames instead of ip addresses.

Upon successful connection, the on_stats callback will be called each time the statistics are collected. Error states (failed connections, etc.) will trigger retries on 60 second intervals, and disconnects will trigger an immediate reconnect.

$iow->on_stats( coderef )

Sets the coderef called for the on_stats callback.

Callbacks ^

on_stats->( host, stats )

Called each time device use statistics are collected. The host argument is the value passed in to the set_hosts method. The stats object is a hashref of mogile device numbers (without leading "dev") to their corresponding utilization percentages.

syntax highlighting: