diff --git a/tests/import_export/ASCII/scripts/server_cpu_serial_port.py b/tests/import_export/ASCII/scripts/server_cpu_serial_port.py new file mode 100755 index 000000000..3c3a9da23 --- /dev/null +++ b/tests/import_export/ASCII/scripts/server_cpu_serial_port.py @@ -0,0 +1,14 @@ +#!/usr/bin/python + +import socket, psutil, os, pty, serial + +master, slave = pty.openpty() +s_name = os.ttyname(slave) +print 'serial port ' + s_name + +ser = serial.Serial(s_name) + +while True: + cpu_percent = str(psutil.cpu_percent(interval=0.5)) + ser.write(cpu_percent) + print 'written ' + cpu_percent