lib_net_stats module¶
Routines for network statistics.
-
lib_net_stats.
compute_txrx_bytes
(stats_values_init, stats_values_end, v=0, file_log=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]¶ Computing total traffic for ogging of network statistics.
- stats_values_init : list
- start times.
- stats_values_end : list
- end times.
- v
- verbose if 1 [unused]
- file_log
- handler for log file [unused].
- delta_stats
- stats_values_end - stats_values_start
-
lib_net_stats.
get_network_stats
(nodes_list, over_slurm=0, v=0, file_log=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]¶ Obtain network statistics from nodes.
- nodes_list : list of str
- nodes names.
- over_slurm : int
- used to select network interface.
- v : int
- verbose if 1.
- file_log : file handler
- handler to log file.
- stats_params
- list of paramters for each node.
- stats_values
- list of lists with values associted to stats_params.
- ping_times
- lists of lists with ping results among all pairs of nodes.
TO DO:Change over_slurm for explicit selection of the interface.
-
lib_net_stats.
print_network_stats
(nodes_list, stats_params, stats_values=[], stats_ping=[], title_stats='', v=0, file_log=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]¶ Write output for logging of network statistics.
nodes_list stats_params
list of paramters for each node.- stats_values
- list of lists with values associted to stats_params.
- stats_ping
- lists of lists with ping results among all pairs of nodes.
- title_stats
- str to be used in suffix of the title of the statistics.
- v
- verbose if 1.
- file_log
- handler to log file.