Skip to content

Instantly share code, notes, and snippets.

View solveme's full-sized avatar

Ilya Korol solveme

  • GridGain
View GitHub Profile
@solveme
solveme / cpu_consumers.sh
Last active September 5, 2022 09:09
Print most CPU consuming threads in descending order for selected Java process (./cpu_consumers.sh | tee consumers.txt)
#!/bin/bash
function print_lwp_line() {
local pid="${1}"
local lwp="${2}"
local nlwp="${3}"
local ruser="${4}"
local pcpu="${5}"
local cputimes="${6}"