Need relevance code to check servers not rebooted from 60 days

Hi All, Can you please help me to form relevance to get details of servers which have not rebooted from past 60 days.

I can check this for an example:-1:

<?Relevance ( names of it, operating systems of it, values of results (bes property "Boot Time", it) ) of bes computers whose ( value of result from (bes property "Device Type") of it starts with "Server" and now - (it as time) of value of result from (bes property "boot time") of it > 60 * day ) ?>

Hello @tarwaniv,
you might consider “uptime of operating system”

E.g. in my lab

Q: uptime of operating system
A: 7 days, 04:17:24.359

Q: uptime of operating system >7*day
A: True

Q: uptime of operating system >8*day
A: False

Let me know if it’s effective for you.
Regards.

3 Likes

Looks like you are asking for Session relevance to use in a web report.

I don’t have the Device Type nor Boot Time properties turned on in my lab, so here is a variation that pulls from a different BES Property, Last Report Time and adds in a detail from the CPU property.

( names of it, operating systems of it, values of results (bes property "Last Report Time", it ), values of results (bes property "CPU", it )) of bes computers whose ((now - (it as time) of value of result (bes property "Last Report Time", it )) < 60*day )

You could add in additional properties in the top section of the relevance in order to pull more details.

Also, this method does not take advantage of error trapping and other reporting niceties. You might try a form like I have in my blog post here:
https://www.ibm.com/developerworks/community/blogs/e9d21113-aa93-467e-ac77-a0d20a21eaec/entry/Session_Relevance_Computer_Properties_query_Efficiency?lang=en

You would add your BES Computer Filter in the bottom most tuple.