‎01-22-2015 11:41 PM
Solved! Go to Solution.
‎01-26-2015 01:08 PM
‎02-06-2015 03:57 PM
‎02-06-2015 03:50 PM
‎11-19-2018 11:47 PM
MaginHdez wrote:
Hi,
I created this report in order to reduce multiple results for each computer, try it and I hoppe can help you
Select Top 10000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Description,
Convert(Decimal(7,2),tblAssets.Uptime / 60 / 60 / 24) As UptimeDays,
DateDiff(m, tblAssets.Firstseen, tblAssets.Lastseen) As MonPeriod,
tblAssetCustom.Model,
max(tbluptime.eventtime) as LastUp,
datediff(dd,max(tbluptime.eventtime),getdate()) as UpDays
From tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblComputersystem.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblUptime On tblComputersystem.AssetID = tblUptime.AssetId
Where tblComputersystem.Domainrole > 1 And tblAssetCustom.State = 1
group by
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Description,
Convert(Decimal(7,2),tblAssets.Uptime / 60 / 60 / 24),
DateDiff(m, tblAssets.Firstseen, tblAssets.Lastseen),
tblAssetCustom.Model
order by UpDays
Regards.
‎01-26-2015 01:08 PM
‎02-19-2019 10:18 AM
Daniel.B wrote:
tblAssets.Uptime contains the uptime of the computer since it's last reboot. It doesn't provide information about how long the computer has been up altogether. Have a look also on the Database Dictionary which is accessible from the Report Builder.
Events for each Power on and Power off are saved in tblUptime. But since you only have Date and Time for each single event, the uptime can't be easily calculated. You need to loop through all entries in this table in order to sum up the uptime. We are working on a widget which can calculate computer uptime over a given number of days.
‎01-23-2015 03:47 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now