Ignore:
Timestamp:
May 26, 2016, 9:02:53 AM (9 years ago)
Author:
Herwig Bauernfeind
Message:

GUITools: SMBMon (TDB Check page), shared library updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/smbmon/smbmon.vrx

    r875 r908  
    107107ok = VRMethod("CN_CHKTDB", "RemoveRecord", "ALL")
    108108
     109RecHandleArray.0 = 0
     110ok = VRSet("CN_CHKTDB", "Painting", 0)
     111
    109112do I = 1 to tdb.0
    110     RecHandle = VRMethod("CN_CHKTDB", "Addrecord")
     113    RecHandleArray.I = VRMethod("CN_CHKTDB", "Addrecord")
     114end
     115ok = VRSet("CN_CHKTDB", "Painting", 1)
     116
     117/* ok = VRSet("CN_CHKTDB", "Painting", 0) */
     118
     119do I = 1 to tdb.0
     120    RecHandle = RecHandleArray.I
    111121    TDBFile =left(filespec('N',tdb.I), 22)
    112     ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBFilesFH, TDBFile, ChkTDBIconFH, "$50" )
     122    TDBSize = stream(tdb.I,'c','query size')
     123    ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBFilesFH, TDBFile, ChkTDBIconFH, "$50", ChkTDBSizeFH, TDBSize||" Bytes" )
    113124    address cmd '@tdbtool 'tdb.I' check 2>'tdb.I'.err 1>'tdb.I'.out'
    114125    out = linein(tdb.I'.out')
     
    142153        end
    143154        ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBStatusFH, out )
     155        ok = VRSet("CN_CHKTDB", "Painting", 1)
     156        ok = VRSet("CN_CHKTDB", "Painting", 0)
     157
    144158        ok = stream(tdb.I'.err','c','close')
    145159    end
     
    177191end
    178192
     193ok = VRSet("CN_CHKTDB", "Painting", 1)
     194
    179195return
    180196
     
    251267    ChkTDBFilesFH = VRMethod( "CN_CHKTDB", "AddField", "String", NLVGetMessage(134) )
    252268    ChkTDBIconFH  = VRMethod( "CN_CHKTDB", "AddField", "Icon",   NLVGetMessage(146) )
     269    ChkTDBSizeFH  = VRMethod( "CN_CHKTDB", "AddField", "String", NLVGetMessage(152) )
    253270    ChkTDBStatusFH= VRMethod( "CN_CHKTDB", "AddField", "String", NLVGetMessage(151) )
    254271
     
    567584*/
    568585_INIWrite:
    569     say 'start _INIWrite()'
     586    IF options.!debug == 1 then say time()' _INIWrite() started'
    570587    ok = VRSetIni( "Pos", "Top",          VRGet("Main","Top"),         OurINI, 'NoClose' )
    571588    ok = VRSetIni( "Pos", "Left",         VRGet("Main","Left"),        OurINI, 'NoClose' )
     
    605622    ok = VRSetIni( "Fonts", "Statusfont", VRGet("DT_StatusBar","Font"),OurINI, 'NoClose' )
    606623    ok = VRSetIni( "Fonts", "Main",       VRGet("Main","Font"),        OurINI )
    607     say 'done _INIWrite()'
     624    IF options.!debug == 1 then say time()' _INIWrite() done'
    608625return
    609626
     
    869886    ok = stream(refresherr, 'c','close')
    870887    ok = SysFileDelete(refreshouterr)
     888    if VRFileExists( samba.!bin"\smbsched.cmd" ) then do
     889        address cmd samba.!bin"\smbsched.cmd"
     890    end
    871891
    872892    call _RefreshDaemons
     
    11981218    if uS <> 0 | UpTimeStr = ' 'NlvGetMessage(43)':' then UpTimeStr = UpTimeStr' 'uS' 'NlvGetMessage(49)
    11991219
    1200     ok = VRset("CN_Daemons", "Caption", UpTimeStr)
     1220    loggingfreespace = word(sysdriveinfo(left(samba.!log,2)),2)%1024%1024
     1221
     1222    ok = VRset("CN_Daemons", "Caption", UpTimeStr' 'loggingfreespace' MB')
     1223
     1224    select
     1225        when loggingfreespace <  50 then ok = VRDeleteFile(samba.!log'\log.*')
     1226        when loggingfreespace < 100 then ok = VRset("CN_Daemons","BackColor","Red")
     1227        when loggingfreespace < 200 then ok = VRset("CN_Daemons","BackColor","Yellow")
     1228        otherwise ok = VRset("CN_Daemons","BackColor","SystemWindow")       
     1229    end
    12011230
    12021231    IF options.!debug == 1 then say time()' _SambaUptime() done'
Note: See TracChangeset for help on using the changeset viewer.