Skip to content

SmartOS `uptime` regex fix

On SmartOS (and maybe other Solaris / Illumos related distros?) the uptime command output looks something like this:

hamilton 59 $ /usr/bin/uptime
15:21:04    up 63 day(s), 21 hr(s),  1 user,  load average: 0.43, 0.32, 0.35

and the (s) structure isn't understood by the parsing regex. This change solves that for "day(s)". It's possible that a similar fix might be needed for "hour(s)" etc.

Edited by Dennis Boone

Merge request reports

Loading