;ò
²EåBc           @   sx   d  k  Td  k Td k Z d k Z d k Z d f  d „  ƒ  YZ e ƒ  Z e d j o" d Z d Z	 d Z
 d Z d	 Z n d S(
   (   s   *Ns   PL2_pldbStatisticsc           B   sk   t  Z d „  Z e e e d „ Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d	 „  Z d
 „  Z RS(   Nc         C   s@   d |  _ d |  _ d |  _ d |  _ d |  _ t i ƒ  |  _ d  S(   Ns    i    (   s   selfs   addresss	   connecteds
   reconnectss   errors
   begin_stats   times   connect_time(   s   self(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   __init__   s    					c         C   s  |  i o% t d t i ƒ  |  i d t ƒnà t d | d t ƒt i ƒ  } yU | |  _ t i	 | | | ƒ |  _ d |  _ t i ƒ  |  _ d |  _ |  i d 7_ Wn@ t d t i ƒ  d d t ƒd |  _ t |  _ d |  _ n Xt d |  i t i ƒ  | f d t ƒd  S(   Ns   Already connected %s sec.s   hosts!   Connecting PacketLogic-server @%si    i   sG   ********** (PLDB Statistics connect) caught an exception: %s **********s#   ConnectError=%s and it took %s sec.(   s   selfs	   connecteds   debugMsgs   times   connect_times	   debugHosts   addresss   timers   pldbs
   Statisticss   users   passwords   pldbStatisticss   errors
   reconnectss   syss   exc_infos   None(   s   selfs   addresss   users   passwords   timer(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   connect   s"    
%					c         C   s%   d |  _ d |  _ d |  _ |  ` d  S(   Ni   i    (   s   selfs   errors	   connecteds
   begin_stats   pldbStatistics(   s   self(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys
   disconnect0   s    			c         G   s"  d | i t | ƒ f } t } xø t d ƒ D]ê } |  i
 o t d | d t ƒn |  i ƒ  |  i
 o­ t i ƒ  } t d |  i | f d t ƒy; | |  i | Œ } t d | t i ƒ  | f d t ƒPWqt d | t i ƒ  d t i ƒ  | f d t ƒ|  i ƒ  qXq, q, W| Sd  S(	   Ns   %s%si   s+   Try %s caught an Error: Trying to reconnects   hosts   Calling PacketLogic @%s %ss#   Call to PacketLogic %s took %s sec.sA   ********** %s caught an exception: %s and took %s sec. **********i   (   s   funcs	   func_names   reprs   paras   funcNames   Nones   results   ranges
   connections   selfs   errors   debugMsgs	   debugHosts   connects   times   timers   addresss   pldbStatisticss   syss   exc_infos
   disconnect(   s   selfs   funcs   paras   timers   funcNames
   connections   result(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   do_pldb6   s$     

$1c         C   s   |  i t i i ƒ Sd  S(   N(   s   selfs   do_pldbs   pldbs
   Statisticss	   date_list(   s   self(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys	   date_listS   s    c         C   s    |  i t i i | | | ƒ Sd  S(   N(   s   selfs   do_pldbs   pldbs
   Statisticss   lists   stat_start_times   stat_end_times	   netObject(   s   selfs   stat_start_times   stat_end_times	   netObject(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   stat_node_listW   s    c         C   s#   |  i t i i | | | | ƒ Sd  S(   N(	   s   selfs   do_pldbs   pldbs
   Statisticss   graphs   stat_start_times   stat_end_times	   netObjects   measurepoints(   s   selfs	   netObjects   stat_start_times   stat_end_times   measurepoints(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   hostStatistics[   s    c         C   s*  g  } xt d ƒ D]} |  i o" t d t | ƒ d d t ƒn |  i ƒ  |  i oÄ t	 i	 ƒ  } t d d t ƒy< |  i i  ƒ  } t d t t	 i	 ƒ  | ƒ d d t ƒPWn= t d d	 t t i ƒ  d
 ƒ d d t ƒ|  i ƒ  n Xt d t t	 i	 ƒ  | ƒ d d t ƒq q W| Sd  S(   Ni   s   Try s%    caught an Error: Trying to reconnects   hosts#   Fetching datelist from PacketLogic.s   Reading datelist from PL2 took s    sec.s   ********** (date_list) s    caught an exception: i   s    **********(   s	   date_lists   ranges
   connections   selfs   errors   debugMsgs   strs	   debugHosts   connects   times   timers   pldbStatisticss   syss   exc_infos
   disconnect(   s   selfs
   connections   timers	   date_list(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   date_list_xa   s$     
"
(,0c         C   sG  g  } x6t d ƒ D](} |  i o" t d t | ƒ d d t ƒn |  i ƒ  |  i oá t	 i	 ƒ  } t d | d | d t | ƒ ƒ yE |  i i | | | ƒ } t d t t	 i	 ƒ  | ƒ d	 d t ƒPWn= t d
 d t t i ƒ  d ƒ d d t ƒ|  i ƒ  n Xt d t t	 i	 ƒ  | ƒ d	 d t ƒq q W| Sd  S(   Ni   s   Try s%    caught an Error: Trying to reconnects   hosts1   Fetching data (Stat_node_list) from PacketLogic: s    - s    netObject=s   Reading data from PL2 took s    sec.s   ********** (Stat_node_list) s    caught an exception: i   s    **********(   s   nodes   ranges
   connections   selfs   errors   debugMsgs   strs	   debugHosts   connects   times   timers   stat_start_times   stat_end_times   reprs	   netObjects   pldbStatisticss   lists   syss   exc_infos
   disconnect(   s   selfs   stat_start_times   stat_end_times	   netObjects   nodes   timers
   connection(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   stat_node_list_x~   s$     
"
$(,0c         C   sB  t  d | ƒ g  } x#t d ƒ D]} |  i o" t  d t | ƒ d d t ƒn |  i	 ƒ  |  i oÎ | d j o t  d d t ƒPn t i ƒ  } y\ |  i i | | | | ƒ } t  d t t | ƒ ƒ d	 t t i ƒ  | ƒ d
 d t ƒPWq6t  d d t t i ƒ  d ƒ d d t ƒ|  i ƒ  q6Xq! q! W| Sd  S(   Ns   netObject =i   s   Try s%    caught an Error: Trying to reconnects   hosti    s9   *************** Error: measurepoints=0 ******************s   Reading data (s    values) from PL2 took s    sec.s   ********** (Stat_graph_list) s    caught an exception: i   s
   **********(   s   debugMsgs	   netObjects
   graph_lists   ranges
   connections   selfs   errors   strs	   debugHosts   connects   measurepointss   times   timers   pldbStatisticss   graphs   stat_start_times   stat_end_times   lens   syss   exc_infos
   disconnect(   s   selfs	   netObjects   stat_start_times   stat_end_times   measurepointss   timers
   connections
   graph_list(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   hostStatistics_x›   s(     
"
<,(   s   __name__s
   __module__s   __init__s   PL2_address1s   PL2_users   PL2_passwords   connects
   disconnects   do_pldbs	   date_lists   stat_node_lists   hostStatisticss   date_list_xs   stat_node_list_xs   hostStatistics_x(    (    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   PL2_pldbStatistics	   s   									s   __main__s   /NetObjects/ZZ/81.8.172.133s
   2004-09-01s
   2004-10-08i   s   /NetObjects/Entire Network/(   s   PL_debugs   PL2_inis   syss   times   pldbs   PL2_pldbStatisticss   pldbStatisticss   __name__s	   netObjects   stat_start_times   stat_end_times   measurepoints(	   s	   netObjects   stat_end_times   measurepointss   syss   PL2_pldbStatisticss   pldbStatisticss   pldbs   times   stat_start_time(    (    s"   C:\Python\PL\PL2_pldbStatistics.pys   ?   s   	°		  