You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The real uptime is "19:15:28 up 2 days, 37 min, 2 users, load average: 2.11, 1.46, 1.17", so it seems YABS is parsing it incorrectly. An easy fix would be to replace line 215 with:
As reported by lukast__ at LowEndSpirit:
I just had a YABS with a weird uptime when the system is up X days, 0 hours and Y minutes:
The real uptime is "19:15:28 up 2 days, 37 min, 2 users, load average: 2.11, 1.46, 1.17", so it seems YABS is parsing it incorrectly. An easy fix would be to replace line 215 with:
UPTIME=$(uptime | awk -F'( |,|:)+' '{d=h=m=0; if ($7=="min") m=$6; else {if ($7~/^day/) {d=$6; if ($9~/^min/) m=$8; else {h=$8;m=$9}} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}')
But is there any reason you're not simply using
uptime --pretty
?The text was updated successfully, but these errors were encountered: