What value format are fields such as 'Uptime' and 'Last Reboot/Shutdown' looking for in the Advanced Inventory Search?

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Uptime: just using hours works for me. I just tested uptime > 576; an accurate count of PCs that could use a reboot was returned.
Last Reboot / Shutdown appears to be actual dates, which makes doing a boolean comparison difficult; but I may be wrong on that.

I realize that doesn't directly answer your question about the actual format of the data, sorry.

Billy
Answered 12/02/2011 by: HonestlyImNotBatman
Yellow Belt

Please log in to comment
0
The format of both fields is not determined by us and is different across different OSes and versions. We are working on dealing with all those different formats but today you would have to make your own list via reporting or with a regex.

For now both fields are just strings that we put the given date into so any > or < is doing doing character-set comparison left-to-right. This list for example is sorted greatest to least and shows where 576 falls. Your current results do not likely match your intended question or are a coincidence in the data.

empty
99 days, 3 hours, 51 minutes
9 days, 11 hours, 43 minutes
576 would fall here <----------------------------------------
146 days, 1 hours, 34 minutes
0,11:2


This doesn't cover all the formats I have seen but someone took a crack at a report to make them look simiar so at least a regex could be used:

selectM.NAME as System,M.IP,REPLACE(M.USER_LOGGED,'\\','\\\\') as USER_LOGGED,if(UPTIME like '%days%', UPTIME,concat((SUBSTRING_INDEX(UPTIME,',',1)),' days,',(SUBSTRING_INDEX(SUBSTRING_INDEX(UPTIME,':',1), ',', -1)), ' hours,',(SUBSTRING_INDEX(SUBSTRING_INDEX(UPTIME,':',-1), 'hours, ', -1)), 'minutes')) as Uptimefrom MACHINE M
Answered 12/02/2011 by: GillySpy
Seventh Degree Black Belt

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