(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:log)
          op: Equal
          rhs: {(DQ (/Users/taylor/.netstatlog))}
          spids: [10]
        )
      ]
      spids: [10]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:stats)
          op: Equal
          rhs: {(DQ (/tmp/netperf.stats.) ($ VSub_Dollar '$$'))}
          spids: [18]
        )
      ]
      spids: [18]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:awktmp)
          op: Equal
          rhs: {(DQ (/tmp/netperf.awk.) ($ VSub_Dollar '$$'))}
          spids: [24]
        )
      ]
      spids: [24]
    )
    (C {(trap)} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(which)} {(rm)})])
            left_token: <Left_Backtick '`'>
            spids: [34 38]
          ) (' -f ') ($ VSub_Name '$awktmp') (' ') ($ VSub_Name '$stats')
        )
      } {(0)}
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-r)} {($ VSub_Name '$log')} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ("Error: can't read netstat log file ") ($ VSub_Name '$log'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 62]
        )
      ]
      spids: [16777215 80]
    )
    (C {(eval)} 
      {
        (CommandSubPart
          command_list: (CommandList children:[(C {(tail)} {(-1)} {($ VSub_Name '$log')})])
          left_token: <Left_CommandSub '$('>
          spids: [89 95]
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:rep)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (C {(scriptbc)} {(-p)} {(3)} 
                          {($ VSub_Name '$re') (/) ($ VSub_Name '$snt') 
                            (EscapedLiteralPart
                              token: <Lit_EscapedChar '\\*'>
                            ) (100)
                          }
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [103 115]
                )
              )
            }
          spids: [101]
        )
      ]
      spids: [101]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:repn)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(scriptbc)} {(-p)} {(4)} 
                              {($ VSub_Name '$re') (/) ($ VSub_Name '$snt') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (10000)
                              }
                            )
                            (C {(cut)} {(-d.)} {(-f1)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [120 140]
                )
              )
            }
          spids: [118]
        )
      ]
      spids: [118]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:repn)
          op: Equal
          rhs: 
            {
              (DQ 
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithWord w:{($ VSub_Name '$repn')})
                      right: (ArithWord w:{(Lit_Digits 100)})
                    )
                  spids: [145 154]
                )
              )
            }
          spids: [143]
        )
      ]
      spids: [143]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:retop)
              op: Equal
              rhs: 
                {
                  (DQ 
                    (CommandSubPart
                      command_list: 
                        (CommandList
                          children: [
                            (C {(scriptbc)} {(-p)} {(3)} 
                              {($ VSub_Name '$reto') (/) ($ VSub_Name '$snt') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (100)
                              }
                            )
                          ]
                        )
                      left_token: <Left_CommandSub '$('>
                      spids: [159 171]
                    )
                  )
                }
              spids: [157]
            )
          ]
          spids: [157]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:retopn)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(scriptbc)} {(-p)} {(4)} 
                              {($ VSub_Name '$reto') (/) ($ VSub_Name '$snt') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (10000)
                              }
                            )
                            (C {(cut)} {(-d.)} {(-f1)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [178 198]
                )
              )
            }
          spids: [176]
        )
      ]
      spids: [176]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:retopn)
          op: Equal
          rhs: 
            {
              (DQ 
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithWord w:{($ VSub_Name '$retopn')})
                      right: (ArithWord w:{(Lit_Digits 100)})
                    )
                  spids: [203 212]
                )
              )
            }
          spids: [201]
        )
      ]
      spids: [201]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:dupp)
              op: Equal
              rhs: 
                {
                  (DQ 
                    (CommandSubPart
                      command_list: 
                        (CommandList
                          children: [
                            (C {(scriptbc)} {(-p)} {(3)} 
                              {($ VSub_Name '$dup') (/) ($ VSub_Name '$rec') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (100)
                              }
                            )
                          ]
                        )
                      left_token: <Left_CommandSub '$('>
                      spids: [217 229]
                    )
                  )
                }
              spids: [215]
            )
          ]
          spids: [215]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:duppn)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(scriptbc)} {(-p)} {(4)} 
                              {($ VSub_Name '$dup') (/) ($ VSub_Name '$rec') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (10000)
                              }
                            )
                            (C {(cut)} {(-d.)} {(-f1)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [236 256]
                )
              )
            }
          spids: [234]
        )
      ]
      spids: [234]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:duppn)
          op: Equal
          rhs: 
            {
              (DQ 
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithWord w:{($ VSub_Name '$duppn')})
                      right: (ArithWord w:{(Lit_Digits 100)})
                    )
                  spids: [261 270]
                )
              )
            }
          spids: [259]
        )
      ]
      spids: [259]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:oop)
              op: Equal
              rhs: 
                {
                  (DQ 
                    (CommandSubPart
                      command_list: 
                        (CommandList
                          children: [
                            (C {(scriptbc)} {(-p)} {(3)} 
                              {($ VSub_Name '$oo') (/) ($ VSub_Name '$rec') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (100)
                              }
                            )
                          ]
                        )
                      left_token: <Left_CommandSub '$('>
                      spids: [275 287]
                    )
                  )
                }
              spids: [273]
            )
          ]
          spids: [273]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:oopn)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(scriptbc)} {(-p)} {(4)} 
                              {($ VSub_Name '$oo') (/) ($ VSub_Name '$rec') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\*'>
                                ) (10000)
                              }
                            )
                            (C {(cut)} {(-d.)} {(-f1)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [294 314]
                )
              )
            }
          spids: [292]
        )
      ]
      spids: [292]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:oopn)
          op: Equal
          rhs: 
            {
              (DQ 
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithWord w:{($ VSub_Name '$oopn')})
                      right: (ArithWord w:{(Lit_Digits 100)})
                    )
                  spids: [319 328]
                )
              )
            }
          spids: [317]
        )
      ]
      spids: [317]
    )
    (C {(echo)} {(DQ ('Netstat is currently reporting the following:'))})
    (C {(/bin/echo)} {(-n)} 
      {
        (DQ ('  ') ($ VSub_Name '$snt') (' packets sent, with ') ($ VSub_Name '$re') (' retransmits (') 
          ($ VSub_Name '$rep') ('%) ')
        )
      }
    )
    (C {(echo)} 
      {(DQ ('and ') ($ VSub_Name '$reto') (' retransmit timeouts (') ($ VSub_Name '$retop') ('%)'))}
    )
    (C {(/bin/echo)} {(-n)} 
      {
        (DQ ('  ') ($ VSub_Name '$rec') (' packets received, with ') ($ VSub_Name '$dup') (' dupes (') 
          ($ VSub_Name '$dupp') ('%)')
        )
      }
    )
    (C {(echo)} {(DQ (' and ') ($ VSub_Name '$oo') (' out of order (') ($ VSub_Name '$oop') ('%)'))})
    (C {(echo)} 
      {
        (DQ ('   ') ($ VSub_Name '$creq') (' total connection requests, of which ') 
          ($ VSub_Name '$cacc') (' were accepted')
        )
      }
    )
    (C {(echo)} {(DQ )})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Name '$repn')} {(-ge)} {(5)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Retransmits of >= 5% indicates a problem '))})
            (C {(echo)} {(DQ ('(gateway or router flooded?)'))})
          ]
          spids: [16777215 421]
        )
      ]
      spids: [16777215 437]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Name '$retopn')} {(-ge)} {(5)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Transmit timeouts of >= 5% indicates a problem '))})
            (C {(echo)} {(DQ ('(gateway or router flooded?)'))})
          ]
          spids: [16777215 453]
        )
      ]
      spids: [16777215 469]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Name '$duppn')} {(-ge)} {(5)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Duplicate receives of >= 5% indicates a problem '))})
            (C {(echo)} {(DQ ('(probably on the other end)'))})
          ]
          spids: [16777215 485]
        )
      ]
      spids: [16777215 501]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Name '$oopn')} {(-ge)} {(5)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Out of orders of >= 5% indicates a problem '))})
            (C {(echo)} {(DQ ('(busy network or router/gateway flood)'))})
          ]
          spids: [16777215 517]
        )
      ]
      spids: [16777215 533]
    )
    (C {(echo)} {(DQ ('Analyzing trends....'))})
    (WhileUntil
      keyword: <KW_While while>
      cond: [(Sentence child:(C {(read)} {(logline)}) terminator:<Op_Semi ';'>)]
      body: 
        (DoGroup
          children: [
            (C {(eval)} {(DQ ($ VSub_Name '$logline'))})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:rep2)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(scriptbc)} {(-p)} {(4)} {($ VSub_Name '$re')} {(/)} 
                                      {($ VSub_Name '$snt')} {(EscapedLiteralPart token:<Lit_EscapedChar '\\*'>)} {(10000)}
                                    )
                                    (C {(cut)} {(-d.)} {(-f1)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [567 591]
                        )
                      )
                    }
                  spids: [565]
                )
              ]
              spids: [565]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:retop2)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(scriptbc)} {(-p)} {(4)} {($ VSub_Name '$reto')} {(/)} 
                                      {($ VSub_Name '$snt')} {(EscapedLiteralPart token:<Lit_EscapedChar '\\*'>)} {(10000)}
                                    )
                                    (C {(cut)} {(-d.)} {(-f1)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [597 621]
                        )
                      )
                    }
                  spids: [595]
                )
              ]
              spids: [595]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dupp2)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(scriptbc)} {(-p)} {(4)} {($ VSub_Name '$dup')} {(/)} 
                                      {($ VSub_Name '$rec')} {(EscapedLiteralPart token:<Lit_EscapedChar '\\*'>)} {(10000)}
                                    )
                                    (C {(cut)} {(-d.)} {(-f1)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [627 651]
                        )
                      )
                    }
                  spids: [625]
                )
              ]
              spids: [625]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:oop2)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(scriptbc)} {(-p)} {(4)} {($ VSub_Name '$oo')} {(/)} 
                                      {($ VSub_Name '$rec')} {(EscapedLiteralPart token:<Lit_EscapedChar '\\*'>)} {(10000)}
                                    )
                                    (C {(cut)} {(-d.)} {(-f1)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [657 681]
                        )
                      )
                    }
                  spids: [655]
                )
              ]
              spids: [655]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ($ VSub_Name '$rep2') (' ') ($ VSub_Name '$retop2') (' ') ($ VSub_Name '$dupp2') 
                    (' ') ($ VSub_Name '$oop2')
                  )
                }
              ]
              redirects: [(Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{($ VSub_Name '$stats')})]
            )
          ]
          spids: [555 702]
        )
      redirects: [(Redir op:<Redir_Less '<'> fd:16777215 arg_word:{($ VSub_Name '$log')})]
    )
    (C {(echo)} {(DQ )})
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(DQ (EOF))}
          here_end_span_id: 735
          stdin_parts: [
            ('    { rep += $1; retop += $2; dupp += $3; oop += $4 }\n')
            ('END { rep /= 100; retop /= 100; dupp /= 100; oop /= 100;\n')
            ('      print "reps="int(rep/NR) ";retops=" int(retop/NR) \\\n')
            ('         ";dupps=" int(dupp/NR) ";oops="int(oop/NR) }\n')
          ]
        )
        (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{($ VSub_Name '$awktmp')})
      ]
    )
    (C {(eval)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(awk)} {(-f)} {($ VSub_Name '$awktmp')}]
                  redirects: [(Redir op:<Redir_Less '<'> fd:16777215 arg_word:{($ VSub_Name '$stats')})]
                )
              ]
            )
          left_token: <Left_CommandSub '$('>
          spids: [739 749]
        )
      }
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Name '$repn')} {(-gt)} {($ VSub_Name '$reps')} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Retransmit rate is currently higher than average.'))})
            (C {(echo)} 
              {
                (DQ ('    (average is ') ($ VSub_Name '$reps') ('% and current is ') 
                  ($ VSub_Name '$repn') ('%)')
                )
              }
            )
          ]
          spids: [16777215 766]
        )
      ]
      spids: [16777215 786]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Name '$retopn')} {(-gt)} {($ VSub_Name '$retops')} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Transmit timeouts are currently higher than average.'))})
            (C {(echo)} 
              {
                (DQ ('    (average is ') ($ VSub_Name '$retops') ('% and current is ') 
                  ($ VSub_Name '$retopn') ('%)')
                )
              }
            )
          ]
          spids: [16777215 802]
        )
      ]
      spids: [16777215 822]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Name '$duppn')} {(-gt)} {($ VSub_Name '$dupps')} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Duplicate receives are currently higher than average.'))})
            (C {(echo)} 
              {
                (DQ ('    (average is ') ($ VSub_Name '$dupps') ('% and current is ') 
                  ($ VSub_Name '$duppn') ('%)')
                )
              }
            )
          ]
          spids: [16777215 838]
        )
      ]
      spids: [16777215 858]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Name '$oopn')} {(-gt)} {($ VSub_Name '$oops')} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** Warning: Out of orders are currently higher than average.'))})
            (C {(echo)} 
              {
                (DQ ('    (average is ') ($ VSub_Name '$oops') ('% and current is ') 
                  ($ VSub_Name '$oopn') ('%)')
                )
              }
            )
          ]
          spids: [16777215 874]
        )
      ]
      spids: [16777215 894]
    )
    (C {(echo)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\('>) (Analyzed)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(wc)} {(-l)}]
                  redirects: [(Redir op:<Redir_Less '<'> fd:16777215 arg_word:{($ VSub_Name '$stats')})]
                )
              ]
            )
          left_token: <Left_CommandSub '$('>
          spids: [901 909]
        )
      } {(netstat)} {(log)} {(entries)} {(KW_For for)} 
      {(calculations) (EscapedLiteralPart token:<Lit_EscapedChar '\\)'>)}
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)