Skip to content

Commit

Permalink
#177 correct find command
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaguiar committed Mar 12, 2024
1 parent 2b4394e commit 1a39374
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ filesHash:
config/objects/nInput_IMMemory.js: 69f6e3d39aa5a75c83d2e4f8e2ece0b28df7e3f1
config/objects/nInput_Init.js: 9631c3e1fb87117000eb9da225ae760c9a4cd1a0
config/objects/nInput_JMX.js: fce9011c729efafd1abe79588a274ee36aac3c16
config/objects/nInput_JavaGC.js: 263b41d9e676566c60245345fc873c42167dc2a3
config/objects/nInput_JavaGC.js: 49acab1ac18ee25630e1845ee9d4f5a17b5767ef
config/objects/nInput_Kube_Events.js: 7a36aa2e72973d9369b856c6ef2ce4eddcab8459
config/objects/nInput_Kube_NodesMetrics.js: 1eb83e5f43535c9b688424a022c4bcb38fc791f3
config/objects/nInput_Kube_Pods.js: 3afb158052eb3eb1b9ffb70d68f0fa23c20b7c81
Expand Down
3 changes: 2 additions & 1 deletion config/objects/nInput_JavaGC.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ nInput_JavaGC.prototype.get = function(keyData, extra) {
newM.pod = r.metadata.name
newM.namespace = r.metadata.namespace
try {
var res = nattrmon.shExec("kube", newM).exec(["/bin/sh", "-c", "/bin/sh -c 'echo ${TMPDIR:-/tmp} && echo \"||\" && find ${TMPDIR:-/tmp} -perm -u+r -type f'"])
var res = nattrmon.shExec("kube", newM).exec(["/bin/sh", "-c", "/bin/sh -c 'echo ${TMPDIR:-/tmp} && echo \"||\" && find ${TMPDIR:-/tmp} -type f -exec test -r {} \\\; -print'"])
if (isDef(res.stdout)) {
var _tmp = String(res.stdout).split("||")
if (isUnDef(_tmp) || isUnDef(_tmp[1])) return
var lst = _tmp[1]
.split("\n")
.filter(l => l.indexOf(_tmp[0].replace(/\n/g, "") + "/hsperfdata_") == 0)
Expand Down

0 comments on commit 1a39374

Please sign in to comment.