file lock existence check on remote host

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file system.



For Example:
I have two host: h1 and h2, both with RHEL 7.2. I have one application on host h1 which has acquired the file lock on a file in gluster file system using pthread_rwlock_wrlock API. After sometimes I poweroff host h1.



Now from h2 I am using pthread_rwlock_trywrlock to see whether any lock is held on this file or not. this retuning me EBUSY till 30 minutes of poweroff of h1(its looking as if application from h1 has still held lock on it). After around 30 minutes pthread_rwlock_trywrlock returning 0.



Is there any way I can quickly check that a file in gluster is held by any any process or not?










share|improve this question



























    up vote
    1
    down vote

    favorite












    I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file system.



    For Example:
    I have two host: h1 and h2, both with RHEL 7.2. I have one application on host h1 which has acquired the file lock on a file in gluster file system using pthread_rwlock_wrlock API. After sometimes I poweroff host h1.



    Now from h2 I am using pthread_rwlock_trywrlock to see whether any lock is held on this file or not. this retuning me EBUSY till 30 minutes of poweroff of h1(its looking as if application from h1 has still held lock on it). After around 30 minutes pthread_rwlock_trywrlock returning 0.



    Is there any way I can quickly check that a file in gluster is held by any any process or not?










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file system.



      For Example:
      I have two host: h1 and h2, both with RHEL 7.2. I have one application on host h1 which has acquired the file lock on a file in gluster file system using pthread_rwlock_wrlock API. After sometimes I poweroff host h1.



      Now from h2 I am using pthread_rwlock_trywrlock to see whether any lock is held on this file or not. this retuning me EBUSY till 30 minutes of poweroff of h1(its looking as if application from h1 has still held lock on it). After around 30 minutes pthread_rwlock_trywrlock returning 0.



      Is there any way I can quickly check that a file in gluster is held by any any process or not?










      share|improve this question















      I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file system.



      For Example:
      I have two host: h1 and h2, both with RHEL 7.2. I have one application on host h1 which has acquired the file lock on a file in gluster file system using pthread_rwlock_wrlock API. After sometimes I poweroff host h1.



      Now from h2 I am using pthread_rwlock_trywrlock to see whether any lock is held on this file or not. this retuning me EBUSY till 30 minutes of poweroff of h1(its looking as if application from h1 has still held lock on it). After around 30 minutes pthread_rwlock_trywrlock returning 0.



      Is there any way I can quickly check that a file in gluster is held by any any process or not?







      linux c glusterfs pthreads






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      José Manuel Ramos

      1032




      1032










      asked yesterday









      dcds

      1153415




      1153415

























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481715%2ffile-lock-existence-check-on-remote-host%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481715%2ffile-lock-existence-check-on-remote-host%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay