Skip to main content
March 4, 2022

How to check disk space

  • March 4, 2022
  • 7 replies
  • 1 view

Hi,

I've had a dig around, but I can't seem to find it.  Anyone know where I can see the disk space utilisation?

We've set up a number of new apps in our environment recently, and I'm concerned we might be running out of space.

7 replies

March 4, 2022

Hi Beeswing,
I do not think you can find this directly and the reason behind is that the space increases automatically on Azure elastic pools. I think you could have a look under System > Environement>OS DB Server and do a filter on ElasticPoolStorageMB. That is the closest thing i can help with.


NicolasArgente_0-1646405598757.png

Please give a kudo if it helps 🙂

March 7, 2022

Hello! 
We're on the cloud and this is how we review our application space: 


NicoleBruno_0-1646680547526.png

Bottom right corner of the dashboard lists the GB used by application in the environment where you've originated the dashboard (ie. DEV or PROD environments). Hope that's useful! 

 

BeeswingAuthor
June 9, 2022

Hi..  I know it's been a while, but hoping you could provide some more info.  
I don't have the Database Statistics Dashboard that you mentioned, and I can't find it on the market place.  Is this one you created yourself?  Or is it indeed from something in the market place?

 

Thanks

June 13, 2022

Hi, 

It's not a marketplace tool. Can you try searching your dashboards for "storage chart" and see if it's there?


NicoleBruno_0-1655122711668.png

I assume it's out of the box OS as we didn't create it. If you can't find it, I'd suggest contacting your OS customer success/account manager or maybe submitting a OS support ticket for more direction. 

June 14, 2022

Hi, you can check an individual database size with an extensibility rule containing code like this:

Dim sql As String = "EXEC sp_spaceused;"
Dim dbConnApp As DbConnInfoApp = brapi.Database.CreateApplicationDbConnInfo(si)

Using dbConnApp
Using dt As DataTable = BRAPi.Database.ExecuteSql(dbConnApp, sql.ToString, True)
If Not dt Is Nothing Then
'Reference dt to access data table results
For Each dr As DataRow In dt.Rows
'Process rows
brapi.ErrorLog.LogMessage(si, "database_size: " + dr("database_size"))
brapi.ErrorLog.LogMessage(si, "unallocated space: " + dr("unallocated space"))
Next

End If
End Using
End Using

May 28, 2025

Mark:  I hope you don't mind.  I add the full code.  For those like me who struggle with VB.  :)

Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Data.Common
Imports System.Globalization
Imports System.IO
Imports System.Linq
Imports Microsoft.VisualBasic
Imports OneStream.Finance.Database
Imports OneStream.Finance.Engine
Imports OneStream.Shared.Common
Imports OneStream.Shared.Database
Imports OneStream.Shared.Engine
Imports OneStream.Shared.Wcf
Imports OneStream.Stage.Database
Imports OneStream.Stage.Engine
 
Namespace OneStream.BusinessRule.Extender.SJP_GIGChk 'Your Extensibility Rule must be the same name.
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As ExtenderArgs) As Object
Try
'Hi, you can check an individual database size With an extensibility rule containing code Like this:
 
Dim sql As String = "EXEC sp_spaceused;"
Dim dbConnApp As DbConnInfoApp = brapi.Database.CreateApplicationDbConnInfo(si)
 
Using dbConnApp
Using dt As DataTable = BRAPi.Database.ExecuteSql(dbConnApp, sql.ToString, True)
If Not dt Is Nothing Then
'Reference dt to access data table results
For Each dr As DataRow In dt.Rows
'Process rows
brapi.ErrorLog.LogMessage(si, "database_size: " + dr("database_size"))
brapi.ErrorLog.LogMessage(si, "unallocated space: " + dr("unallocated space"))
Next
 
End If
End Using
End Using
 
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace
 
 
May 28, 2025

Hi Spalomino

Thanks for providing this solution. I have a question, where i would see the results after running this business, Rule?

Thank you 

Sandy

 

May 28, 2025

The system diagnostics dashboard has that info here:



 

May 28, 2025

Sandy:  The output of the code shows up in the System>Error Log.  You will see two lines one for unallocated space, the other for database_size.  

T_Kress:  Thanks for sharing.  I did download that application, but I couldn't get it to run on my version of 8.5.  That is why I went the code direction.

Thanks,

SP

May 28, 2025

I tried this solution, and it works perfectly for an application. It would show the size details for that specific app which is open. I am just wondering if it's possible to make this rule work for Environment level?

May 29, 2025

Sandy:  I am sure that is possible.  We would just need to find the SQL stored command that would provide that information.  I'll look around and see what I can find.