# PaCkAgE DaTaStReAm
JESsara 1 7198
# end of header
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            07070100037790000081ed000000f1000000650000000139ab968900000142000000200000000800000000000000000000001000000004JESsara/pkginfo   PKG=JESsara
NAME=Sar analyzer utility for Sun Solaris 2.x
ARCH=sparc
VERSION=1.1  ,REV=0.000001
CATEGORY=application
PRODNAME=sara
PRODVERS=John Erik Solberg
DESC=SATA 
BASEDIR=/usr
SUNW_PKGTYPE=ow
VENDOR=John Erik Solberg
HOTLINE=Not supported
EMAIL=jone@pogostick.net
MAXINST=1000
CLASSES=none
PSTAMP=jesis221859395900

  07070100037791000081ed000000f1000000650000000139abc504000001ee000000200000000800000000000000000000000f00000004JESsara/pkgmap    : 1 7198
1 i copyright 252 14491 845050699
1 d none local/sara 0775 root bin
1 f none local/sara/sara 0755 root bin 8980 36456 844726945
1 f none local/sara/xsar-disk.perl 0755 root bin 3972 29400 844726945
1 f none local/sara/sar6 0755 root bin 20248 9528 844726945
1 f none local/sara/sar8 0755 root bin 20552 42010 844726945
1 f none local/sara/sara.1 0755 root bin 1113 24930 844726945
1 i pkginfo 322 25518 848526431
1 i postinstall 128 10582 845050700
1 i postremove 129 10560 845050700

  07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!                                                                                                                                                                                                                                                                                                                                                    07070100037790000081ed000000f1000000650000000139ab968900000142000000200000000800000000000000000000000800000004pkginfo   PKG=JESsara
NAME=Sar analyzer utility for Sun Solaris 2.x
ARCH=sparc
VERSION=1.1  ,REV=0.000001
CATEGORY=application
PRODNAME=sara
PRODVERS=John Erik Solberg
DESC=SATA 
BASEDIR=/usr
SUNW_PKGTYPE=ow
VENDOR=John Erik Solberg
HOTLINE=Not supported
EMAIL=jone@pogostick.net
MAXINST=1000
CLASSES=none
PSTAMP=jesis221859395900

  07070100037791000081ed000000f1000000650000000139abc504000001ee000000200000000800000000000000000000000700000004pkgmap    : 1 7198
1 i copyright 252 14491 845050699
1 d none local/sara 0775 root bin
1 f none local/sara/sara 0755 root bin 8980 36456 844726945
1 f none local/sara/xsar-disk.perl 0755 root bin 3972 29400 844726945
1 f none local/sara/sar6 0755 root bin 20248 9528 844726945
1 f none local/sara/sar8 0755 root bin 20552 42010 844726945
1 f none local/sara/sara.1 0755 root bin 1113 24930 844726945
1 i pkginfo 322 25518 848526431
1 i postinstall 128 10582 845050700
1 i postremove 129 10560 845050700

  070701000240f3000041ed000000f1000000650000000239ab99c300000000000000200000000800000000000000000000000800000004install   070701000240f4000081ed000000f1000000650000000139ab99f2000000fc000000200000000800000000000000000000001200000004install/copyright 
++++++++++++++++++++++++++++LICENCE AGREEMENT++++++++++++++++++++++++
	x)	Copyright 1985-1999     JES  Feel free to distribute..
        Comments to:            jone@pogostick.net
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

070701000240f5000081ed000000f1000000650000000139ab99c300000080000000200000000800000000000000000000001400000004install/postinstall   #!/bin/sh

# ident "@(#)postinstall	1.0	21.april 1998"
# postinstall script for ESMclon

echo "Nothing done during postinstall"
070701000240f6000081ed000000f1000000650000000139ab99c300000081000000200000000800000000000000000000001300000004install/postremove    #!/bin/sh

# ident "@(#)postremove	1.0	21.april 1998 ESM"
# postremove script for ESMclon

echo "nothing done during postremove"
   07070100015a0c000041ed000000f1000000650000000339abaa3200000000000000200000000800000000000000000000000600000004reloc 07070100019fcb000041ed000000f1000000650000000339abaa3200000000000000200000000800000000000000000000000c00000004reloc/local   07070100019fc5000041ed000000f1000000650000000239ab98a100000000000000200000000800000000000000000000001100000004reloc/local/sara  07070100019fc6000081ed000000f1000000650000000139ab989800004f18000000200000000800000000000000000000001600000004reloc/local/sara/sar6 ELF               @   4  KX     4    (        4  4                                                             Cy  Cy           C| C|                   C C                  /usr/lib/ld.so.1       C   X       S   9       ?   L   A   6           H           T       G   >       J           -   C       R   D   *   @   2      (       7   #   /           I       K       E       <       Q       ;   W       =   F               M   V           %   &   U   '          O   P                                                                                                                                                                                              .                           5               )   +              8   :             !   ,              4   1   3   0       B               "          N   $                                                 \                                 ,           D           h           @      	     >       
     >8           >p           >t           >x           C|           C           D            F(           FH           F           J`                                      D           @     	    E           D           F           " FH        + Yh         0 E          5 X   @!     :               G C|         ] E          b DP          i D\          n EL          t F          { D           E           >    8  
    E(           E           D           E           D           Fl         D           Ed           Ep           C          E           X   @      E           Dh                          E4           FH   !     F          Fh        Fh       & D         - E         5 Fh       D E         I Y`       P E         V D         [ Yd       b E@         i J^        p D          E                     D          Cy         >t        EX          P    	   D          D          FL        E|          >8   8     E          Dt        getopt _start read atoi vfprintf _environ _end fork _iob _ex_register _GLOBAL_OFFSET_TABLE_ pipe atexit exit creat malloc sprintf uname _init dup .umul time .rem sscanf ___Argv strncat wait strncpy _DYNAMIC printf __iob write _exit _ex_deregister execlp environ perror __cg89_used __cg92_used strchr __mul64 __fnonstd_used free optind close open optarg strcmp _edata _PROCEDURE_LINKAGE_TABLE_ memset __fsr_init_value strcpy _etext _lib_version kill main strlen localtime __environ_lock lseek _fini fprintf sysconf libc.so.1 SISCD_2.3 libkstat.so.1 libc.so.1             zt           F,  9     F(  !     Yd  F     Y`  C     X   6     DP  $     D\  %     Dh  8     Dt  W     D       D  (     D  /     D  1     D  -     D  R     D  E     D       D  Q     D  L     D  ?     E  #     E       E  D     E(  +     E4  :     E@  G     EL  &     EX  O     Ed  2     Ep  3     E|  T     E       E  7     E  )     E  .     E  5     E  B     E  J     E  ,     E  @     E  V     F        F  <     F  '          @D  "bl, @'  $H+   `      -` `?-)  "d-    /%    +   ` `?`5    +  bh %@ #    @ M     O@ M"8@        @     @ M   @ M       @N              @      (@ M !  $"`!  C"8;`!  O"x @ M ? * :` 	/ˀ`i 
 ?ǀ e G f !   "ʀ`i m o  s" 5   !  !  #H`$#H!  O"!  @ M`!d!  O!  O"!   !   !   @ MWd  	d!  "  @ rO!  O    C#T`"#T  bH       
  ^`	^HJ""!  O"!   h!   d!   `5  @ M*d  	d!  "  @ EO!  O    C#P`"#P  bH h   d   `
  ^`	^HJ~""!  O"!  "5  @ Md  	d!  "̐  @ On!  O    C"&  b@#L   `b!  O_"#L!  #D`$#D!  O"!  @ L!dT!  O"ʒ@ Lܔ N!  O  !  #T"   5    #P   5    "  ""$
    5  @ 
  5  `& 	     #  .!    !  #D   @ L  '@ L$ !  O @ L"@ L  !  ? &$"!  #@ 
     !  "`$"*`@ L@!  #  $"t  $bx"`$"*`@ L@!  #  $"t`, @@ L  $bx  "@ L    !  O@ L"̐ @ L A  7   !  O@ Lz"!     T  1  "t#    5  @ 
{  x!      #@@ 
s    "n!  O" @ LF"t  "d!  O" @ L?x!  @ LZ"x?!      #d@ 
[ @ LT!    $"@ LR !  @ LR"|!  O"!  O"  @ LM  ? !  !  #p@ 
B  
!  ? !  !  #@ 
9 !  "x#  $b!  @ L0"|  #H!        @ L0  ̒#@ 
#  @ L*!!  $"@ K !  #  $"  $`#  $`#  $`#  $`   !  "@ K !  "p`@  B$"p !  @ L"@ L   +     "p  "  @ L @ K     5        @ L   `  @  #&` @ @ K @ K    `2    @ 	   @ K (!  O@ K                @Y      @      @N              h!  E  !!  "" d@ K# #   @  $b!    #T       E#"  E;p"     ;x"!  "!  "H@ K!؀      &`  " `  * $ , !   @ 	 `        7   ฒ !  @ K" :     ฐ @ `@2   `  `!  @ KS"L!    Ep$    b ^  	B
HJ 	#h  &
   	!    #P        "&
   S    #H!        "  "p"H   !@ KQ `        !    ` @ KE ` @   3    "p        cX@ K8 #   d`@ K6` #d!  ` Y#\`!  #`!Z!  #  O"[c!  @ K'#\@ `!  #L  E     b^   h   #  "H     "   	  @ !  O@ K
#4@   #L   	 h!
   	5!             X ` , $@,  @    @    @ ߔ  `      6          )   @ 2     	`" 	   @ ` 
"@
 ` @ ` 
"@
   
ܘ ` `@ `& @ J  @ J  @ J` &  '  '` `    F     x`|   	  `;   	  `  E 	  "b  bPT@
  X@
  \@
"@#    """  &"  ȑ'bax   ""!  @ _   @ !  "|`$"|!  b"p      "'""      " bH`t! 
"@
  `     $       @`  
"@
`` @&   &xh   e!  !      ^!  & #
   U       "|  !  @    "  @ J!`             @ J ` &    㿠!  @ I"L!   $ !  O#D@ I #   $b     b耠       O cT @ I  b         0                        `        |               <       hp    O!@ I c`       "N         G"@&a *  	 	     O cd~Ȕ~Ж~@ I~N #\#` #d  O cx~~~ @ IN P#\X#`  O c(08@@ IHN #\  O cĒ`hpx@ I|N #\#`  O c@ InN   P ` ȔЖؘ@ IdN   P `@ I\ N   P `(```@ IS` N   P `<`(`8`H@ IJ`XN   P `P``@ IC`hN `#\  P `\`p`x``@ I7`|N   P `x````@ I-`rN   P ``@ I&`kN a#\a#`a(#d  P ````a@ Ia[N     "     P    P@ I 㿠          bP`xȖ>  @         ca?̘  @ ~        c<ad?t  @ t X   c         @
  `(" "? @" "  `     `   @
  `@" "      b@& ` &    z  ``̔  Ȟ`""  Ȟ@" " ` #" " ` #" " ` ` `""  @" " ` ` `""  @" " ` ` `""  @" " ` `؞ ؂`""  ؞@" " ` ` `""  @" " ` `О К``""Ԙ  Ԗ О@" " Ԑ 	&`ȁ              A      㿈   I `  ?b
ƅ"   H	B#X#\ 
   7 BHB;` 
   7 	BH	B;h 
hl   P H * +B ;ppt@ GX          A      P ,  I!    ` F# $
     F ( )#@  0#    ` F# (
     F ( )#@ | (  "
ƅ" ` H	;` 0
   7 H;h 4
   7 	H	;x 8
   7 H!; #X#\;p $
   7 	H	; ,
 H	  P `;@ GX      A              Ae    @@     @Y      H  I#ؑ. "  * @ ȑ ̍ 	@@H^      @
#
    Ƒ@ ę 	ā
ޕ @@ ܝJ ؁ޙ 	@@L    P`@ <;	Ґ a;;;@ G.;x 
x  	F > ? 	Й	F   >  ?   B	2 	* 	2	;    H    HHJ#X#\;h;p;` ԕ ЍލH   P H * +F a$@J;;@ F              A      x |  J bX  ?b
ƅ"   H	#X#\ h
   7 H;` l
   7 	H	;h p
   7 H;p t
   7 	H	;x x
x|   P H * +!L;@ FX          A      h   Xb  J c T@
#?
ƅ"   H	;` P
   7 H#X#\ \
   7 	H	;h `
   7 H;p d
   7 	H	;x H
   7 H; L
 H	  P!t;@ F<X          A      p  K   "  ""`: 	! @ F2;#` 7 F! @ F#;x#` 7 F;`!
   7 	ޑF	#X#\ <   7 ޅF;h!x
|   P F ( )	ސ a;ppt@ EX              A      㿐   "  K""(
  K "0H	#X#\ 
   7 H;` 
` dH	  P a;hhl@ EX          A      @Y      㿐!T     	  P aԒb@  @ ED '!\!T  K"  K"7 !PF!P
       F ( )	  P;`"$  K" a`dF;hh@ El!\     P!  "H  @ Ew"L!\  K"  K"7 !XF!X
       F ( )	;`"$  K"  P`dF;hhl@ ES!㿈      P#\#``#d #h#l`#p b `@ E<`           A      㿐    b  L"`؁
  L `H	;` 
`d   P H * +;hhl@ EbL        A      p  !8b  L ap!<@
#?
ƅ"   H	;`!,!0 	#
   7 	H	;h! 
   7 H#X#\!@
   7 	H	;p 
   7 H;x 
x |H	  P"\;@ DX              A      @Y      x   L"` 7  F 
   7  ( F )D#p@ Kp!   "
ƅ" ` H	#X#\!$
   7 H;` 
   7 `H`	J 	;h!
   7 H;x!
x |H	  P b;@ DkX      A              㿀  !"  ""`3  M: 	!:@ Dc;p;xx  M (` 	^Ƒ >  ?^!lD!h pƉ	H   P H * +D;hhl	;``d@ D1"            A      `#  M! a?
ƅ   H	#X#\!
   7 H;`!
   7 	H	;h!
   7 H;p!
   7 	H	;x!
   7 H;!
   7 	H	;!
   P H * +";@ CX    p     H      x   x     x   x   x     x     x   x         x   x       \   x  4㿠    "O     d   M     M"x& a *  	 	     o `O    `O   "  5  `   $O     `         `O    `O   D `O    `O    `O    `O   0 `O   O `O    `O    `O    H  #~P" ? 	&?? 	&?? 	&?? 	&?? 	&?? 	&?? 	&?  `  	&  yO     "     P    P@ C"        A      @Y          t          L        l    ,      <    \      d        ܝ㿠  "   	 	`  	#\\  N!H
  N !PH  P$   n""  "  ĉ""  N!X  ""@ BԐ b  "O@  Y` v   N  P@ BȐ b  N!`& a *  	 	   O@ÐO@  "   ""   7    $O@ఐ 8         ɐO@O@cO@O@ߐO@WO@wO@ǐO@O@  Ob|O@         `   @"    @" ` &         ?      ?      #D  OD$`@      O`H?      @Y      #D  OD$`#H      O`H&`ƍ޽Hޝ㿠   @   P@ B= b   P@ B9 c,  P@ B6#D㿠'L  'P @  P'T cl @ B+'X  @ B*L   P@ B# ct     P@ B$ cx       @ A   㿠           @ B    @ B  &       "Pΐ   @ A 㿠@      ,?             㿠@      ?                     ubdycwaqvmpgrkAo:s:e:i:f:   %s  %d:%d:%d    %d:%d:%d    %f  %s  /var/adm/sa/sa%.2d  u   udqbwcayvmpgrk  %d  %d  /usr/lib/sa/sadc    /usr/lib/sa/sadc    
%s %s %s %s %s    %.2d/%.2d/%.2d
  	unix restarts
 %.2d:%.2d:%.2d              
    %7s %7s %7s %7s
    %7s %7s %7s %7s %7s %7s %7s %7s
      %-8.8s    %7s %7s %7s %7s %7s %7s
    %7s %7s %7s %7s %7s %7s
    %7s %7s %7s %7s %7s %7s %7s
    %7s %7s %7s %7s %7s
    %7s %7s %7s
    %7s %7s %7s %7s
     %s  %s  %s   %s
   %7s %7s
    %7s %7s %7s %7s %7s %7s
    %8s %8s %8s %8s %8s
    %7s %8s
    %7s %7s %5s %7s %7s %5s %11s %5s
  
    %7.0f %7.0f %7.0f %7.0f
    %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f
      %-8.8s       %7.0f %7.1f %7.0f %7.0f %7.1f %7.1f
     %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f
    %7.0f %7.0f %7.0f %7.2f %7.2f %7.0f %7.0f
  %7.2f %7.1f %7.2f %7.1f %7.0f
  %7.0f %7.0f %7.0f
  %7s %7s     %7.1f %7.0f     %7s %7s
    %7.1f %7.0f
    %4lu/%-4lu %4lu %4lu/%-4lu %4lu %4lu/%-4lu %4lu %4lu/%-4lu
     %7.2f %7.2f
    %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f
    %8.2f %8.2f %8.2f %8.2f %8.2f
  %7.0f %8.0f
    %7.0f %7.0f %5.0f %7.0f %7.0f %5.0f %11.0f %5.0f
  
   
   Average     usage: sar [-ubdycwaqvmpgrkA][-o file] t [n]
   	sar [-ubdycwaqvmpgrkA] [-s hh:mm][-e hh:mm][-i ss][-f file]
   sar:    
        C          %    >     >8o o               
  /    \                 D                h    ,        	                                                             00     <0     H0     T0     `0     l0     x0     0     0     0     0     0     0     0     0     0     0     0    0    0     0    ,0    80    D0    P0    \0    h0    t0    0    0    0    0    0    0    0    0    0    0    0                      @@                                                            -%c %s -- illegal option argument   -%c %s -- illegal option argument   -%c %s -- illegal option argument   ending time <= starting time    can't open %s   sampling interval t <= 0 sec    number of sample intervals n <= 0   pipe failed exec of /usr/lib/sa/sadc failed Could not fork to exec sadc output file name same as input file name    %usr    %sys    %wio    %idle   bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s device  %busy   avque   r+w/s   blks/s  avwait  avserv  rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s scall/s sread/s swrit/s fork/s  exec/s  rchar/s wchar/s swpin/s bswin/s swpot/s bswot/s pswch/s iget/s  namei/s dirbk/s runq-sz %runocc swpq-sz %swpocc proc-sz    ov   inod-sz    ov   file-sz    ov   lock-sz msg/s   sema/s  atch/s  pgin/s  ppgin/s pflt/s  vflt/s  slock/s pgout/s ppgout/s    pgfree/s    pgscan/s    %ufs_ipf    freemem freeswap    sml_mem alloc   fail    lg_mem  alloc   fail    ovsz_alloc  fail                    malloc failed  @(#)SunOS 5.6 Generic 106818-01 September 1998  .interp .hash .dynsym .dynstr .SUNW_version .rela.ex_shared .rela.bss .rela.plt .text .init .fini .exception_ranges .rodata .rodata1 .got .dynamic .plt .ex_shared .data .data1 .bss .comment .shstrtab                                                                             	             t                       \  \                            /                  o                          -       ,  ,                  =       D  D   $               G       h  h                 Q       @  @  0                  W       >   >    8                  ]       >8  >8   8                  c       >p  >p                     u       >t  >t                     }       >x  >x                           C|  C|                           C  C                          D   D                           F(  F(                             FH  FH   <                         F  F                           J`  J`                                 J^   0                               J                  07070100019fc7000081ed000000f1000000650000000139ab989800005048000000200000000800000000000000000000001600000004reloc/local/sara/sar8 ELF                  4  L     4    (        4  4                                                             C  C           C C        L           E E                  /usr/lib/ld.so.1       C   [       T   <       A   L       9           H           U   /   G   @       J       W   0   C       S   D   ,   =   4       *       :   %   1           I       K       E       ?       R       >   Z           F       X       M   Y           '   (   V   )         O   P                                                                                                                                                                      "                                               &               8               +   -   !       ;         #   .              7   3   6   2       B           5       $          N          Q                                                 h           	           |                                                  	     =      
     >@           >           >           >           C           C           E           F|           F           F           K                                                     C          % El          .      	   5 E          : DL          ? E          H F        Q Z         V D          [ Y  @!     `               m C          D           C           C           D           E           D|           E           =   P  
    D           E`           E$           D(           D           F         D           D           D           D           E          E0          Y  @     E          C                       ' D         . F   !    6 E         = F       I Dp         P E<         U Z       \ D         b D@         g Z       n D         u K        | C         ET                     Dd          C         >        D              	   EH          DX          D4          F        E            >@   P                  # E         ) Ex         1 C        __1cH__CimplKcplus_fini6F_v_ getopt __umul64 _start read atoi vfprintf _environ _end fork _iob _ex_register _GLOBAL_OFFSET_TABLE_ pipe atexit exit creat malloc sprintf uname _init dup .umul .mul time sscanf ___Argv strncat wait snprintf strncpy _DYNAMIC printf __iob write _exit _ex_deregister execlp environ perror __cg92_used strchr free optind close open optarg strcmp _edata _PROCEDURE_LINKAGE_TABLE_ memset __fsr_init_value strcpy _etext _lib_version kill main memcpy strlen localtime __environ_lock lseek _fini __1cH__CimplKcplus_init6F_v_ fstat fprintf sysconf libc.so.1 SUNW_1.1 libkstat.so.1 libc.so.1     9       
='      C     F  <     F  #     F       F|  W     Z  F     Z  C     Y  9     C  &     C  '     C  ;     C  Z     C       D  5     D  1     D  3     D(  0     D4  S     D@  E     DL       DX  R     Dd  L     Dp  A     D|  *     D  %     D  !     D  D     D  -     D  =     D  G     D  (     D  O     D  4     D  6     E   U     E  X     E  +     E$  /     E0  8     E<  B     EH  Q     ET  J     E`  .     El       Ex  Y     E       E  ?     E  )     E       E  :      @D  "b̥, @'  $+   `      -` `?-)  "-      =--%    #    @ MU     O@ MR"@@        @     @ MK   @ ML   @N              @      㷀@ MF       C  C   C;pȄ ;`  O;h  @ M6 ?   /* :  i 
 ?̀ e G f"       i l o  s" 1         @  @     O @ M$   O  O"ܒ          |@ M
   	"  O @ $    O  hp L^	@  L  H |  H   O  O1     "ܔ `   \   X@ Lޘ   	"  O @ 
    O  hp H^	@  H  H X  H   O  O1   "  @ L ̀  	"  O ,@ 
ѐ  o  O  ` ̍&   g  O   D  Da  O <  <     O @ L$ U  O 
@ L O  O L  1     H  1           P
    1  @ 
  1  "؄&   % 1     <  @ Lm  '@ Lm      O @ LY$ @ Le    ?  (     p@ 
q  !     8  8* @ LU@     Ԅ      8  8* @ LH@   "؅(@@ LA        
@ L=      O@ L:  @ L: A  1     O@ L0  83    T  bԀ  5     @ 
0  ؀  6 bԒ @ 
(  b    O# @ L      O# @ L    @ L   ?     @ 
 @ L        @ L	 @ L
`  O    O  @ L  ?      @ 	  
  ?      @ 	       @ K`   @      @ K      @ 	ؐ   @ K!   @ K    0             8     @ K    І  @  B 8   @ Kǒ @ KȐ      @ KŔ @ K     !         @ K  ?      8@ 	     І    @   8     @ K @ K}        @ 	   @ KS "  O        @Y      @      @N        3  E#h   b H    d@ Kc#l     @       4     @ K~x?    @ 	[       L      E#l bb  DD   E ;  E ;x  # ,;p      @ 	r! Ю  !&  " .  @ *` @ 	+  *`h 	  (       @ K9 ? 2 T@ 	   " @   d@ 	     @ 	)       %              @ 	0    @   :        2     &    @ JŐ    `  xp ^	BH  H #  
   )     H  	     Ё
   U     @    ##Ĳ    `    Ѐ `    @ !     `     `@   &  `  >     Ѐ   '    P@ J    z` @ J :` < ( ( ($#d` #\`#`  O 0   Q   R   S  @ J T@ Q     El D  
   b
!        #l      8    @      O @ Jr T     D  lJ   )          `    !  (! t( @ M  p @ I  l @ E          7   `      ( +     쀠l2     t        p          `@
ܐ  `@&` @ J @ J @ J  t $ l& p&    M`     a  a  	  1  #                        	  #   	  #   	   #  !#    0     &#䑠&ȑ ;a  @ E   @      # ܆     Ѐ      (      c ᬈ!     )  (@ I`     E b ́   l=6   ́
   /   &#ll   ܀   @         @ I!          ( (@ I    㿠  @ I4       O  d @ Ij      (     `(       O ct @ I[  `(         4                        d                       @       l  G㿘    0  O@ I8         O       &a 8O *       O>Ȑ >Ж>@ I>O ?#\>?#`>? #d>  O?  @ I?O ?P#\?(?X#`?0  O?8 ?@@ I ?HO ?#\?`  O?h ?p?x@ H?O ?#\??#`?  P?  ?@ H?O   P?Ȑ  ?Ж?ؘ?@ Hܚ?O   P? 8?@ HԖ O   P  H  @ H˘  O   P ( \ 8 H@ H XO   P ` p@ H hO  #\ p  P x |  @ H }O   P     @ H sO   P ؐ @ H lO !#\ !#` !(#d   P! @ H!\O      4    P    P@ H㿠              P>h@    ?А       (  @    ?T         @  |  	                #0#0 , a( a(  	  #@! `!  ?   @! B !    	   @#H      	  ` #X!  !    & A &    z  ` ̒`` Ȇ"̄`"Ȇ #̄A # ` "ఄ # ` "ഄ # ` `"ऄ`"ࠆ #ऄA # ` `"଄`"ਆ #଄A # ` `"Ą`" #ĄA # ` `؆"܄`"؆ #܄A # ` `"༄`"ฆ #༄A # ` И `І`"Ԅ`"ЖІ A #Ѐ@
#Ԟ&`ȁ      C0           I  P㿀  $čƍ" $&#\ #hđh	" $(#`#d  Ƚ $	"đ(#x#tx	"t"#p#lpl@ G       C0        IHP , H " $# "#@ %`  0# " (# "#@   ` !#\ (   P# &ȑ	 &(#`#d 0Ƒȑ	 &(#h#l #p#t 4Ƒȑ	 &(#x#| 8Ƒȑ	 &(## $ ,ȑ	 &ƍƅ(##"##@ G    A      C0              Ae    @@     @Y      H . (  J@ `??`̍@ >ޥF  F      ` >```؄ #   ;  <  P 4`ą >;ލ@F`ܑ >ޅ;x
@F;@ F;   x
  	F > ?  	н	F `````@?B 
2`	 (?*  (#\2 	#h;#l  P D#p ( &#t 'ȍȕLJ#`#d``ԍȍLF H##@##@ Fx  C0           J0  Pp | $čƍ $&#\ h#xđx	 $(#`#d lđȑ	 $(#h#l pđȑ	 $(#p#t t xȑ	 $ĉą	(##"##||@ FC l      C0           K8h P $čƍ $&#\ X T# #  Pđȑ	 $(#`#d \đȑ	 $(#h#l `đȑ	 $(#p#t dđȑ	 $(#x#| H Lȑ	 $ĉą	(##"##@ E       C0         h8	  !  #  K@ E#p# app "!"@ E;x#  Papp "x|!ĉ	 "ƽ "$&#\ <#`#d#	 "(#h#l!"##@ E       C0           K  P㿈  $čƍ $&#\ #` `	 $ĉą	(#p#lpl"#h#dhd@ E       C0      @Y      㿐!x  
  P    `  @ Eq d "!  K!x  K8 c@c@   "   P!tđ	 "(	F#`#\`\"#h#dhd@ EP  !    P    h  @ EFl  K!  K8 c@c@   "   P!|đ	 "(	F#`#\`\"#h#dhd@ E'㿈   ?#` #d?#l #p #\ #h  P? ?   ,@ E   C0            L  P  $  bh ƍ $ĉą	&#h#dhd"#`#\`\p@ D     C0           Lh!  $čƍ $&#\!8!<#x #xđȑ	 $(#`#d!0!, #  Pđȑ	 $(#h#l!@đȑ	 $(#p#t  ȑ	 $ĉą	(##"##||@ D x      C0      @Y        Lx   " Ľ ""#@ 6`    ` $   PčH Ƚ $#h#l! čƍ $&#\!$#pđp	 $(#`#d!!ȑ	 $ĉą	(##||"#x#txt@ DZ   C0      A            㿀!"8!8	@ DW;`;x  L  L!؄ cx $c  P " $čH $ #`F#h#l $!ĉlhHB#t#ptp@ D#    C0        M  P`# $!ȍƍ $&#\!đȑ	 $(#`#d!đȑ	 $(#h#l!̑đȑ	 $(#p#t!đđȑ	 $(#x#|!Бđȑ	 $(##!đȑ	 $(##!#	"##@ CҐ Ё    d     <                                     x               P     (㿠  M =     O `   `d &`aD   &`a 8O *        O    O      ,    @   `  `    O   B O    O   ΐ O    O   E O   [ O   x O    O    O    p~01    a                     `      ~O      4    P    P@ C    C0              @Y          |          D        d    $      4    T      l        ԝ㿠    N ĸ      #\  N  \ (ȁ`  `       0   i   	   NЄ   ލ   P@ BӐ    O    V  v & a  P@ Bǐ & a 8O   N*  `    O ?O      ,     (`   @      `` #O aO O O O O O O /O    ]O   㿠            `  @#    `  #` `&    ?      ?      #D  ND$c      Nނ c`     ?      @Y      #D  O`#HD       O` `H `` 	(	F   a  P c @ B: 㿠'L  'P   P'T 'X@ B/   @ B.L   P@ B'      P@ B(        @ A   㿠           @ B   @ B  &        pΐ   @ A 㿠  @ B
               㿠  @ A         㿠@      ??           @     @      㿠@      H??           @     @             ubdycwaqvmpgrkAo:s:e:i:f:   %s  %d:%d:%d    %d:%d:%d    %f  %s  /var/adm/sa/sa%.2d  u   udqbwcayvmpgrk  %d  %d  /usr/lib/sa/sadc    /usr/lib/sa/sadc    
%s %s %s %s %s    %.2d/%.2d/%.2d
  	unix restarts
 %.2d:%.2d:%.2d              
    %7s %7s %7s %7s
    %7s %7s %7s %7s %7s %7s %7s %7s
      %-8.8s    %7s %7s %7s %7s %7s %7s
    %7s %7s %7s %7s %7s %7s
    %7s %7s %7s %7s %7s %7s %7s
    %7s %7s %7s %7s %7s
    %7s %7s %7s
    %7s %7s %7s %7s
     %s  %s  %s   %s
   %7s %7s
    %7s %7s %7s %7s %7s %7s
    %8s %8s %8s %8s %8s
    %7s %8s
    %7s %7s %5s %7s %7s %5s %11s %5s
  
    %7.0f %7.0f %7.0f %7.0f
    %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f
      %-8.8s       %7.0f %7.1f %7.0f %7.0f %7.1f %7.1f
     %7.0f %7.0f %7.0f %7.0f %7.0f %7.0f
    %7.0f %7.0f %7.0f %7.2f %7.2f %7.0f %7.0f
  %7.2f %7.1f %7.2f %7.1f %7.0f
  %7.0f %7.0f %7.0f
  %7s %7s     %7.1f %7.0f     %7s %7s
    %7.1f %7.0f
    %4lu/%-4lu %4u %4lu/%-4lu %4u %4lu/%-4lu %4u %4lu/%-4lu
    %7.2f %7.2f
    %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f
    %8.2f %8.2f %8.2f %8.2f %8.2f
  %7.0f %8.0f
    %7.0f %7.0f %5.0f %7.0f %7.0f %5.0f %11.0f %5.0f
  
   
   Average     usage: sar [-ubdycwaqvmpgrkA][-o file] t [n]
	sar [-ubdycwaqvmpgrkA] [-s hh:mm][-e hh:mm][-i ss][-f file]
  sar:    
        E                                                  00     <0     H0     T0     `0     l0     x0     0     0     0     0     0     0     0     0     0     0     0    0    0     0    ,0    80    D0    P0    \0    h0    t0    0    0    0    0    0    0    0    0    0    0    0    0~    0{    0x           L     Z    =    >@         	   
  d    h      o  o |o                           L   	          o   o        C                                \d                                                                -%c %s -- illegal option argument   -%c %s -- illegal option argument   -%c %s -- illegal option argument   ending time <= starting time    can't open %s   sampling interval t <= 0 sec    number of sample intervals n <= 0   pipe failed exec of /usr/lib/sa/sadc failed Could not fork to exec sadc output file name same as input file name    lseek failed    unable to stat data file    insufficient address space to hold %lu device records
  lseek failed    data file corrupt; specified sizeexceeds actual premature end-of-file seen  %usr    %sys    %wio    %idle   bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s device  %busy   avque   r+w/s   blks/s  avwait  avserv  rawch/s canch/s outch/s rcvin/s xmtin/s mdmin/s scall/s sread/s swrit/s fork/s  exec/s  rchar/s wchar/s swpin/s bswin/s swpot/s bswot/s pswch/s iget/s  namei/s dirbk/s runq-sz %runocc swpq-sz %swpocc proc-sz    ov   inod-sz    ov   file-sz    ov   lock-sz msg/s   sema/s  atch/s  pgin/s  ppgin/s pflt/s  vflt/s  slock/s pgout/s ppgout/s    pgfree/s    pgscan/s    %ufs_ipf    freemem freeswap    sml_mem alloc   fail    lg_mem  alloc   fail    ovsz_alloc  fail                    malloc failed   read failed write failed  @(#)SunOS 5.8 Generic February 2000  .interp .hash .dynsym .dynstr .SUNW_version .rela.ex_shared .rela.bss .rela.plt .text .init .fini .exception_ranges .rodata .rodata1 .got .plt .dynamic .ex_shared .data .data1 .bss .comment .shstrtab                                                                             	                                    h  h                        	  	  d                  o    |  |                    -            0               =            $               G                          Q           0                  W       =  =   P                  ]       >@  >@   P                  c       >  >                     u       >  >                     }       >  >                           C  C                           C  C  ,                        E  E                          F|  F|   (                         F  F   <                         F  F                           K  K  @                               K   %                               K                  07070100019fc8000081ed000000f1000000650000000139ab989800002314000000200000000800000000000000000000001600000004reloc/local/sara/sara #!/bin/ksh
# Program name: sara		(Version 1.0) 17 Aug 2000
#-------------------------------------------------------------
# Function: sar - (system activity reporter) analyzer
# Prerequisites:
# -The script xsar-disk.perl requires perl
#
# Made by John Erik Solberg  email: jone@pogostick.net
# (Version 1.1)  25 Aug 2000
# Added support for reading sarfiles from other Solaris versions.
#
#
sara_ksize() 
{
  $SAR -f $1 -k  > /tmp/sara.$$/${T}r-k

  for j in /tmp/sara.$$/${T}r-k ; do

    v=`wc -l $j|awk '{print $1}'`
    x=`expr $v - 4`
    echo " `head -4 $j`    Kernel_size_Mb" > /tmp/sara.$$/${T}r-k-head
    HEAD=/tmp/sara.$$/${T}r-k-head
    export HEAD
    tail -${x} $j |grep -v "unix restarts"| while read LINE ; do
     if [ -n "$LINE" ] ; then
        sml_mem_all=`echo $LINE |awk '{print $3}'` 
        lg_mem_all=`echo $LINE |awk '{print $6}'`
        ovsz_alloc=`echo $LINE |awk '{print $8}'`
        k_mem=`expr \( $sml_mem_all + $lg_mem_all + $ovsz_alloc \) / 1048576 `
        echo "$LINE  ${k_mem} Mb"
     fi
    done
  done
}

max_min()
{
  F=$1
  export F
  read LINE 
  MAX=`echo $LINE |awk '{print $'${F}' }'`
  MAX_LINE=$LINE
  MIN=`echo $LINE |awk '{print $'${F}' }'`
  MIN_LINE=$LINE

  while read LINE ; do
    if [ `echo $LINE |awk '{print $'${F}' }'` -gt $MAX ] ; then
      MAX=`echo $LINE |awk '{print $'${F}' }'`
      MAX_LINE=$LINE
    fi

    if [ `echo $LINE |awk '{print $'${F}' }'` -lt $MIN ] ; then
      MIN=`echo $LINE |awk '{print $'${F}' }'`
      MIN_LINE=$LINE
    fi
    LINEM=$LINE
  done
  export MAX_LINE MIN_LINE LINEM
}

sara_dnlc()
{
  $SAR -f $1 -a  > /tmp/sara.$$/${T}r-a

  X=0
  for j in /tmp/sara.$$/${T}r-a ; do

    v=`wc -l $j|awk '{print $1}'`
    x=`expr $v - 4`
    echo " `head -4 $j`    DNLC_hitrate" #> /tmp/sara.$$/${T}r-a-head
    tail -${x} $j |grep -v "unix restarts"| while read LINE ; do
     if [ -n "$LINE" ] ; then
        iget=`echo $LINE |awk '{print $2}'`
        namei=`echo $LINE |awk '{print $3}'`
        if [ $namei -gt 0 ] ; then
          DNLC_HIT=`expr 100 \* \( $namei - $iget \) / $namei `
          if [ $DNLC_HIT -lt $2 -a namei -gt 35 ] ; then
            echo "$LINE     ${DNLC_HIT}%"
            X=`expr $X + 1 `
          fi
        fi 
     fi
    done
  done
  return $X
}


sara_run()
{
  $SAR -f $1 -q  > /tmp/sara.$$/${T}m-a

  X=0
  for j in /tmp/sara.$$/${T}m-a ; do

    v=`wc -l $j|awk '{print $1}'`
    x=`expr $v - 4`
    echo " `head -4 $j` "
    tail -${x} $j| grep -v "unix restarts" | while read LINE ; do
     if [ -n "$LINE" ] ; then
        runq=`echo $LINE |awk '{print $2}'|cut -d. -f1`
        runocc=`echo $LINE |awk '{print $3}'|cut -d. -f1`
        if [ $runq -gt $2 -o $runocc -gt $3 ] ; then
          echo "$LINE"
          X=`expr $X + 1 `
        fi
     fi
    done
  done
  return $X
}
sara_sys()
{
  $SAR -f $1 -c  > /tmp/sara.$$/${T}m-a

  X=0
  for j in /tmp/sara.$$/${T}m-a ; do

    v=`wc -l $j|awk '{print $1}'`
    x=`expr $v - 4`
    echo " `head -4 $j` "
    tail -${x} $j| grep -v "unix restarts" | while read LINE ; do
     if [ -n "$LINE" ] ; then
        scall=`echo $LINE |awk '{print $2}'`
        rchar=`echo $LINE |awk '{print $7}'`
        wchar=`echo $LINE |awk '{print $8}'`
        if [ $scall -gt $2 -o $rchar -gt $3 -o $wchar -gt $4 ] ; then
          echo "$LINE"
          X=`expr $X + 1 `
        fi
     fi
    done
  done
  return $X
}



sara_msg_sem()
{
  $SAR -f $1 -m  > /tmp/sara.$$/${T}m-a

  X=0
  for j in /tmp/sara.$$/${T}m-a ; do

    v=`wc -l $j|awk '{print $1}'`
    x=`expr $v - 4`
    echo " `head -4 $j` "
    tail -${x} $j | grep -v "unix restarts"| while read LINE ; do
     if [ -n "$LINE" ] ; then
        msg=`echo $LINE |awk '{print $2}'|cut -d. -f1`
        sema=`echo $LINE |awk '{print $3}'|cut -d. -f1`
        if [ $msg -gt $2 -o sema -gt $3 ] ; then
          echo "$LINE"
          X=`expr $X + 1 `
        fi
     fi
    done
  done
  return $X
}



sara_gen()
{
# F = sar Field
# L = Limit
# TE = Test -lt/-gt
# S = Silent
  F=$3
  L=$4 
  TE=$5
  S=$6
  export F
  $SAR -f $1 -${2}  > /tmp/sara.$$/${T}${2}-a

  X=0
  for j in /tmp/sara.$$/${T}${2}-a ; do

    v=`wc -l $j|awk '{print $1}'`
    x=`expr $v - 4`
    if [ $S = 1 ] ; then
      echo " `head -4 $j` " > /tmp/sara.$$/${T}${2}-a-head
    else
      echo " `head -4 $j` "
    fi
    tail -${x} $j | grep -v "unix restarts"| while read LINE ; do
     if [ -n "$LINE" ] ; then
        pgscan=`echo $LINE |awk '{print $'${F}'}'|cut -d. -f1`
        if [ $TE = gt ] ; then
          if [ $pgscan -gt $L ] ; then
            echo "$LINE"
            X=`expr $X + 1 `
          fi
        fi
        if [ $TE = lt ] ; then
          if [ $pgscan -lt $L ] ; then
            echo "$LINE"
            X=`expr $X + 1 `
          fi
        fi
     fi
    done
  done
  return $X
}

sara_level()
{
  case x"$1" in
    x0)
      export DISK_B=4 DISK_A=18 DNLC_H=95 R_CACHE=97 CPU_IDLE=60 RUNQ=2 RUNOCC=50 SR=5 MSG=1 SEM=1  OUTCH=1000 SCALL=2000 RCHAR=50000 WCHAR=50000 ;;
    x1)
      export DISK_B=8 DISK_A=20 DNLC_H=90 R_CACHE=95 CPU_IDLE=50 RUNQ=2 RUNOCC=60 SR=20 MSG=1 SEM=9  OUTCH=200 SCALL=5000 RCHAR=70000 WCHAR=70000 ;;
    x2)
      export DISK_B=15 DISK_A=25 DNLC_H=90 R_CACHE=93 CPU_IDLE=40 RUNQ=2 RUNOCC=70 SR=40 MSG=3 SEM=50  OUTCH=3000 SCALL=10000 RCHAR=100000 WCHAR=100000 ;;
    x3)
      export DISK_B=20 DISK_A=25 DNLC_H=90 R_CACHE=90 CPU_IDLE=30 RUNQ=2 RUNOCC=80 SR=60 MSG=5 SEM=100  OUTCH=5000 SCALL=15000 RCHAR=500000 WCHAR=500000 ;;
    x4)
      export DISK_B=30 DISK_A=30 DNLC_H=90 R_CACHE=90 CPU_IDLE=20 RUNQ=2 RUNOCC=90 SR=100 MSG=10 SEM=200 OUTCH=10000 SCALL=20000 RCHAR=800000 WCHAR=800000 ;;
  esac
}
# 
sara_sar()
{
# Determin which sar to use
# Sar for solaris 2.6 can read sarfiles generated on Solaris 2.5.1 (patch 106818-01)
  SAR=`which sar`
  $SAR -f $1 -d > /dev/null 2>&1
  if [ $? -ne 0 ] ; then
    SAR=$SAR8
    $SAR -f $1 -d > /dev/null 2>&1
    if [ $? -ne 0 ] ; then
      SAR=$SAR6
      $SAR -f $1 -d > /dev/null 2>&1
      if [ $? -ne 0 ] ; then
        echo "sar cant read sar file $1"
        exit 1
      fi
    fi
  fi
  export SAR
}


DEFAULT_LEVEL=3
LEVEL=$DEFAULT_LEVEL

SAR8=/usr/local/sara/sar8  # Sar for Solaris 8 can read sarfiles for Solaris 7
SAR6=/usr/local/sara/sar6  # Sar for Solaris 2.6 can read sarfiles for Solaris 2.5.1
export SAR8 SAR6

x=`basename $0`
if [ $# = 0 ] ; then
  echo "usage: ${x} sarfile [level]"
  exit 1
fi


if [ $# = 2 ] ; then
  if [ $2 -ge 0 -a $2 -le 4 ] ; then
    LEVEL=$2
  else
    echo " undefined level $2 using $DEFAULT_LEVEL"
  fi
fi

sara_level $LEVEL

SAR_FILE=$1
if [ ! -r $SAR_FILE ] ; then
  echo " cant read sar file $SAR_FILE"
  exit 1
fi

sara_sar $SAR_FILE

T=`basename $SAR_FILE`
export T
mkdir /tmp/sara.$$
trap "rm -rf /tmp/sara.$$; exit 1" 1 2 3 5 10 13 15
#
# Disk performance
echo ""
echo ""
echo " Disk performance %busy > $DISK_B && avserv > $DISK_A"
echo ""
/usr/local/sara/xsar-disk.perl -f $SAR_FILE -m $DISK_B -a $DISK_A -s $SAR
#
# Paging
echo ""
echo ""
echo "-----  Paging/Scanrate pgscan/s > $SR"
sara_gen $SAR_FILE g 5 $SR gt 0
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi
#
# Kernel size
echo ""
echo ""
echo "-----  Kernel size"
sara_ksize $1 | max_min 10
cat /tmp/sara.$$/${T}r-k-head
echo "$MIN_LINE   MIN"
echo "$MAX_LINE   MAX"
echo "$LINEM "
#
# DNLC hitrate
echo ""
echo ""
echo "-----  DNLC hitrate = 100*(\"namei/s\"-\"iget/s\")\"namei/s\" < $DNLC_H"
sara_dnlc $SAR_FILE $DNLC_H
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi
#
# Buffercache
echo ""
echo ""
echo "-----  Read cache \"%rcache\" < $R_CACHE "
sara_gen $SAR_FILE b 4 $R_CACHE lt 0
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi

#
# Freemem
echo ""
echo ""
echo "-----  Freemem"
sara_gen $SAR_FILE r 2 1 gt 1 | max_min 2
cat /tmp/sara.$$/${T}r-a-head
echo "$MIN_LINE   MIN"
echo "$MAX_LINE   MAX"
echo "$LINEM "
#
# CPU state
echo ""
echo ""
echo "-----  CPU idle \"%idle\" < $CPU_IDLE "
sara_gen $SAR_FILE u 5 $CPU_IDLE lt 0
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi
#
# Runn queue
echo ""
echo ""
echo "-----  Runn queue \"runq-sz\" > $RUNQ || \"%runocc\" > $RUNOCC"
# Due to a problem in sar that this fiels is sometimes empty redirecting stderr to /dev/null
sara_run $SAR_FILE $RUNQ $RUNOCC 2> /dev/null 
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi
#
# Systen call read/write
echo ""
echo ""
echo "-----  System calls + read write \" syscall/s > $SCALL || rchar/s > $RCHAR || wchar/s > $WCHAR\" "
sara_sys $SAR_FILE $SCALL $RCHAR $WCHAR
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi

#
# Caracter i/O
echo ""
echo ""
echo "----- Character I/O (tty/pty) outch/s > $OUTCH "
sara_gen $SAR_FILE y 4 $OUTCH gt 0
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi
#
# Message Queues/ Semaphores
echo ""
echo ""
echo "-----  Message Queues/ Semaphores \"msg/s > $MSG || sema/s > $SEM\""
sara_msg_sem $SAR_FILE $MSG $SEM
if [ $? -eq 0 ] ; then
  echo " No rules matched"
fi
#




rm -rf /tmp/sara.$$
07070100019fc9000081ed000000f1000000650000000139ab989800000459000000200000000800000000000000000000001800000004reloc/local/sara/sara.1   '\" t
.\" @(#)sara.1 1.10 00/08/24 JES;
.nr X
.TH sara 1 "24 Aug 2000"
.SH NAME
sara \- system activity reporter analyzer
.SH SYNOPSIS
\f3sara\f1
.I sarfile [level]
.SH DESCRIPTION
.IX "sara" "" "\fLsara\fP \(em system activity reporter analyzer"
\f3sara,\fP
sar analyzer indicating where and when the load is, based on 
predefined limits defined in 
.I level.
Default level is 3.
.SH LIMITATIONS
Since sar don't report network activity, use netstat (1) to log network activity.
.SH FILES
.TP 20
.I/local/sara/sara
sar analyzer
.TP 20
.I /local/sara/sar6
Sar binary for reading Solaris 2.5.1, and Solaris 2.6 sarfiles (patch 106818-01)
.TP 20
.I /local/sara/sar8
Sar binary for reading Solaris 7, and Solaris 8 sarfiles
.TP 20
.I /local/sara/xsar-disk.perl
Disk analyzing perl script (requires /usr/local/bin/perl)
.sp
.TS
.TE
.SH SEE ALSO
.BR sar (1),
.BR sag (1),
.BR netstat (1)
.SH BUG
Due to a bug (4026830) in sar -k "Average lg_mem" is sometimes 
calculated wrong, and then Average is listed as MIN.
.SH AUTHOR
.TP 20
Sara is written by John Erik Solberg, and feedback can be
sendt to jone@pogostick.net.

   07070100019fca000081ed000000f1000000650000000139ab98a100000f84000000200000000800000000000000000000002000000004reloc/local/sara/xsar-disk.perl   #!/usr/local/bin/perl -w 
#
# Expects Solaris type sar output with -d option
# filter sar disk usage output by percent busy. 
# also convert instance to device (sd0 => c0t0d0) and retain timestamp
# 
# Disabled device converting (jone)

use Getopt::Std;
my $dir = '/var/adm/sa';


use vars qw( $opt_A $opt_f $opt_h $opt_m $opt_v $opt_s $opt_a );
my $ok = getopts("Ahvf:m:a:s:");
help() unless $ok;
help() if $opt_h;

# min percent busy to look for
$Min = 20;
$Min = $opt_m if $opt_m;
$Avs = 25;
$Avs = $opt_a if $opt_a;

$sar = '/bin/sar';
$sar = $opt_s if $opt_s;
if ( ! -x $sar ) { die "$sar not found\n"; }

# device to instance hashes
my %path_to_inst  = ();
my %svr_to_inst  = ();

# devices indexed by instance
my %devices  = ();
inst_to_dev();

if ( $opt_A ) {
	opendir(DIR,"$dir") or die "Can't open $dir: $!\n";
	@files = grep(/sa\d+/,readdir(DIR));
	closedir(DIR);
}
if ( $opt_f ) {
	push(@files,$opt_f);
}
my $nofile = 0;
if ( !$opt_f && !$opt_A ) {
	push(@files,"-");
	$nofile = 1;
}

print "Using a Min(-m) of $Min, ";
foreach $fl (sort @files) {

	if ( $nofile ) {
		open(IN,"-") or die;
		print "Reading from stdin\n";
	} else {
		$fl = "$dir/$fl" unless $opt_f;
		open(IN,"$sar -df $fl |") or die "Can't open $fl: $!\n";
		print "Reading from $fl\n";
	}

	while (<IN>) {
		next if /^$/;
		next if /,/;
		last if /^Average /;
	
		if ( $_ =~ /^SunOS / || $_ =~ /%/ ) {
			print $_;
			next;
		}
	
		my @ln = split(/\s+/,$_);
		if ( $ln[0] ne "" ) {
			$time = $ln[0];
			next;
		} elsif ( $ln[2] > $Min && $ln[7] > $Avs ) {
			s/^         //;
#			($ln[1] = $devices{$ln[1]}) =~ s,.*/,,;  #disabled device converting (jone)
			printf "%-8s  %-15s %3d %8.1f %7d %7d %7.1f %7.1f\n",
				$time,$ln[1],$ln[2],$ln[3],$ln[4],$ln[5],$ln[6],$ln[7];
		}
	}
	close(IN);
}

#################################################

sub help {
	(my $prog = $0) =~ s,.*/,,;
	print "\nusage: $prog [-A | -f fname] [-h]\n";
	print " -A: filter all sar data files in /var/adm/sa\n";
	print " -f fname: filter a single sar data file\n";
	print " -m num: minimum % busy to show\n";
	print " -a num: minimum avserv to show\n";
	print " -v: some extra verbosity\n";
	print " -s: which sar binary\n";
	print " -h: this nifty help message\n";
	print "defaults to filtering stdin, as in \"sar -d 5 5 | xsar\"\n\n";
	exit;
}


########################################################
# inst_to_dev: correlate instances to devices
########################################################
sub inst_to_dev {
  my(@files);
  open(IN,"</etc/path_to_inst") || die "Can't open instance file: $!\n";
  while(<IN>) {
    next if /^#/;
    my($path,$num,$driver) = split(/\s+/,$_);
    $path =~ s/"//g;
    $driver =~ s/"//g;
    $path_to_inst{$path} = $driver.$num;
  }
  close(IN);
  
  opendir (DIR,"/dev/dsk") || die "Can't open /dev/dsk: $!\n";
  @files = readdir (DIR);
  closedir (DIR);
  foreach $i (@files) {
   $i = "/dev/dsk/$i";
   if (-l $i) {
     my($realname) = readlink($i);
     $realname =~ s/.*\/devices(.*):.*/$1/;
     $i =~ s/s[0-9]//;
     if (!defined($svr_to_inst{$i})) { $svr_to_inst{$i} = $realname; }
   }
  }
  
  opendir (DIR,"/dev/rmt") || die "Can't open /dev/rmt: $!\n";
  @files = readdir (DIR);
  closedir (DIR);
  foreach $i (@files) {
   $i = "/dev/rmt/$i";
   if (-l $i) {
     my($realname) = readlink($i);
     $realname =~ s/.*\/devices(.*):.*/$1/;
     if (!defined($svr_to_inst{$i}) && !defined($UsedPaths{$realname})) { 
       $svr_to_inst{$i} = $realname;
       $UsedPaths{$realname}++;
     }
   }
  }
  
  foreach $i (keys (%svr_to_inst)) {
    $devices{$path_to_inst{$svr_to_inst{$i}}} = $i;
  }

  if (defined($opt_v)) {
    printf "\n%19s %8s   %s\n","Device","Instance","Device Path";
    printf "%19s %8s   %s\n","-----------------","--------","-----------";
    foreach $i (sort keys (%svr_to_inst)) {
      printf "%19s %8s   /devices%s\n",$i,$path_to_inst{$svr_to_inst{$i}},
                    $svr_to_inst{$i};
    }
    print "\n";
  }
}

07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!                                                                                                                                                                                                                                                            