(self,pid)
return connects
@name 获取进程连接信息
            @author hwliang<2021-08-09>
            @param pid<int>
            @return dict
def get_connects(self,pid):
        '''
            @name 获取进程连接信息
            @author hwliang<2021-08-09>
            @param pid<int>
            @return dict
        '''
        connects = 0
        try:
            if pid == 1: return connects
            tp = '/proc/' + str(pid) + '/fd/'
            if not os.path.exists(tp): return connects
            for d in os.listdir(tp):
                fname = tp + d
                if os.path.islink(fname):
                    l = os.readlink(fname)
                    if l.find('socket:') != -1: connects += 1
        except:pass
        return connects
def get_connects ( self , pid ) : connects = 0 try : if pid == 1 : return connects tp = '/proc/' + str ( pid ) + '/fd/' if not os . path . exists ( tp ) : return connects for d in os . listdir ( tp ) : fname = tp + d if os . path . islink ( fname ) : l = os . readlink ( fname ) if l . find ( 'socket:' ) != - 1 : connects += 1 except : pass return connects