FUNCTION::REMOTE_ID(3stap)

✨ NAME ✨

function::remote_id β€” the index of this instance in a remote execution πŸ’…


🌸 SYNOPSIS 🌸

remote_id:long()

πŸŽ€ ARGUMENTS πŸŽ€

None, bestie. Not a single one. She takes no args, she just knows 🫢


πŸ’– DESCRIPTION πŸ’–

okay so picture this: you got a whole swarm of script executions happening at once, all from one big stap --remote A --remote B ... situation, and you need to know which one is ME. That's literally what this function is for.

remote_id hands you back a number in the range 0..N β€” the unique index of this particular script execution among all of them. It's the exact same number that stap --remote-prefix would print, no cap. Same digits, same energy ✨

But listen, it's giving plot twist in two cases, and in BOTH of them she just returns -1:

  • the script was not launched with stap --remote 😭
  • the remote staprun/stapsh are older than version 1.7 πŸ’€
so if you get a -1, don't panic β€” it's not a bug, it just means one of those two things happened. periodt.

πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole page, you ate that πŸ“ stay iconic, mwah πŸ’œ

SystemTap Tapset Reference β€” Version of September 2026 πŸ¦‹βœ¨

πŸ“¦ where this page comes from