→ 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: 
riceanny
Engaged Sweeper
I have to generate a report to check the power consumption in my company. This is what i need: how many minutes are the desktop computers left turned on between 7 pm and 8 am (overnight to understand)?
The best is to take this info for the last xx days or the last week or the last month.
I'm waiting for your answers.
Thank you to everybody
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
There is no easy way to include the information you are after in a report. TblAssets.Uptime only stores the uptime since the last reboot. There are uptime events (reboots, shutdowns...) stored in tblUptime as well, but there is no easy way to calculate uptime from this for a given time period, using SQL reports. We posted a sample query that summarizes uptime here, but this query only works in the SQL Server database server, will take a long time to run and is not easily customizable.

View solution in original post

4 REPLIES 4
Susan_A
Lansweeper Alumni
We don't currently provide support for modifying this report further, unfortunately. As you can tell, this is quite a complicated query and not easily modifiable.
riceanny
Engaged Sweeper
How can modify the report to sum only the power on night hours (from 7pm to 8am for example)?
Susan_A
Lansweeper Alumni
There is no easy way to include the information you are after in a report. TblAssets.Uptime only stores the uptime since the last reboot. There are uptime events (reboots, shutdowns...) stored in tblUptime as well, but there is no easy way to calculate uptime from this for a given time period, using SQL reports. We posted a sample query that summarizes uptime here, but this query only works in the SQL Server database server, will take a long time to run and is not easily customizable.
riceanny
Engaged Sweeper
I tried with that:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.SP,
tsysOS.Image As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
(Replace(Str(Convert(char(4),Convert(INT,tblAssets.Uptime / 86400)),
4, 0), ' ', '0') + 'd ' + Convert(char(10),DateAdd(s, tblAssets.Uptime,
Convert(datetime2,'0001-01-01')),108)) As UptimeAtScan,
tblAssets.Description
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Order By tblAssets.AssetName

The problem is that there is no time limit: if it's possible, i want to check the uptime only during the night (from 7pm to 8 am) and only for a limited period such as the last week or the last month. Can you help me?