Parse siteInfo to extract SMAT and Log Retention Periods

Homepage Clovertech Forums Cloverleaf Parse siteInfo to extract SMAT and Log Retention Periods

  • Creator
    Topic
  • #120502
    Erik Mueller
    Participant

    Hello,

     

    I have written multiple TCL scripts that use netcfgLoad to extract thread and route data and write them to a database.

     

    What I’m trying to do now, is to load and parse siteInfo for every one of sites so that I can extract the:
    Log History “Maximum Number of Log Files”

    Log History “Maximum Logs Total Size”

    Monitor Daemon “Automatic Log Cycling”

    SMAT “Maximum Number of SMAT Files”

    SMAT “Maximum SMAT Total Size”

    SMAT “Maximum Age of SMAT Files”

    And then write it to a database so that I can easily see the discrepancies between all my sites.

     

    I know I could do it manually for every site, but I have over 60 sites and that is very time consuming.

    Has anybody written a TCL or other method to extract this data into a DB, CSV or flatfile?

    netcfgLoad doesn’t seem to work with siteInfo.

     

    Is there a different command I can use or has anybody come up with a method to extract this data?

     

    Thanking you in advance,

    Erik

     

Viewing 1 reply thread
  • Author
    Replies
    • #120503
      Jay Hammond
      Participant

      I’ve attached a couple that I use from time to time to pull at least some of the info that you’re looking for.

      • This reply was modified 1 year, 4 months ago by Jay Hammond.
      Attachments:
      You must be logged in to view attached files.
      • #120507
        Erik Mueller
        Participant

        Hi,

        Thanks very much. I will have a play.

        Erik

    • #120509
      Charlie Bursell
      Participant

      siteInfo is a text file!  Expand on something as simple as the below in Tcl.

      set lst

        set inp [read_file -nonewline siteInfo]

        foreach item $lst {

        set foo “$item NOT FOUND”
        regexp -lineanchor — “^$item=.*?\$” $inp foo
        echo $foo
        }

    Viewing 1 reply thread
    • You must be logged in to reply to this topic.

    Forum Statistics

    Registered Users
    5,117
    Forums
    28
    Topics
    9,292
    Replies
    34,432
    Topic Tags
    286
    Empty Topic Tags
    10