2
2
# -*- coding: utf-8 -*-
3
3
# pylint: disable-msg=C0103
4
4
# pylint: disable-msg=C0301
5
- """
6
- View the status of a given xengine.
7
5
8
- Created on Fri Jan 3 10:40:53 2014
9
-
10
- @author: paulp
11
- """
12
6
import sys
13
7
import time
14
8
import argparse
53
47
except AttributeError :
54
48
raise RuntimeError ('No such log level: %s' % log_level )
55
49
# import logging
56
- # logging.basicConfig(filename='/tmp/casperfpga_tengbe_status_curses.log', level=logging.DEBUG)
50
+ # logging.basicConfig(filename='/tmp/casperfpga_tengbe_status_curses.log',
51
+ # level=logging.DEBUG)
57
52
# logging.info('****************************************************')
58
53
59
54
if args .comms == 'katcp' :
75
70
utils .threaded_fpga_function (fpgas , 10 , 'test_connection' )
76
71
utils .threaded_fpga_function (fpgas , 15 , 'get_system_information' )
77
72
for fpga in fpgas :
78
- numgbes = len (fpga .tengbes )
73
+ numgbes = len (fpga .gbes )
79
74
if numgbes < 1 :
80
75
raise RuntimeWarning ('Host %s has no 10gbe cores' , fpga .host )
81
76
print '%s: found %i 10gbe core%s.' % (
@@ -100,7 +95,7 @@ def get_gbe_data(fpga):
100
95
Get 10gbe data counters from the fpga.
101
96
"""
102
97
returndata = {}
103
- for gbecore in fpga .tengbes :
98
+ for gbecore in fpga .gbes :
104
99
ctr_data = gbecore .read_counters ()
105
100
for regname in ctr_data :
106
101
regdata = ctr_data [regname ]
@@ -118,8 +113,8 @@ def get_tap_data(fpga):
118
113
What it says on the tin.
119
114
"""
120
115
data = {}
121
- for gbecore in fpga .tengbes .names ():
122
- data [gbecore ] = fpga .tengbes [gbecore ].tap_info ()
116
+ for gbecore in fpga .gbes .names ():
117
+ data [gbecore ] = fpga .gbes [gbecore ].tap_info ()
123
118
return data
124
119
125
120
# get gbe and tap data
@@ -164,7 +159,7 @@ def exit_gracefully(sig, frame):
164
159
max_1st_col_offset = - 1
165
160
for fpga in fpgas :
166
161
max_1st_col_offset = max (max_1st_col_offset , len (fpga .host ))
167
- for gbe_name in fpga .tengbes .names ():
162
+ for gbe_name in fpga .gbes .names ():
168
163
max_1st_col_offset = max (max_1st_col_offset , len (gbe_name ))
169
164
max_fldname = - 1
170
165
for hdr in fpga_headers :
0 commit comments