Ñò
Kc @ s2 d d k a d d k a d e f d „ ƒ YZ d S( iÿÿÿÿNt dstat_pluginc B s; e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s
Time from an NTP server.
BEWARE: this dstat plugin typically takes a lot longer to run than
system plugins and for that reason it is important to use an NTP server
located nearby as well as make sure that it does not impact your other
counters too much.
c C s» d | _ t i d ƒ p d | _ t i d ƒ p d | _ d | _ t t i | i t i ƒ ƒ ƒ | _
d | _ d | _ d
| _
d
| _ t i t i t i ƒ | _ | i i d ƒ d S( Nt ntpt
DSTAT_TIMEFMTs %d-%m %H:%M:%St DSTAT_NTPSERVERs 0.fedora.pool.ntp.orgt si s date/timet timel €~T g Ð?( s date/time( s time( t namet ost getenvt timefmtt ntpservert typet lenR t strftimet localtimet widtht scalet nickt varst epocht sockett AF_INETt
SOCK_DGRAMt
settimeout( t self( ( s /usr/share/dstat/dstat_ntp.pyt __init__ s $ c C sW | i i d d d | i d f ƒ | i i d ƒ \ } } t i d | ƒ d | i S( Ns i/ t i{ i s !12Ii
( R t sendtoR
t recvfromt structt unpackR ( R t datat address( ( s /usr/share/dstat/dstat_ntp.pyt gettime$ s $c C s` y | i ƒ WnK t i j
o t d | i ‚ n' t i j
o t d | i ‚ n Xd S( Ns# Failed to connect to NTP server %s.s" Error connecting to NTP server %s.( R! R t gaierrort ExceptionR
t error( R ( ( s /usr/share/dstat/dstat_ntp.pyt check) s c C sf y/ t i | i t i | i ƒ ƒ ƒ | i d