Best way to pull a list of used ports

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Best way to pull a list of used ports

  • Creator
    Topic
  • #54935
    Brandon Grudt
    Participant

      I’d like to run a weekly script to keep an updated table that keeps –

      Thread Name

      Thread Type

      Thread IP

      Thread Port

      I’ve found that it’s hard to keep an Excel sheet manually updated with this data.  I already capture the daily volume for each thread.  How easy is it to grab the current type/IP/port on each thread and just update it during the nightly volume report script?  Is it in the msiTocEntry?

    Viewing 4 reply threads
    • Author
      Replies
      • #83510
        Jim Kosloskey
        Participant

          Brandon,

          I have a set of Tcl procs which:

          – record ports used from both the /etc/hosts and the NetConfigs.

          – creates a list of these used ports. I think the list has an indicator of where each port was found.

          – creates a another list of unused ports

          – allows for reserving (meaning reserve from assignment) ports: good for defining the ephemeral range.

          – and a simple proc to recommend a user specified number of ports from a user specified floor to a user specified ceiling.

          While the above was designed to assist in assigning ports to make sure non in use are assigned, the list of used ports could assist you without modification.

          Then again you could modify the code any way you wwant.

          Also available is user doc for each proc and a fflow chart of the recommended process.

          Email me if you would like me to send these to you.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #83511
          James Cobane
          Participant

            Brandon,

            Attached is a script (getportsall) that I created that pulls port info from the NetConfig(s).

          • #83512
            David Barr
            Participant

              Here’s a script that we use. It’s pretty ugly, but it works. The output is in markdown so it shows up in nicely formatted tables when posted to our wiki.

            • #83513

              I’ve been using this script for years to search for threads based off of a variety of things with port being the most common.

              <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=6889&highlight=listthreads&#8221; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=6889&highlight=listthreads

              -- Max Drown (Infor)

            • #83514
              Brandon Grudt
              Participant

                Awesome, all.  I was able to cherry pick some things and fit them into the context of my current code.  I’ve got everything that I need.  A thousand thanks, as usual.

            Viewing 4 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.