Here is a simple comp named lhisto.comp to show
a histogram for latency values in 1,2,5 bin sizes
over 4 decades:

  http://www.panix.com/~dgarrett/stuff/lhisto.comp

The default minimum bin is 1uS (1000 nS)

To Install:
$ comp --install lhisto.comp

A file (example named "go" here) to simplify running it
with halrun is:

  $ cat go
  # start threads for base and servo periods
  loadrt threads name1=base period1=25000 name2=servo period2=1000000
  loadrt lhisto names=shisto,bhisto
  addf shisto servo
  addf bhisto base
  start

Example usage with halrun (dont run Linuxcnc simultaneously)
( # annotation added for xenomai on a sl510 laptop):

  $ halrun
  halcmd: source go
  halcmd: show pin bhisto
  Component Pins:
  Owner   Type  Dir     Value  Name
       9  s32   OUT  86021994  bhisto.h00001   # bin for lat < 1*tmin
       9  s32   OUT    143633  bhisto.h00002   # bin for 1*tmin <= lat < 2*tmin
       9  s32   OUT     39154  bhisto.h00005   # etc
       9  s32   OUT     10918  bhisto.h00010   # etc
       9  s32   OUT         5  bhisto.h00020
       9  s32   OUT         0  bhisto.h00050
       9  s32   OUT         0  bhisto.h00100
       9  s32   OUT         0  bhisto.h00200
       9  s32   OUT         0  bhisto.h00500
       9  s32   OUT         0  bhisto.h01000
       9  s32   OUT         0  bhisto.h02000
       9  s32   OUT         0  bhisto.h05000
       9  s32   OUT         0  bhisto.h10000
       9  s32   OUT         0  bhisto.h20000
       9  s32   OUT         0  bhisto.h50000   # 20000*tmin <= lat < 50000*tmin
       9  s32   OUT         0  bhisto.hmax     # bin for lat >=50000*tmin
       9  s32   OUT  86215707  bhisto.hsamples # total samples
       9  s32   OUT     11390  bhisto.latmax   # max latency for thread
       9  bit   IN      FALSE  bhisto.reset    # INPUT to restart
       9  s32   OUT         0  bhisto.restarts # count of restarts or overflows
       9  s32   IN       1000  bhisto.tmin     # INPUT tmin size 
(default=1000nS)
  ...


Alternatively, you could specify the "go" file and remain interactive:
  $ halrun -I -f go
  halcmd: show pin bhisto
  halcmd: show pin shisto
  ...

An example of saving the base thread histogram info to a file
(from an independent shell):
  $ halcmd show pin bhisto|grep -v Value|cut -c18- >|result
-- 
Dewey Garrett


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to