thread name lenght

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf thread name lenght

  • Creator
    Topic
  • #49138
    Thomas Fortino
    Participant

    Hello All,

    AIX 5.2

    Version 5.3P rev_2

     

    I know this topic was discussed previously, but I cannot find via a search. So hear is the question again. What is the recommended maxium thread name lenght?

Viewing 25 reply threads
  • Author
    Replies
    • #60841
      Elizabeth Wilson
      Participant

      15 characters

    • #60842
      Dave Skibba
      Participant

      What happens if a thread name is longer than 15 characters?

    • #60843
      Jonathan Hamilton
      Participant

      In NetConfig and NetMonitor the thread will grow horizontally to fit.

      The problem will be with hciconnstatus which has a 15 char limit for thread names.  We got around the issue by creating a copy of the command (hcaconnstatus) which we modified to 30 chars.  The command is just a tcl script, and you would modify the emitSummary proc inside.

      Also, note the process name is limited to 15 chars with hciprocstatus and hciconnstatus.

      Regards,

      Jonathan Hamilton

      HCA Healthcare

    • #60844
      Keith McLeod
      Participant

      The output of the format from hciconnstatus is what the hcicyclesavemsgs command apparently uses when cycling saved message files.  The problem with exceeding the length of the format from hciconnstatus is if you have threads with similar names, they may not be unique when cycling saved messages. You will have incosistent results as to what gets cycled and what doesn’t for threads with similar names.

      Here is what we changed our line for the variable fmt in hciconnstatus to;

         set fmt “%-15.15s %-28.28s %-5.5s %-7.7s %-20.20s” ;# Output line format

      Other lines need to be adjusted as well, but the 28 gives us up to 28 characters to determine uniqueness.  This allows for the hcicylesavemsgs command to operate correctly for us and accomodate some of the longer thread names.

    • #60845
      Gary Atkinson
      Participant

      Keith-

      We are having a issue with 2 threads that are over 15 characters that somtimes do not cycle.

      Besides the line:

      set fmt “%-15.15s %-28.28s %-5.5s %-7.7s %-20.20s” ;# Output line format

      Are there any other lines that need to be changed? Also what does each number pairt between the % mean?

      Currently our copy of hciconnstatus has this line:

      set fmt “%-15.15s %-15.15s %-10.10s %-15.15s %-20.20s” ;# Output line format

    • #60846
      Keith McLeod
      Participant

      It is basically these values.  This has worked well for us the two fmt and hfmt and the echo statement with the underlines modified to following.  This allows for hciconnstatus to still provide a reasonable output format.

      My process names reperesent by 15 still exists then 28 is for the trhead names.  My process names are pretty standard to 8 characters…..

      I would have to look up the exact meaning but the -+ symbol I believe is for justification, the 28 is field length and s is string…..  I am guessing.Should be in tcl book for format modifiers.

         set hfmt “%-15.15s %-28.28s %-5.5s %-7.7s %-20.20s” ;# Heading format

         set fmt “%-15.15s %-28.28s %-5.5s %-7.7s %-20.20s” ;# Output line format

         echo [format $hfmt Process Connection State “Proto” When]

         echo ”





       


    • #60847
      Jonathan Hamilton
      Participant

      The dash (-) when used with a string format left justifies the result.

      This is the only line you need to change for thread names.

    • #60848
      Gary Atkinson
      Participant

      Thank you both for information!

    • #60849
      Gary Atkinson
      Participant

      Even after these changes in hciconnstatus we are still seeting inconsistent results in smat file cycling.  One particular smat file just stopped cycling already together for some reason.  In the log file I do not even see that hcicyclesavemsg even tried to cycle the smat file.  Any other suggestions of things to check?

    • #60850
      Keith McLeod
      Participant

      Does the filename match what is set in the thread properties and is the thread active?

    • #60851
      Gary Atkinson
      Participant

      The thread is up.  What do you mean by

      Quote:

      Does the filename match what is set in the thread properties

       Match to what?

    • #60852
      Keith McLeod
      Participant

      You had asked for other things to check.  Where you set the filename to save the SMAT files to is in the thread properties.  Or maybe I should have asked is the file still saving messages?

      The reason I ask is that sometimes the name is changed and hcicylesavemsgs does not touch files unless they are defined in the thread properties of the specific thread.  Lets say I call the SMAT file BOB and then later chnage to FRED.  BOB would no longer becycled using hcicyclesavemsgs.

      Also how long is the process name?

    • #60853
      Gary Atkinson
      Participant

      Ah, sorry following you now.  Yes it is saving files (its an inbound thread) and growing.  The process name is 6 characters.  Forgot to mention were on 5.5, we were on 5.2 before.  I don’t remember have a problem with this particular thread/smat file before though.

    • #60854
      Gary Atkinson
      Participant

      Hi it’s me again  ðŸ˜† Well, my smat files were cycling just find up until last month for one particular thread again.  I verified the file name matches what is in netconfig.  The length is under 15, but I even modified hciconnstatus to 30.  Weird part is in my test site, the smat file for this same thread is cycling just find.  The thread is UP when hcicyclesavemsgs runs at 0200, via cron job.  I have hcicyclesavemsgs output to a log file and I don’t see that it even finds this thread.  I’m stumped at this point and have resorted to manually cycling this smat file every couple of days.  Ideas  ðŸ’¡

    • #60855
      Keith McLeod
      Participant

      I may be shooting from the hip here.  If you view a status of a thread, do you see old thread names possibly from renaming a thread or one that has been deleted?  Include changes to capitalization when looking.  I just recently had an issue where a thread contained a capital letter.  When listing the thread with a particular command, it displayed the name back to me in all lower case.  It ended up that the result of this command did not feed into the next command properly because of the case changes within the name of the thread.

      My resolve was to enforce using lowercase in naming of threads and renamed the thread using all lower case letters.  I did have to clear the msi by taking down my site including hcmonitord and lockmanager and deleting monitorShmemFile and vista.taf and then running hcimsiutil -R.

      Hope this helps….

    • #60856
      Gary Atkinson
      Participant

      Its interesting when checking the thread status I did find 3 old thread listed, that were deleted some time ago.  A site cleanup may be what is needed.  Thanks for these tips.  

      Gary

    • #60857
      Elizabeth Wilson
      Participant

      Look in your NetConfig and search for that SMAT file name. Does it appear more than once? For more than one thread?

    • #60858
      Gary Atkinson
      Participant

      I searched my NetConfig file and the smat file name only appears once. 😈

    • #60859
      Russ Ross
      Participant

      Gary:

      You say you can manually cycle SMAT for the problem thread.

      However, you say that hcicyclesavemsgs does not even see the thread.

      This made me wonder if the thread was down at 2 AM in the morning when you schedule hcicyclesavemsgs to run.

      I took a look at hcicyclesavemsgs and it has a comment that says

      hcicyclesavemsgs – Cycles message save files for all running threads

      so I suggest you see if there is a scheduled event that stops this thread during the 2 AM time frame.

      or just forget about using any brain cells and staying up to know for sure and schedule a cron job to run at 2:00 AM that does

      hciconnstatus >$HCISITEDIR/hciconnstatus.txt

      for the site in question and see if the thread is up or down at 2:00 AM by looking at the $HICSITEDIR/hciconnstatus.txt file the next day at work.

      If you want to see how I cycle and archive my SMAT files and handle issues such as this then refer to post

      http://clovertech.infor.com/viewtopic.php?t=1921” class=”bbcode_url”>http://clovertech.infor.com/viewtopic.php?t=1921

      However, to use my scripts assumes a standard naming convention for SMAT files which is ${thread_name}.in and ${thread_name}.out

      Russ Ross
      RussRoss318@gmail.com

    • #60860
      Gary Atkinson
      Participant

      I thought about the thread being down at 2am as you mentioned, but I do see not indicatation in the log of the thread being down nor do I receive an alert.  But you do bring up a good point.  Thanks for the link to your script and I will take a look at it.

    • #60861
      John Mercogliano
      Participant

      One other thing to look at. I had problems just today with smat files cycleing and when I was checking I noticed that there was multiple monitord running for the site somehow.  I shut everything and killed the ghosts and everything is working again.

      John Mercogliano
      Sentara Healthcare
      Hampton Roads, VA

    • #60862
      Gary Atkinson
      Participant

      I only found one monitord process running.  One thing I did noticed was the last date NetConfig was saved was the same date the smat file last cycled.  First message in smat file was at 0202, two minutes after cron job started. 😕

    • #60863
      Gary Atkinson
      Participant

      We did a site clean-up and reboot of the AIX server this morning.  Oddly, the script hcicyclesavemsgs that been running since 0200 and will still trying to finish at 0800.  Normally it takes only a minute or two.  We reran the script again via the command line after the site was back up and it ran within a minute or so.  Oddly (my new favorite word), enough the same smat file was not picked up and cycled.   😈

    • #60864
      James Cobane
      Participant

      Gary,

      I would double-check the process name as well as the threadname in the script.  Also, is it possible that the thread is getting alot of activity at the time the script is running so that the ‘hcicmd’ is possibly timing out?

      Jim Cobane

      Henry Ford Health

    • #60865
      Gary Atkinson
      Participant

      Thanks James for those tips.  I was hoping after a site cleanup and server reboot that would fix the issue.  As far as I can tell the perl script reads the netconfig and does hciconnstatus.  I have the current ouput of the script going to a log file, which display the thread it found and what the smat file is.  Oddly enough, the thread is not displayed in the log file.  This leads me to believe that when the perl script reads the netconfig file for some reason it is either not finding or ignoring the thread.  Were going to put some debugging in the script to see what is going on.

    • #60866
      Gary Atkinson
      Participant

      We found something interesting about this perl script.  If you have a thread name and that name is also used in another thread, the perl script will cycle the first thread twice and ignore the second thread.  For example if you have a thread named “apple pear” and another thread named “apple pear fruit”.  If in the Netconfig file the thread named “apple pear” appears before “apple pear fruit”, the thread “apple pear” will cycle twice  ðŸ™„ It has to do something with the regular expression S* with reading the Netconfig file.  This is what we think is going on.  Cron should fire up hcicyclesavemsg tonight, so hopefully all the threads get cycled 😆

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

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10