Anyone know what are sem_* files ?

Clovertech Forums Read Only Archives Cloverleaf General Anyone know what are sem_* files ?

  • Creator
    Topic
  • #48740
    Paul Johnston
    Participant

      Hello ,

      I am trying to do a little cleanup of the our HPUX file systems (Cloverleaf 3.8.1P ) . I have noticed many files with the name ‘ sem_*  ‘ within the site /EXEC directory.

      These are all empty files so I do not forsee any problems deleting them but I am curious if anyone knows how these files are created.

      Paul

    Viewing 9 reply threads
    • Author
      Replies
      • #59540
        Dennis Pfeifer
        Participant

          don’t delete them.

          They are your semaphores for the engine..

          When you shutdown the engine processes, and monitor demon, they should go away .. and be re-built when you restart the monitor demon .

          Dennis

        • #59541
          Paul Johnston
          Participant

            Dennis,

            Thanks for your reply.

            I seem to have alot of them , 25 – 30 .

            Does that seem normal . ?

            Paul

          • #59542
            Dennis Pfeifer
            Participant

              One for each interface thread plus one for the translate thread, and one for the control thread.

              Dennis

            • #59543
              David Teh
              Participant

                Sorry for reviving an old thread, but this seems to be the only one on the issue.

                I’ve never seen this on AIX, but they started appearing on the newly migrated Solaris 10/Cloverleaf 5.6 box.

                Any idea if this is a difference in how the AIX/Solaris or the Cloverleaf versions handle semaphores?

                Where did AIX hide them? 😛

              • #59544
                Bob Richardson
                Participant

                  Folks,

                  See the next writeup of where the AIX semaphores reside.

                  This is a response from Rob Abbott at Healthvision some time ago (maybe last year) and I went ahead and documented where the thread statistics were stored and why they went away when we rebooted our server.

                  Hope this helps out.

                  MSI statistics are stored in shared memory.  The monitorShmemFile is simply a pointer to the shared memory.

                  Since the data are not stored on disk, it will not survive a failover to another physical machine.  There is a shared memory segment that is reserved for statistics.  I believe there is a separate segment for each site, though this may be platform dependent.  This memory segment is not part of process memory – I suppose you could say it resides at the o/s level.  Threads write statistics to this memory segment.  Engine utilities such as  hcimonitord and hcimsiutil, msiAttach, msiGetStatSample, msiTocEntry read from it.  (I believe this list of tools that read from shared memory is complete – for example Network Monitor does *not* access shared memory directly, it talks to hcimonitord).

                  The memory segment is destroyed when the machine is shut down, so any data there is lost.  Since this is all in memory it’s volatile storage.

                  Nothing is stored on disk, other than a pointer to this memory segment which resides in monitorShmemFile.  On AIX you can see the shared memory segments and the semaphores used to manage locking of these segments by running the “ipcs” command.

                  Note: for information on the ‘ipcs’ command, use the manpage utility on your AIX server (if installed).

                  Note: enhancement request #12209 on 11/19/2008 was submitted to Healthvision to create a utility to offload and restore these statistics.  Courtesy of Rob Abbott.

                • #59545
                  Russ Ross
                  Participant

                    I’m glad to hear you’ve never seen these files on AIX because I haven’t ever seen one on any of our AIX boxes either which consist of

                    AIX 5.2 – Cloverleaf 5.2

                    AIX 5.3 – Cloverleaf 5.6

                    Russ Ross
                    RussRoss318@gmail.com

                  • #59546
                    Rob Abbott
                    Keymaster

                      The sem* files appear on Solaris machines due to the way semaphores are implemented in that operating system.

                      Rob Abbott
                      Cloverleaf Emeritus

                    • #59547
                      Chris Williams
                      Participant

                        Rob,

                        Can I interpret that to mean it is safe to delete them if the site is down?

                      • #59548
                        Bob Moriarty
                        Participant

                          Info in the following link is very helpful for managing semaphores on a Linux host:

                          <a href="http://www.puschitz.com/TuningLinuxForOracle.shtml#SettingSemaphores&#8221; class=”bbcode_url”>http://www.puschitz.com/TuningLinuxForOracle.shtml#SettingSemaphores

                        • #59549
                          Dennis Pfeifer
                          Participant

                            Just for completeness ..

                            This is what we have ours set at ..

                            kernel.sem=250 128000 100 512

                            # .. and we change the default keep alive.

                            # Decrease the time default value for tcp_keepalive_time connection

                            net.ipv4.tcp_keepalive_time = 1800

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