mbox series

[0/3] improvements for telemetry script

Message ID 20210913105137.130097-1-bruce.richardson@intel.com (mailing list archive)
Headers
Series improvements for telemetry script |

Message

Bruce Richardson Sept. 13, 2021, 10:51 a.m. UTC
  Patch 1 fixes errors reported by flake8 in the telemetry python script.
Inspired by the work by Dave Hunt [1] the final two patches look to adjust the
script so that it works nicer when commands come from an input pipe rather than
from an interactive terminal.

Without this set:
  $ echo "/eal/params" | ./usertools/dpdk-telemetry.py
  Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
  {"version": "DPDK 21.11.0-rc0", "pid": 130033, "max_output_len": 16384}
  Connected to application: "dpdk-test"
  --> {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]}
  --> Traceback (most recent call last):
    File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 109, in <module>
      handle_socket(os.path.join(rdir, 'dpdk_telemetry.{}'.format(TELEMETRY_VERSION)))
    File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 78, in handle_socket
      text = input('--> ').strip()
  EOFError: EOF when reading a line

With this patchset:
  $ echo "/eal/params" | ./usertools/dpdk-telemetry.py
  {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]}


[1] http://patches.dpdk.org/project/dpdk/patch/20210909155625.24581-1-david.hunt@intel.com/

Bruce Richardson (3):
  usertools/dpdk-telemetry: fix flake8 errors
  usertools/dpdk_telemetry: fix handling EOF for input pipe
  usertools/dpdk-telemetry: silence prompts for input pipes

 usertools/dpdk-telemetry.py | 38 ++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

--
2.30.2
  

Comments

Power, Ciara Sept. 15, 2021, 10:46 a.m. UTC | #1
Hi Bruce,

>-----Original Message-----
>From: Richardson, Bruce <bruce.richardson@intel.com>
>Sent: Monday 13 September 2021 11:52
>To: dev@dpdk.org
>Cc: Power, Ciara <ciara.power@intel.com>; Hunt, David
><david.hunt@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>
>Subject: [PATCH 0/3] improvements for telemetry script
>
>Patch 1 fixes errors reported by flake8 in the telemetry python script.
>Inspired by the work by Dave Hunt [1] the final two patches look to adjust the
>script so that it works nicer when commands come from an input pipe rather
>than from an interactive terminal.
>
>Without this set:
>  $ echo "/eal/params" | ./usertools/dpdk-telemetry.py
>  Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
>  {"version": "DPDK 21.11.0-rc0", "pid": 130033, "max_output_len": 16384}
>  Connected to application: "dpdk-test"
>  --> {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]}
>  --> Traceback (most recent call last):
>    File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 109, in
><module>
>      handle_socket(os.path.join(rdir,
>'dpdk_telemetry.{}'.format(TELEMETRY_VERSION)))
>    File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 78, in
>handle_socket
>      text = input('--> ').strip()
>  EOFError: EOF when reading a line
>
>With this patchset:
>  $ echo "/eal/params" | ./usertools/dpdk-telemetry.py
>  {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]}
>
>
>[1] http://patches.dpdk.org/project/dpdk/patch/20210909155625.24581-1-
>david.hunt@intel.com/
>
>Bruce Richardson (3):
>  usertools/dpdk-telemetry: fix flake8 errors
>  usertools/dpdk_telemetry: fix handling EOF for input pipe
>  usertools/dpdk-telemetry: silence prompts for input pipes
>
> usertools/dpdk-telemetry.py | 38 ++++++++++++++++++++++---------------
> 1 file changed, 23 insertions(+), 15 deletions(-)
>
>--
>2.30.2

For the series,
Acked-by: Ciara Power <ciara.power@intel.com>

Thanks!
  
Thomas Monjalon Oct. 1, 2021, 3:34 p.m. UTC | #2
> >Patch 1 fixes errors reported by flake8 in the telemetry python script.
> >Inspired by the work by Dave Hunt [1] the final two patches look to adjust the
> >script so that it works nicer when commands come from an input pipe rather
> >than from an interactive terminal.
> >
> >Without this set:
> >  $ echo "/eal/params" | ./usertools/dpdk-telemetry.py
> >  Connecting to /var/run/dpdk/rte/dpdk_telemetry.v2
> >  {"version": "DPDK 21.11.0-rc0", "pid": 130033, "max_output_len": 16384}
> >  Connected to application: "dpdk-test"
> >  --> {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]}
> >  --> Traceback (most recent call last):
> >    File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 109, in
> ><module>
> >      handle_socket(os.path.join(rdir,
> >'dpdk_telemetry.{}'.format(TELEMETRY_VERSION)))
> >    File "/home/bruce/dpdk.org/./usertools/dpdk-telemetry.py", line 78, in
> >handle_socket
> >      text = input('--> ').strip()
> >  EOFError: EOF when reading a line
> >
> >With this patchset:
> >  $ echo "/eal/params" | ./usertools/dpdk-telemetry.py
> >  {"/eal/params": ["./build/app/test/dpdk-test", "-c", "F", "--no-huge"]}
> >
> >
> >[1] http://patches.dpdk.org/project/dpdk/patch/20210909155625.24581-1-
> >david.hunt@intel.com/
> >
> >Bruce Richardson (3):
> >  usertools/dpdk-telemetry: fix flake8 errors
> >  usertools/dpdk_telemetry: fix handling EOF for input pipe
> >  usertools/dpdk-telemetry: silence prompts for input pipes
> 
> For the series,
> Acked-by: Ciara Power <ciara.power@intel.com>

Applied, thanks.