Set a threshold for uptime?

Forums Desktop Info Set a threshold for uptime?

Tagged: ,

  • This topic has 3 replies, 2 voices, and was last updated 1 month ago by AvatarHappyUser.
Viewing 3 reply threads
  • Author
    Posts
    • #3201 Reply
      AvatarArvis
      Participant

      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

      0
    • #3202 Reply
      GlennGlenn
      Keymaster

      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 1 month ago by GlennGlenn.
      • This reply was modified 1 month ago by GlennGlenn.
      0
    • #3205 Reply
      AvatarArvis
      Participant

      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!

      1+
    • #3209 Reply
      AvatarHappyUser

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

      2+
Viewing 3 reply threads
Reply To: Set a threshold for uptime?
Your information:




Do NOT follow this link or you will be banned from the site!