‎07-10-2014 02:46 PM
‎07-11-2014 12:38 AM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
DateAdd(second, 0 - tblAssets.Uptime, tblAssets.Lastseen) AS LastBoot,
Convert(Decimal(6,2),tblAssets.Uptime / 60 / 60 / 24) AS DaysUp,
Convert(VARCHAR(12),Floor(tblAssets.Uptime / 60 / 60 / 24)) + ' days, '
+ Right('0' + Convert(VARCHAR(12),Floor(tblAssets.Uptime / 60 / 60 % 24)), 2) + ':'
+ Right('0' + Convert(VARCHAR( 2),Floor(tblAssets.Uptime / 60 % 60)), 2) + ':'
+ Right('0' + Convert(VARCHAR( 2),Floor(tblAssets.Uptime % 60)), 2) AS DaysUpPretty
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblComputersystem ON tblAssets.AssetID = tblComputersystem.AssetID
WHERE
tblAssetCustom.State = 1
AND DateDiff(d, tblAssets.Lastseen, GetDate()) < 8 -- not interested in machines not seen within a week
AND tblComputersystem.Domainrole < 2 -- not interested in servers (>1)
ORDER BY
tblAssets.Uptime Desc
‎07-11-2014 11:21 AM
RC62N wrote:
Probably more useful to you would be something similar to what we see in the uptime calendar that we see on the asset summary page. I believe I read in another thread that being able to report on something like that is a wishlist item.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now