Pandora FMS Community

Folder Size

fonta · 24 abr 2013, 14:29 · 13 mensajes · 89 visitas

  1. Inicio del debate

    Hi, i have a little "problem", i want to monitor the folder size in a windows client with pandora agent but i haven't find the right way Can someone help me please? bye

  2. Hello, you can use "du" command. Download this file and copy du.exe in C:ProgramFilespandora_agentutil. Then in cmd execute "du " and check the result. Regards

  3. I've already try DU but if i want to check only the size i don't know how to use it.... example C:>du c:intel 0      c:intel/ExtremeGraphics/CUI/Resource 0      c:intel/ExtremeGraphics/CUI 0      c:intel/ExtremeGraphics 1092    c:intel/Logs 1092    c:intel i want only the number so that  i can monitor it in pandora

  4. Use this du -q | grep Size:

  5. not yet... the result with that command is C:>du -q d:sqldata | grep Size: Size:        8.620.808.044 bytes i need only the number 8.620.808.044

  6. Perfect! And now? du -q d:sqldata | grep Size: | gawk "{print $2}"

  7. Great!! C:>du -q d:sqldata | grep Size: | gawk "{print $2}" 8.620.808.044 that's what i'm looking for!! thank a lot Bye

  8. Step 2:  how can i integrate it in a agent module? i've add this module to my agent # Controllo log SQL module_begin module_name Cartella Sqldata (GB) module_type generic_data module_exec du -q d:sqldata | grep Size: | gawk "{print $2}" module_postprocess 0,00000000095367431640625 module_description Controllo dimensioni Cartella D:Sqldata (GB) module_min_critical 10 module_end but when i'm trying to start agent the log give me this error 2013-04-24 15:56:08 Pandora agent started 2013-04-24 15:56:27 Pandora_Module_Exec: Cartella Sqldata (GB) timed out (retcode: 259) what's wrong?

  9. How long does it take to run in cmd?

  10. less than 1 sec

  11. Hi fonta. Have you checked if without module_postprocess, works?? You can set pandora_agent in debug mode, (change to 1 debug in pandora_agent.conf) and check the messages in pandora_debug.log.

  12. i've enable tha debug, this is the log file... i try to run exactly the comman - cmd.exe /c "du -q d:sqldata | grep Size: | gawk "{print $2}"" - and it works fine... 2013-04-26 14:23:27 Run begin 2013-04-26 14:23:27 Run Spazio Disco C: 2013-04-26 14:23:27 Run Spazio Disco D: 2013-04-26 14:23:27 Run Servizio Accodamento Messaggi 2013-04-26 14:23:27 Run Servizio Amministrazione di IIS 2013-04-26 14:23:27 Run Servizio Smart3COM 2013-04-26 14:23:27 Run Servizio Spooler di stampa 2013-04-26 14:23:27 Run Servizio SQL Server 2013-04-26 14:23:27 Run Servizio SQL Server Agent 2013-04-26 14:23:27 Run Servizio Symantec Endpoint Protection 2013-04-26 14:23:27 Run Cartella Sql (GB) 2013-04-26 14:23:27 Executing: cmd.exe /c "du -q "D:ProgrammiMicrosoft SQL ServerMSSQL.1MSSQLData" | grep Size: |gawk "{print $2}"" 2013-04-26 14:24:00 Run Cartella Sqldata (GB) 2013-04-26 14:24:00 Executing: cmd.exe /c "du -q d:sqldata | grep Size: | gawk "{print $2}"" 2013-04-26 14:24:44 Run Uptime 2013-04-26 14:24:44 Executing: cmd.exe /c "net statistics workstation | find /i "Statistiche dal "" 2013-04-26 14:24:45 Run OcsInventory 2013-04-26 14:24:45 Executing: cmd.exe /c "C:Programmipandora_agentOCSInventoryocsinventory.exe /server=http://srvhelpdesk.unicomm.intra/ocsinventory /nodebug /tag="ARCA"" 2013-04-26 14:26:01 Spazio Disco C: getXML begin 2013-04-26 14:26:01 Spazio Disco C: getXML end 2013-04-26 14:26:01 Spazio Disco D: getXML begin 2013-04-26 14:26:01 Spazio Disco D: getXML end 2013-04-26 14:26:01 Servizio Accodamento Messaggi getXML begin 2013-04-26 14:26:01 Servizio Accodamento Messaggi getXML end 2013-04-26 14:26:01 Servizio Amministrazione di IIS getXML begin 2013-04-26 14:26:01 Servizio Amministrazione di IIS getXML end 2013-04-26 14:26:01 Servizio Smart3COM getXML begin 2013-04-26 14:26:01 Servizio Smart3COM getXML end 2013-04-26 14:26:01 Servizio Spooler di stampa getXML begin 2013-04-26 14:26:01 Servizio Spooler di stampa getXML end 2013-04-26 14:26:01 Servizio SQL Server getXML begin 2013-04-26 14:26:01 Servizio SQL Server getXML end 2013-04-26 14:26:01 Servizio SQL Server Agent getXML begin 2013-04-26 14:26:01 Servizio SQL Server Agent getXML end 2013-04-26 14:26:01 Servizio Symantec Endpoint Protection getXML begin 2013-04-26 14:26:01 Servizio Symantec Endpoint Protection getXML end 2013-04-26 14:26:01 Cartella Sql (GB) getXML begin 2013-04-26 14:26:01 Cartella Sqldata (GB) getXML begin 2013-04-26 14:26:01 Uptime getXML begin 2013-04-26 14:26:01 Uptime getXML end 2013-04-26 14:26:01 OcsInventory getXML begin 2013-04-26 14:26:01 OcsInventory getXML end 2013-04-26 14:26:01 Copying XML on C:Programmipandora_agenttempV-A-CECSRVR32.26411.data 2013-04-26 14:26:01 Next execution on 300 seconds

  13. i find a way with a vbs script ..pandora_agentutilsize.vbs Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Wscript.Arguments.Item(0)) ' folder to scan for size WScript.Echo objFolder.Size if i want to check the d:sqldata size i put in the agent module this # Controllo log SQL module_begin module_name Cartella Sqldata (GB) module_type generic_data module_exec cscript /nologo size.vbs "d:sqldata" module_postprocess 0,00000000095367431640625 module_description Controllo dimensioni Cartella D:Sqldata (GB) module_min_critical 10 module_interval 576 module_end

Entra en tu cuenta para publicar.