Skip to content

Commit

Permalink
chore(cmd): add proctree disable-procfs
Browse files Browse the repository at this point in the history
  • Loading branch information
geyslan committed Jan 22, 2025
1 parent aa98b6c commit c1dd27e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/docs/advanced/data-sources/builtin/process-tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Example:
--proctree thread-cache=16384 | will cache up to 16384 threads in the tree (LRU cache).
--proctree process-cache-ttl=60 | will set the process cache element TTL to 60 seconds.
--proctree thread-cache-ttl=60 | will set the thread cache element TTL to 60 seconds.
--proctree disable-procfs-query | Will disable procfs quering during runtime
--proctree disable-procfs | will disable procfs entirely.
--proctree disable-procfs-query | will disable procfs quering during runtime.

Use comma OR use the flag multiple times to choose multiple options:
--proctree source=A,process-cache=B,thread-cache=C
Expand Down
10 changes: 8 additions & 2 deletions pkg/cmd/flags/proctree.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Example:
both | process tree is built from both events and signals.
--proctree process-cache=8192 | will cache up to 8192 processes in the tree (LRU cache).
--proctree thread-cache=4096 | will cache up to 4096 threads in the tree (LRU cache).
--proctree disable-procfs-query | Will disable procfs queries during runtime
--proctree disable-procfs | will disable procfs entirely.
--proctree disable-procfs-query | will disable procfs quering during runtime.
Use comma OR use the flag multiple times to choose multiple options:
--proctree source=A,process-cache=B,thread-cache=C
Expand Down Expand Up @@ -93,7 +94,12 @@ func PrepareProcTree(cacheSlice []string) (proctree.ProcTreeConfig, error) {
cacheSet = true
continue
}
if strings.HasPrefix(value, "disable-procfs-query") {
if value == "disable-procfs" {
config.ProcfsInitialization = false
config.ProcfsQuerying = false
continue
}
if value == "disable-procfs-query" {
config.ProcfsQuerying = false
continue
}
Expand Down

0 comments on commit c1dd27e

Please sign in to comment.