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
{
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 {
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