/build/static/layout/Breadcrumb_cap_w.png

How to create a label for machines that haven't been rebooted in 5 + days

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

Answers (1)

Posted by: nshah 9 years ago
Red Belt
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)))

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ