MogileF...tWatcher(3)
π MogileF...tWatcher(3) π
okay bestie, welcome to the User Contributed Perl Documentation for MogileFS::IOStatWatcher, and no cap, this one is short and sweet but it is doing things. it's giving watcher. it's giving stats. let's get into it π¦
β¨ Methods β¨
πΈ $iow = MogileFS::IOStatWatcher->new()
hands you back a brand new IOStatWatcher object. that's it, that's the whole method. iconic behaviour, honestly π
πΈ $iow->set_hosts( host1 [, host2 [, ...] ] )
sets the list of hosts you wanna connect to for collecting IOStat info. very demure, very mindful.
heads up bestie π¨ this call can block if you pass it hostnames instead of ip addresses. like, it will just sit there. so if you're allergic to blocking, pass ips, fr fr.
once you're connected successfully, the on_stats callback gets called every single time the statistics are collected. slay.
and the messy parts? error states (failed connections, etc.) will trigger retries on 60 second intervals, and disconnects trigger an immediate reconnect. she does not give up. main character energy fr π
πΈ $iow->on_stats( coderef )
sets the coderef that gets called for the "on_stats" callback. simple as that π
π Callbacks π
π on_stats->( host, stats )
called each and every time device use statistics are collected. the tea is:
- the
"host"argument is the value you passed in to the"set_hosts"method β yes, that exact one. - the
"stats"object is a hashref of mogile device numbers (without the leading"dev") mapped to their corresponding utilization percentages. so like, percentages. numbers. vibes.
lowkey obsessed with how compact this page is. every option, every argument, every callback, all of it preserved. iykyk π
mwah, that's a wrap π«Ά this was perl v5.42.0, dated 2025-07-25, and it's the MogileF...tWatcher(3) page β go forth and watch those IOStats, bestie π
β¨
π¦ where this page comes from
- fedora 43: mogilefsd 2.73-27.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms