diff --git a/README.md b/README.md index b720886..692ac6d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a simple python tool that uses sysstat (sar) to plot cpu and ram usage. Best used with screen: -```console +``` $ screen -dmSL chart python sargraph.py $ sleep 1 $ screen -S chart -X stuff "label1\n" @@ -16,7 +16,7 @@ $ sleep 3 ``` Or just: -```console +``` $ python sargraph.py # wait 1 sec # type label1\n diff --git a/sargraph.py b/sargraph.py index 5cb57a6..378e52f 100755 --- a/sargraph.py +++ b/sargraph.py @@ -124,7 +124,7 @@ labels = [] f.write("# machine: %s, cpu count: %d\n" % (uname, cpus)) while 1: - rlist, _, _ = select([p.stdout, sys.stdin], [], [], 0.5) + rlist, _, _ = select([p.stdout, sys.stdin], [], [], 1) now = datetime.now() if sys.stdin in rlist: label_line = sys.stdin.readline().replace("\n", "")