Set a threshold for uptime?

Forums Desktop Info Set a threshold for uptime?

Tagged: ,

Viewing 3 reply threads
  • Author
    • #3201

      How can I set a threshold to change the text color if the uptime is greater than 14 days? I’ve tried putting a threshold in the UPTIME line and BOOTTIME, but couldn’t get either to work. I didn’t see anything in the documentation for applying thresholds to time or timers.

      UPTIME=set:uptime,hidden:1,display:%1d :%2h :%3m :%4s
      BOOTTIME=interval:1,display:%9 (Up: %uptime%),style:b

    • #3202

      Putting a threshold in BOOTTIME does nothing because the numbers are static.

      This will change the color when the uptime days reaches 14:
      UPTIME=threshold1:1 14 0000f0

      Of course you won’t see it if it’s hidden.

      I can see you want a combination of boot time and up time on the one display line and make it go red if up time is 14 days or more. I’ve reversed the item order to achieve that:

      BOOTTIME=display:%9 %10,set:boottime,hidden:1
      UPTIME=interval:60,text:Boot Time,display:%boottime% (Up:%1 days %2 hrs %3 mins),threshold1:1 14 0000f0

      • This reply was modified 2 years, 4 months ago by GlennGlenn.
      • This reply was modified 2 years, 4 months ago by GlennGlenn.
    • #3205

      This is perfect. I had tried something very similar, but I put it in the wrong place.

      This is doing exactly what we need, but I’m curious if a threshold is also possible for boottime. Like if the current date is 14 days after the boot time.

      Thanks again!

    • #3209

      We’ve used: UPTIME=active:1,text:Last Restart,display:%1 days %2 hours ago,threshold1:1 15 0000ff

Viewing 3 reply threads
  • The topic ‘Set a threshold for uptime?’ is closed to new replies.
Glenn's Page