diff --git a/graph.py b/graph.py index 0fabccf..06cc40f 100644 --- a/graph.py +++ b/graph.py @@ -124,7 +124,7 @@ def plot_stacked(ylabel, title, session, column, tmpfs_color, other_cache_color, g('set style histogram rowstacked') g('set key reverse below Left width -25') g(f"plot '{session}.txt' using 1:($8 + ${column}):{column} title 'RAM' with boxes palette, \ - '' using 1:8 with boxes title 'tmpfs' lc rgb '{tmpfs_color}', \ + '' using 1:8 with boxes title 'Shared mem' lc rgb '{tmpfs_color}', \ '' using 1:($8 - $7) with boxes title 'Other cache (freed automatically)' lc rgb '{other_cache_color}'") g('unset key') # Read additional information from 'data.txt' comments diff --git a/watch.py b/watch.py index 861003d..09a95c0 100644 --- a/watch.py +++ b/watch.py @@ -214,8 +214,8 @@ def watch(session, fsdev, iface, tmpfs_color, other_cache_color): my_env = os.environ my_env["S_TIME_FORMAT"] = "ISO" - p = run_or_fail("sar", "-F", "-u", "-r", "-n", "DEV", "1", stdout=subprocess.PIPE, env=my_env) - p2 = run_or_fail("while true; do df -t tmpfs --output=used | awk '{sum+=$1} END {print sum}'; sleep 1; done", shell=True, stdout=subprocess.PIPE, env=my_env) + p = run_or_fail("sar", "-F", "-u", "-r", "ALL", "-n", "DEV", "1", stdout=subprocess.PIPE, env=my_env) + p2 = run_or_fail("while true; do cat /proc/meminfo | grep Shmem\: | awk '{print $2}'; sleep 1; done", shell=True, stdout=subprocess.PIPE, env=my_env) # subprocess for GPU data fetching in the background try: pgpu = subprocess.Popen(