Changeset 805


Ignore:
Timestamp:
Sep 13, 2013, 4:09:14 PM (12 years ago)
Author:
Herwig Bauernfeind
Message:

SMBMon 2.5: Add zombie detection

Location:
trunk/guitools/smbmon
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/smbmon/mkmsg.cmd

    r654 r805  
    11@echo off
    2 edit .\rc\lang\smbmon_de.mkm
    3 edit .\rc\lang\smbmon_en.mkm
    4 edit .\rc\lang\smbmon_sv.mkm
    5 edit .\rc\lang\smbmon_fr.mkm
    6 edit .\rc\lang\smbmon_es.mkm
    72mkmsgf .\rc\lang\smbmon_de.mkm smbmon_de.msg
    83mkmsgf .\rc\lang\smbmon_en.mkm smbmon_en.msg
  • trunk/guitools/smbmon/rc/lang/smbmon_de.mkm

    r703 r805  
    3333SMM0028I: wenn minimiert
    3434SMM0029I: WPS Methode zum Starten/Stoppen/Neustarten/Neu laden benutzen
    35 SMM0030?:
     35SMM0030I: Zombie-Prozesse feststellen
    3636; Daemons Context menu
    3737SMM0031I: Darstellung
  • trunk/guitools/smbmon/rc/lang/smbmon_en.mkm

    r703 r805  
    3333SMM0028I: when minimized
    3434SMM0029I: Use WPS method to Start/Stop/Restart/Reload
    35 SMM0030?:
     35SMM0030I: Detect zombies
    3636; Daemons Context menu
    3737SMM0031I: View
  • trunk/guitools/smbmon/rc/lang/smbmon_es.mkm

    r703 r805  
    3333SMM0028I: mientras est  minimizado
    3434SMM0029I: Utilizar WPS m‚todo para Iniciar/Parar/Reiniciar/Recargar
    35 SMM0030?:
     35SMM0030I: Detectar zombies
    3636; Daemons Context menu
    3737SMM0031I: Ver
  • trunk/guitools/smbmon/rc/lang/smbmon_fr.mkm

    r703 r805  
    3535SMM0028I: si r‚duit
    3636SMM0029I: Utilisez WPS m‚thode pout d‚marrage/arrˆt/red‚marrage/rechargement
    37 SMM0030?:
     37SMM0030I: D‚tecter zombies
    3838; Daemons Context menu
    3939SMM0031I: Afficher
  • trunk/guitools/smbmon/rc/lang/smbmon_sv.mkm

    r703 r805  
    3333SMM0028I: vid minimerad
    3434SMM0029I: Anv„nd WPS metod f”r att Start/Stop/Omstart/Omladdning
    35 SMM0030?:
     35SMM0030I: Identifiera Zombies
    3636; Daemons Context menu
    3737SMM0031I: Vy
  • trunk/guitools/smbmon/smbmon.rc

    r654 r805  
    1010icon 47 .\rc\icons\daemon_off.ico
    1111icon 48 .\rc\icons\pid.ico
     12icon 49 .\rc\icons\zombie.ico
    1213BITMAP 111 .\rc\throbber\eBall_01.bmp
    1314BITMAP 112 .\rc\throbber\eBall_02.bmp
  • trunk/guitools/smbmon/smbmon.vrp

    r797 r805  
    88VRXWindow: __VREMainWindow,1,2180,3614,1024,6769
    99VRXWindow: __VRESectionListWindow,1,4083,11226,7372,6589
    10 VRXWindow: __VREToolsWindow,1,2156,1494,5474,1661
     10VRXWindow: __VREToolsWindow,1,2156,1494,5477,1659
    1111VRXWindow: __VREWindListWindow,1,964,11708,3132,3150
    1212UserFile: 1
    1313UserWindow: Main,1
     14UserWindow: SW_DAEMONS,1
     15UserWindow: SW_SETTINGS,1
  • trunk/guitools/smbmon/smbmon.vrx

    r797 r805  
    330330    ok = VRSet("PB_Reload", "Enabled", VRFileExists(samba.!smbcmd))
    331331
    332     ok = VRSet("CN_Daemons", "View", DaemonView)
    333     ok = VRSet("CN_smbtree", "View", TreeView)
    334     ok = VRSet("CB_NoMsgBox","Set",  NoMsgBox)
    335     ok = VRSet("CB_WPSStartStop","Set",  WPSStartStop)
     332    ok = VRSet("CN_Daemons",      "View", DaemonView)
     333    ok = VRSet("CN_smbtree",      "View", TreeView)
     334    ok = VRSet("CB_NoMsgBox",     "Set",  NoMsgBox)
     335    ok = VRSet("CB_WPSStartStop", "Set",  WPSStartStop)
     336    ok = VRSet("CB_DetectZombies","Set",  DetectZombies)
    336337
    337338    call _INILayoutRead "CN_Users"
     
    423424    if Font.!Status   = "" then Font.!Status   = "9.WarpSans"
    424425
    425     Intervall = VRGetIni( "Settings", "Intervall", OurINI)
     426    Intervall = VRGetIni( "Settings", "Intervall", OurINI,'NoClose')
    426427    if Intervall = "" then Intervall = 60
    427428
    428     IntervallMin = VRGetIni( "Settings", "IntervallMin", OurINI)
     429    IntervallMin = VRGetIni( "Settings", "IntervallMin", OurINI,'NoClose')
    429430    if IntervallMin = "" then IntervallMin = 180
    430431
    431     CurrentPageNr = VRGetIni( "Settings", "CurrentPageNr", OurINI)
     432    CurrentPageNr = VRGetIni( "Settings", "CurrentPageNr", OurINI,'NoClose')
    432433    if CurrentPageNr = "" then CurrentPageNr = 4
    433434
    434     DaemonView = VRGetIni( "Settings", "DaemonView", OurINI)
     435    DaemonView = VRGetIni( "Settings", "DaemonView", OurINI,'NoClose')
    435436    if DaemonView = "" then DaemonView = "Detail"
    436437
    437     TreeView = VRGetIni( "Settings", "TreeView", OurINI)
     438    TreeView = VRGetIni( "Settings", "TreeView", OurINI,'NoClose')
    438439    if TreeView = "" then TreeView = "IconTree"
    439440
    440     NoMsgBox = VRGetIni( "Settings", "NoMsgBox", OurINI)
     441    NoMsgBox = VRGetIni( "Settings", "NoMsgBox", OurINI,'NoClose')
    441442    if NoMsgBox = "" then NoMsgBox = 1
    442443
    443     WPSStartStop = VRGetIni( "Settings", "WPSStartStop", OurINI)
     444    WPSStartStop = VRGetIni( "Settings", "WPSStartStop", OurINI,'NoClose')
    444445    if WPSStartStop = "" then WPSStartStop = 1
     446
     447    DetectZombies = VRGetIni( "Settings", "DetectZombies", OurINI,'NoClose')
     448    if DetectZombies = "" then DetectZombies = 0
    445449
    446450    options.!debug = VRGetIni( "Options", "Debug", OurINI)
     
    490494    ok = VRSetIni( "Settings", "WPSStartStop", WPSStartStop,                   OurINI,'NoClose')
    491495    ok = VRSetIni( "Settings", "BigIcons",     \VRGet("CN_SMBTREE", "MiniIcons"),OurINI,'NoClose')
     496    ok = VRSetIni( "Settings", "DetectZombies",DetectZombies,                  OurINI,'NoClose')
    492497
    493498    ok = VRSetIni( "Options",  "Debug",    options.!debug,             OurINI, 'NoClose' )     
     
    589594    CALL NLVSetText 'Page_6',      'Hinttext', 60  */
    590595
    591     CALL NLVSetText 'DT_Refresh',     'Caption',  25
    592     CALL NLVSetText 'DT_RefreshMin',  'Caption',  25
    593     CALL NLVSetText 'DT_Intervall',   'Caption',  26
    594     ok = VRSet("DT_IntervallMin","Caption", NLVGetMessage(26)' 'NLVGetMessage(28))
    595     CALL NLVSetText 'CB_NoMsgBox',    'Caption',  27
    596     CALL NLVSetText 'CB_WPSSTARTSTOP','Caption',  29
     596    CALL NLVSetText 'DT_Refresh',      'Caption',  25
     597    CALL NLVSetText 'DT_RefreshMin',   'Caption',  25
     598    CALL NLVSetText 'DT_Intervall',    'Caption',  26
     599    ok = VRSet("DT_IntervallMin",      "Caption", NLVGetMessage(26)' 'NLVGetMessage(28))
     600    CALL NLVSetText 'CB_NoMsgBox',     'Caption',  27
     601    CALL NLVSetText 'CB_WPSSTARTSTOP', 'Caption',  29
     602    CALL NLVSetText 'CB_DetectZombies','Caption',  30
    597603
    598604    CALL NLVSetText 'ContextMenu_Daemons_Sort',   'Caption', 35
     
    846852            end
    847853            smbdpidhandle.I = VRMethod( "CN_Daemons", "AddRecord", smbdhandle, , 'PID 'word(smbdpids,I)' ('d2x(word(smbdpids,I))'x)', "$48")
     854            /* we ping all smbd.exe except the first one */
     855            if DetectZombies = 1 & I > 1 then do
     856                ok = VRSet("Main", 'Pointer', 'Wait' )
     857                address cmd samba.!smbcontrolexe' 'word(smbdpids,I)' ping --timeout=2 --debuglevel=0 2>'samba.!error' 1>'samba.!msg
     858                ok = VRSet("Main", 'Pointer', '<default>' )
     859                response = linein(samba.!msg)
     860                ok = stream(samba.!msg,'c','close')
     861                if pos('PONG', response) = 0 then do /* we have a zombie */
     862                    ok = VRMethod( "CN_Daemons", "SetRecordAttr", smbdpidhandle.I,"Icon", "$49")
     863                    say "  Found Zombie "word(smbdpids,I)
     864                end
     865            end
    848866            if Username <> "" then do
    849867                smbdpidhandle.I.user = VRMethod( "CN_Daemons", "AddRecord", smbdpidhandle.I, , Username, "$44")
     
    12171235    if options.!Debug then ok = VRREdirectStdIO("ON")
    12181236                      else ok = VRREdirectStdIO("OFF")
     1237return
     1238
     1239/*:VRX         CB_DetectZombies_Click
     1240*/
     1241CB_DetectZombies_Click:
     1242    DetectZombies = VRGet("CB_DetectZombies","set")
     1243    say 'DetectZombies = "'DetectZombies'"'
    12191244return
    12201245
     
    22292254SW_FILES_Init:
    22302255    window = VRInfo( "Object" )
    2231     if( \VRIsChildOf( window, "Notebook" ) ) then do
     2256    if( \VRIsChildOf( window, "TDL" ) ) then do
    22322257        call VRMethod window, "CenterWindow"
    22332258        call VRSet window, "Visible", 1
     
    22602285SW_SERVICE_Init:
    22612286    window = VRInfo( "Object" )
    2262     if( \VRIsChildOf( window, "Notebook" ) ) then do
     2287    if( \VRIsChildOf( window, "TDL" ) ) then do
    22632288        call VRMethod window, "CenterWindow"
    22642289        call VRSet window, "Visible", 1
     
    22912316SW_SETTINGS_Init:
    22922317    window = VRInfo( "Object" )
    2293     if( \VRIsChildOf( window, "Notebook" ) ) then do
     2318    if( \VRIsChildOf( window, "TDL" ) ) then do
    22942319        call VRMethod window, "CenterWindow"
    22952320        call VRSet window, "Visible", 1
     
    23222347SW_SMBTREE_Init:
    23232348    window = VRInfo( "Object" )
    2324     if( \VRIsChildOf( window, "Notebook" ) ) then do
     2349    if( \VRIsChildOf( window, "TDL" ) ) then do
    23252350        call VRMethod window, "CenterWindow"
    23262351        call VRSet window, "Visible", 1
Note: See TracChangeset for help on using the changeset viewer.