MogileF...tWatcher(3)

πŸ“¦
version 2.73 Β· 2 versions
, in fedora 43

πŸ’– 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