Whenever a computer has booted, shutdown or went to sleep is stored in the database table tblUptime and is pulled from the computer's Event Viewer. You can use the report below to base yourself on which will provide you with the event type and when it occurred. Do note that this will report will have a lot rows, as a row is generated for each uptime event.
Instructions for adding this report to your Lansweeper installation can be found
here. If you are interested in building or modifying reports, we do recommend:
- Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
- Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
Case tblUptime.EventType When 1 Then 'Power on' When 2 Then 'Power off'
When 3 Then 'Start sleep' When 4 Then 'End sleep'
When 5 Then 'Unexpected shutdown' Else '' End As EventType,
tblUptime.EventTime
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblUptime On tblAssets.AssetID = tblUptime.AssetId
Order By tblAssets.AssetName