Bug 222312 - sysutils/monit: Filesystem statistics error
Summary: sysutils/monit: Filesystem statistics error
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-13 21:27 UTC by Stephan
Modified: 2017-09-25 05:52 UTC (History)
4 users (show)

See Also:
dbaio: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan 2017-09-13 21:27:48 UTC
Hi,

there was a bug #219084 which has been fixed with version 5.23.0

Nevertheless one of the errors still shows up:

   filesystem statistics error -- cannot parse device '/dev/gpt/rootfs'

The monitoring itself seems to be working, but at least this message spams the logfile every 2 minutes.

Cheers,

Stephan
Comment 1 Woi 2017-09-15 18:48:22 UTC
Hey,

There is a bug report downstream at the OPNsense bug tracker:
https://github.com/opnsense/plugins/issues/265

It's also already reported upstream at the monit bug tracker:
https://bitbucket.org/tildeslash/monit/issues/666 (Wow! What a bug ID ;-)

Unfortunately, I'm not allowed to add this URLs to the "See Also" filed, hence this comment.

Cheers
Woi
Comment 2 Stephan 2017-09-15 19:18:20 UTC
The log error gets generated in src/device/sysdep_FREEBSD.c @ line 115

the code expects @least one digit in the devicename, which is not the case for '/dev/gpt/rootfs'


// Parse the device path like /dev/da0p2 into name:instance -> da:0
static boolean_t _parseDevice(const char *path, Device_T device) {
        const char *base = File_basename(path);
        for (int i = 0; base[i]; i++) {
                if (isdigit(*(base + i))) {
                        strncpy(device->key, base, i < sizeof(device->key) ? i : sizeof(device->key) - 1);
                        device->instance = Str_parseInt(base + i);
                        return true;
                }
        }
        LogError("filesystem statistics error -- cannot parse device '%s'\n", path);
        return false;
}
Comment 3 Martin Pala 2017-09-16 11:32:21 UTC
Hi,

thank you for report, i have fixed the problem in upstream, the Monit 5.24.0 that will include the fix should be available within ~1 week.

Best regards,
Martin
Comment 4 Stephan 2017-09-16 16:46:53 UTC
(In reply to martinp from comment #3)

Thanks again!

Stephan
Comment 5 Martin Pala 2017-09-24 18:34:29 UTC
Monit 5.24.0 was just released (includes fix for this issue), monit port update request submitted: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222566
Comment 6 Danilo G. Baio freebsd_committer freebsd_triage 2017-09-25 00:22:48 UTC
Update to 5.24.0 fixes this, ports r450555.
Comment 7 Franco Fichtner 2017-09-25 05:52:53 UTC
Thank you all!