Do not process collect data we do not use
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 24 Aug 2018 00:41:58 +0000 (20:41 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 24 Aug 2018 00:41:58 +0000 (20:41 -0400)
at least for now, since khatus_bar is now using a noticeable amount of CPU time
(~2-3%, up from ~0-0.7%)

Definitely need to be more-discriminate about who gets what data, instead of
forcing everyone to filter

bin/khatus_parse_ps
bin/khatus_sensor_procs

index 3b8417e..a0f41c5 100755 (executable)
@@ -8,15 +8,8 @@ BEGIN {
 {
     pid       = $1
     state     = $2
-    rss       = $3
-    command_i = index($0, $4)
-    command   = substr($0, command_i, length($0) - (command_i - 1))
-
     Pids[pid] = 1
     Total_Per_State[state]++
-    print("state"   Kfs pid, state)
-    print("rss"     Kfs pid, rss)
-    print("command" Kfs pid, command)
 }
 
 END {
index 7083d81..5a3c631 100755 (executable)
@@ -4,4 +4,4 @@ set -e
 
 dir_bin="$1"
 
-ps -eo pid,state,rss,command ww --no-headers | "$dir_bin"/khatus_parse_ps
+ps -eo pid,state ww --no-headers | "$dir_bin"/khatus_parse_ps
This page took 0.032125 seconds and 4 git commands to generate.