Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Carp status at runtime?

    Scheduled Pinned Locked Moved Development
    3 Posts 2 Posters 1.2k Views
    Loading More Posts
    • 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.
    • R
      robi
      last edited by

      Guys, is there a possibilty (a system variable or something) to determine at runtime the carp status of the local machine?

      I need this, because I have to run some proprietary stuff on the machines, which acts as a client on the network. This stuff needs to be modified to be carp-compatible, for example it would only send client requests if the machine it is running on is in master state.

      Since the proprietary stuff is actually a perl script running locally, what I need is to be able to determine somehow from that script while it runs, if the machine is in master or backup state, and also catch when change happens (eg. by polling regularly the system variable or something similar).

      Any hints would be greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Look at the ifconfig status for any of the carp vips, it'll show master or backup.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • R
          robi
          last edited by

          Cool, thanks for the tip!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.