→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Biskot188
Engaged Sweeper
Hi All,

I'm trying to consolidate a report with all our assets and get information for CPU,Memory, Cores etc, however only the windows machines are reporting back i assume such information is stored in different linux tables, can someone please help to get this report working reflecting Linux assets as well.

Thank you.



Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
Coalesce(tsysOS.OSname, tblLinuxSystem.OSRelease, tblMacOSInfo.SystemVersion)
As OS,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssets.IPAddress,
tblAssets.Description,
tblAssets.FQDN,
tblAssetCustom.Location,
tblAssetCustom.Serialnumber,
tblAssetCustom.Custom1,
tblAssetCustom.Custom2,
tblAssetCustom.Custom3,
tblAssetCustom.Custom4,
tblAssetCustom.Custom5,
tblAssetCustom.Custom6,
tblAssetCustom.Custom7,
tblAssetCustom.Custom8,
tblAssetCustom.Custom9,
tblAssetCustom.Custom10,
tblAssetCustom.Custom11,
tblAssetCustom.Custom12,
tblAssetCustom.Custom13,
tblProcessor.NumberOfCores * tblAssets.NrProcessors As PhysicalCPUSockets,
tblAssets.Memory,
tblAssets.NrProcessors As #CPU,
tblAssets.Processor,
tblState.Statename As State
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tblLinuxSystem On tblAssets.AssetID = tblLinuxSystem.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblMacOSInfo On tblAssets.AssetID = tblMacOSInfo.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Order By tblAssets.AssetName


1 REPLY 1
Esben_D
Lansweeper Employee
Lansweeper Employee
The best thing to do is ensure that you are not excluding results because of OS specific tables.

The number of cores is only scanned for Windows assets, so you won't see it for other types. Since all the other information you want is in general asset tables, I've filtered the results so that it only displays Windows, Linux and Macs.

Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssets.IPAddress,
tblAssets.Description,
tblAssets.FQDN,
tblAssetCustom.Location,
tblAssetCustom.Serialnumber,
tblAssetCustom.Custom1,
tblAssetCustom.Custom2,
tblAssetCustom.Custom3,
tblAssetCustom.Custom4,
tblAssetCustom.Custom5,
tblAssetCustom.Custom6,
tblAssetCustom.Custom7,
tblAssetCustom.Custom8,
tblAssetCustom.Custom9,
tblAssetCustom.Custom10,
tblAssetCustom.Custom11,
tblAssetCustom.Custom12,
tblAssetCustom.Custom13,
tblAssets.Memory,
tblAssets.NrProcessors As [# CPU],
tblProcessor.NumberOfCores As [# Cores],
tblAssets.Processor,
tblState.Statename As State,
tsysAssetTypes.AssetTypename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Where tsysAssetTypes.AssetTypename In ('Windows', 'Linux', 'Apple Mac')
Order By tblAssets.AssetName