→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

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

is it possible to create a report that shows servers/computers with Linux?

Thanks
Kassim
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Hi,

Use the following report:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename Like 'linux'


To use the report above, do the following:
• Open the report builder under Reports/Create New Report.
• Paste the SQL code we provided at the bottom of the page.
• Left-click somewhere in the upper section of the page so the code applies.
• Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.

View solution in original post

9 REPLIES 9
Hemoco
Lansweeper Alumni
Please use the following query:

Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Computer Name],
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Processor,
tblAssets.IPAddress,
tblAssets.Mac,
tblOperatingsystem.Caption As os,
tblAssetCustom.Serialnumber,
tblAssets.SP,
tblNetwork.DefaultIPGateway,
tblAssets.Lastseen,
tsysAssetTypes.AssetTypename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Left Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Left Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where (tsysAssetTypes.AssetTypename Like 'linux') Or
(tblComputersystem.Domainrole > 1 And tblNetwork.IPEnabled = 'true')
Order By [Computer Name]
Kassim
Engaged Sweeper
Hi,

another request for a report if I may. You kindly provided a few reports to pull back information & what I am now trying to do is gather more detail about Linux/windows servers by trying to merge two reports that you provided below. the reports are below

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Computer Name],
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Processor,
tblAssets.IPAddress,
tblAssets.Mac,
tblOperatingsystem.Caption As os,
tblAssetCustom.Serialnumber,
tblAssets.SP,
tblNetwork.DefaultIPGateway
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Where tblNetwork.IPEnabled = 'true'
Order By [Computer Name]


Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress
From tblAssets
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where (tsysAssetTypes.AssetTypename Like 'linux') Or
(tblComputersystem.Domainrole > 1)

I have tried to merge the two somehow but only got limited success, would you be able to assist with this request?

Thanks.
Kassim
Engaged Sweeper
Thanks

That looks spot on.
Hemoco
Lansweeper Alumni
You can use the report down here for this information:
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress
From tblAssets
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where (tsysAssetTypes.AssetTypename Like 'linux') Or
(tblComputersystem.Domainrole > 1)
Kassim
Engaged Sweeper
Hi,

Thanks for the code for the Windows servers above which I know already exists in the reports in lansweeper. is it possible to merge this code with what you provided for Linux as a way around?
Hemoco
Lansweeper Alumni
Hi,

It is impossible to see in Lansweeper if a linux device is a server.

For the windows server you can run this report.

Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon16 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Lastseen
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblComputersystem.Domainrole > 1
Kassim
Engaged Sweeper
Hi

I am currently struggling create a report that shows all Windows & Linux servers. Could you please assist with the SQL for this type of report.

Thanks
Kassim
Engaged Sweeper
Thanks for the code, exactly what I need.
Hemoco
Lansweeper Alumni
Hi,

Use the following report:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename Like 'linux'


To use the report above, do the following:
• Open the report builder under Reports/Create New Report.
• Paste the SQL code we provided at the bottom of the page.
• Left-click somewhere in the upper section of the page so the code applies.
• Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.