User bio
404 bio not found
Member since Aug 24, 2016
Posts:
Dewald has not published any posts yet.
Replies:
Hi Paul,
 
Hope this helps:
 
ClassMethod GLOBALSIZEPERGLOBAL(global As %String, outputDir As %String = "")
{
    S Directory="/usr/cachesys/mgr/UMDBDATA"
    if ('outputDir)
    {
        set outputDir = "/home/cache/"    
    }
    
    Set file=##class(%File).%New(outputDir_"GLOBALSIZEPERGLOBAL"_$ZSTRIP($ZU(188),"*CP")_".csv")
    Do file.Open("WSN")
    S Count=1
    S Rset=##class(%ResultSet).%New("%SYS.GlobalQuery:Size")
    D Rset.Execute(Directory,,"*",1)
     While Rset.Next() {
        S Res(Count,"Name")=Rset.Get("Name")
        S Res(Count,"MB")=Rset.Get("Allocated MB")
        
        if (Res(Count,"Name") [ global)
        {
            Do file.WriteLine(Res(Count,"Name")_","_Res(Count,"MB"))
            /*Do file.WriteLine("------------------------------")
            Do file.WriteLine("--GLOBAL-- "_Res(Count,"Name"))
            Do file.WriteLine("--SIZE(MB)-- "_Res(Count,"MB"))
            Do file.WriteLine("-------------------------------")*/
            Do file.WriteLine("")
        }
        S Count=Count+1
     }
     Do file.Close()
 quit $$$OK
}
 
 

I believe on the stream it will be more difficult.

Certifications & Credly badges:
Dewald has no Certifications & Credly badges yet.
Global Masters badges:
Dewald has no Global Masters badges yet.
Followers:
Dewald has no followers yet.
Following:
Dewald has not followed anybody yet.