I was able to create a report of machines that haven't been rebooted in 5+ days but need to create a smart label for machines that haven't restarted in 5 or more days. When i created the machine smart label i choose the last system reboot and use > 4 but the machines that are place in the smart label were reboot 2 days ago and the machines that haven't been rebooted in more than 5 days do not appear in the label
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1
You can try this.

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
                       UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
                  from MACHINE
                 where ((  LAST_SYNC > DATE_SUB(NOW(), INTERVAL 2 DAY))) AND ((  LAST_REBOOT < DATE_SUB(NOW(), INTERVAL 5 DAY)))
Answered 07/29/2014 by: nshah
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity