uflow(8)
π uflow(8) β System Manager's Manual π
π NAME π
okay so this page is about uflow and its whole squad: javaflow, perlflow, phpflow, pythonflow, rubyflow, and tclflow π§. They all print a flow graph of method calls in high-level languages, so you can literally watch the program's methods hand off to each other β¨
πΈ SYNOPSIS πΈ
javaflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
perlflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
phpflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
pythonflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
rubyflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
tclflow [-h] [-M METHOD] [-C CLAZZ] [-v] pid
uflow [-h] [-M METHOD] [-C CLAZZ] [-v] [-l
{java,perl,php,python,ruby,tcl}] pid
π¦ DESCRIPTION π¦
okay so uflow traces method calls and prints them as a flow graph π
It's giving debugging superpowers, because you can follow the program's execution (the method flow) step by step π₯
this tool leans on USDT probes that are baked into a bunch of high-level languages, like Java, Perl, PHP, Python, Ruby, and Tcl π Your runtime has to be instrumented with these probes. Sometimes that means building from source with a USDT-specific flag, like --enable-dtrace or --with-dtrace π οΈ For Java processes you need the startup flag -XX:+ExtendedDTraceProbes. For PHP processes, the environment variable USE_ZEND_DTRACE must be set to 1. no cap, don't skip these π
β οΈ Since this uses BPF, only the root user can use this tool. Sorry bestie, no exceptions π
π§ REQUIREMENTS π§
CONFIG_BPF and bcc.
β¨ OPTIONS β¨
-M METHODβ literally only print method calls whose method name starts with this string π-C CLAZZβ only print method calls whose class name starts with this string. The class name depends a lot on the language, so it's a vibe check π«Ά For example, in Java you write classes likepackage/subpackage/ClassName.-vβ prints the resulting BPF program, for debugging purposes π{java,perl,php,python,ruby,tcl}β the language you want to trace πΈpidβ the process id you want to trace π―
π EXAMPLES π
okay so here's how you use it:
Follow method flow in a Ruby process:
# uflow ruby 148
Follow method flow in a Java process where the class name is java.lang.Thread:
# uflow -C java/lang/Thread java 1802
π FIELDS π
CPUβ the CPU number the method was invoked on. This is super handy for spotting where the output jumps to a different CPU πPIDβ the process id π·TIDβ the thread id π§΅TIMEβ how long the method call lasted β°METHODβ the method name π«
π OVERHEAD π
π¨ This tool has extremely high overhead because it prints every single method call. In some scenarios you might see lost samples in the output, since the tool can't keep up with the rate of data coming from the kernel. Filtering by class or method prefix can help cut down the amount of data printed, but the collection mechanism itself still has very high overhead. Do not use this for performance-sensitive production scenarios, and always test first π
π SOURCE π
this is from bcc π¦
https://github.com/iovisor/bcc
also look in the bcc distribution for a companion _example.txt file, which has example usage, output, and commentary for this tool π
π OS π
Linux π§
π STABILITY π
Unstable, still in development π§
π AUTHOR π
Sasha Goldshtein π«Ά
π SEE ALSO π
bestie, that's the whole page π It's from USER COMMANDS, dated 2018-10-09, and it's all about uflow(8) π§β¨ periodt π
π¦ where this page comes from
- debian bookworm: bpfcc-tools 0.26.0+ds-1 Β· Apache-2.0
- debian trixie: bpfcc-tools 0.31.0+ds-7 Β· Apache-2.0
- ubuntu jammy: bpfcc-tools 0.18.0+ds-2 Β· Apache-2.0
- ubuntu noble: bpfcc-tools 0.29.1+ds-1ubuntu7 Β· Apache-2.0
- ubuntu questing: bpfcc-tools 0.31.0+ds-7ubuntu2 Β· Apache-2.0
- ubuntu resolute: bpfcc-tools 0.35.0+ds-1ubuntu2 Β· Apache-2.0
- ubuntu stonking: bpfcc-tools 0.35.0+ds-1ubuntu4 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms