# Record some 10 seconds of backtraces on all your CPUs
perf record -g -a sleep 10
 
# file perf.data will be created, analyze it:
perf report

Online, live monitoring

perf top