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
}
{
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.
Hi Bill,
When will the official release be out? Have been waiting since the 2015 after our 2014 conference when we heard it would by done by end of 2015? Really exited not to work on Windows anymore and also not using studio in remote connections as it chews bandwidth and tends to be really slow.
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.
set key = $O(^Users(""))
While key '= ""
{
if ($DATA( ^Users(key,"SETTINGS","isAllowed"))>0)
{
set isAllowed = ^Users(key,"SETTINGS","isAllowed")
}
set key = $O(^Users(key))
}