def METHOD_NAME(pgconn):
    # List client session with blocking informations.
    limit = int(request.query.get('limit', 300))
    query = QUERIES['activity-sessions'] + " LIMIT %d" % limit
    rows = []
    for row in pgconn.query(query):
        try:
            data = read_proc_info(row['pid'])
            row['cpu_time'] = sum((
                data['utime'],
                data['stime'],
                data['cutime'],
                data['cstime'],
            ))
            row['memory'] = data['VmRSS']
            row['proc_state'] = data['state']
            row['proc_read'] = data['read_bytes']
            row['proc_write'] = data['write_bytes']
        except OSError as e:
            logger.debug("Failed to read /proc/%s info: %s.", row['pid'], e)
            row.update(dict(
                cpu_time=None,
                memory=None,
                proc_read=None,
                proc_state=None,
                proc_write=None,
            ))
        rows.append(row)
    return dict(
        columns=SESSION_COLUMNS,
        rows=rows,
    )