uthreads(8) System Manager's Manual uthreads(8)

# [NAME](#NAME)

uthreads, cthreads, javathreads - Trace thread creation events in Java or pthreads.

# [SYNOPSIS](#SYNOPSIS)

**cthreads \[-h] \[-v] pid** **javathreads \[-h] \[-v] pid** **uthreads \[-h] \[-l {c,java,none}] \[-v] pid**

# [DESCRIPTION](#DESCRIPTION)

This traces thread creation events in Java processes, or pthread creation events in any process. When a thread is created, its name or start address is printed.

Since this uses BPF, only the root user can use this tool.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-l {c,java,none}](#l)

The language to trace. C and none select tracing pthreads only, regardless of the runtime being traced.

[-v](#v)

Print the resulting BPF program, for debugging purposes.

[pid](#pid)

The process id to trace.

# [EXAMPLES](#EXAMPLES)

[Trace Java thread creations:](#Trace)

\# **uthreads -l java 148**

[Trace pthread creations:](#Trace~2)

\# **uthreads 1802**

# [FIELDS](#FIELDS)

[TIME](#TIME)

The event's time in seconds from the beginning of the trace.

[ID](#ID)

The thread's ID. The information in this column depends on the runtime.

[TYPE](#TYPE)

Event type -- thread start, stop, or pthread event.

[DESCRIPTION](#DESCRIPTION~2)

The thread's name or start address function name.

# [OVERHEAD](#OVERHEAD)

Thread start and stop events are usually not very frequent, which makes this tool's overhead negligible.

# [SOURCE](#SOURCE)

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion \_example.txt file containing example usage, output, and commentary for this tool.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Sasha Goldshtein

# [SEE ALSO](#SEE_ALSO)

[ustat(8)](/man/enterprise-packages/bcc/ustat.8), [trace(8)](/man/enterprise-packages/bcc/trace.8)

2018-10-09 USER COMMANDS

---

Document: uthreads(8) from bcc 0.37.0-r2 (Chainguard OS)
Source: https://github.com/iovisor/bcc
