DX Unified Infrastructure Management

  • 1.  Capture Linux command/script output

    Broadcom Employee
    Posted Aug 15, 2018 11:14 PM

    What can we do to accomplish the following:

    • Capture the output from Linux script or command run (say, ls -la, cat /etc/redhat-release, or anything else…)
    • Store the result into UIM and report the command/script output by each Linux host
    • the script/command run is once a day


  • 2.  Re: Capture Linux command/script output

    Posted Aug 15, 2018 11:35 PM

    We do the following:

     

    Put the script into cron to generate the output.

     

    Set up dirscan to watch for that output file being less than 15 minutes old.

     

    Set up an AO profile that is triggered by that dirscan error when the file becomes older than 15 minutes. 

     

    That AO profile runs a LUA script that, at the core, contains the following

     

    pds.putString ( mypds, "directory", directory)
    pds.putString ( mypds, "file", filename )
    pds.putInt ( mypds, "buffer_size", 102400000 )
    output1,return_status1 = nimbus.request ( address .. "/controller", "text_file_get", mypds )

     

    There are a bunch of other possibilities.

     

    -Garin



  • 3.  Re: Capture Linux command/script output

    Broadcom Employee
    Posted Aug 15, 2018 11:55 PM

    How do you present this information? 

    does it mean that this server will also have a non-green status then?