ok
Direktori : /proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/clcommon/ |
Current File : //proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/clcommon/cllog.pyo |
� b=0Yc @ sG d d l Z d d l Z d d l Z d d l Z d d d � � YZ d S( i����Nt ClAuditLogc B s, e Z d � Z d d � Z e d � � Z RS( c C s | | _ d S( N( t _log_file_name( t selft log_file_name( ( s2 /usr/lib/python2.7/site-packages/clcommon/cllog.pyt __init__ s t c C s� t j j � } t j � } | j | � } y� t | j d � } t j | t j t j B� | j | j d � d | d t | � d t t j d � d | d � | j � Wn t t f k r� n Xd S( Nt as %Y.%m.%d %H:%M:%Ss : Parent process: s (PID: s ): Args: i t s ( t datetimet nowt ost getppidt _get_process_namet openR t fcntlt lockft LOCK_EXt LOCK_NBt writet strftimet strt syst argvt closet IOErrort OSError( R t msgt dt_nowt parent_proc_idt proc_namet audit_log_file( ( s2 /usr/lib/python2.7/site-packages/clcommon/cllog.pyt info_log_write s Gc C sf d } yR t d | d � } | j � j d � d j d d � j d d � } | j � Wn n X| S( s\ Get process name by pid :param pid: PID for get process name :return: process name s <Unknown>s /proc/%s/statt rR i t (R t )( R t readt splitt replaceR ( t pidt namet f( ( s2 /usr/lib/python2.7/site-packages/clcommon/cllog.pyR s 1( t __name__t __module__R R t staticmethodR ( ( ( s2 /usr/lib/python2.7/site-packages/clcommon/cllog.pyR s ( ( R R R R R ( ( ( s2 /usr/lib/python2.7/site-packages/clcommon/cllog.pyt <module> s