Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Development
  3. About the agent lower layers handler function use distinguish between "Windows"

About the agent lower layers handler function use distinguish between "Windows"

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 27.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X
    X
    x199x
    wrote on last edited by
    #1

        In agent's spurce code : When you use the "nxget" tool to get agent's parameters, The agent finally call the "getParameter()" function.and finally it call " m_pParamList[i].handler(pszParam, m_pParamList[i].arg, pszValue) " .
        my question is : It do that workflow in both Windows and Linux platform. But it must have a "switch" to distinguish the OS platform,because the handler function(such as: H_DiskInfo  H_ProcessCount ) in different OS platform is different. Can you tell me where is the "switch" I can find it in src.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Agent is modular, and platform-specific parameters are provided by subagents. When agent starts, it automatically loads so-called "platform subagent", which provides these parameters. For example, on Windows agent will load "winnt.nsm", and on Linux it will load "libnsm_linux.so". After subagent loading, parameters provided it added to m_ParamList in core agent. You may take a look inside subagent.cpp if you are interested how subagents are loaded.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • X
        X
        x199x
        wrote on last edited by
        #3

        Thanks a lot 😉

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups