Skip to content

Instantly share code, notes, and snippets.

@ashishb888
Created October 26, 2020 08:04
Show Gist options
  • Save ashishb888/a20b0925b6191434d476b102af5cd216 to your computer and use it in GitHub Desktop.
Save ashishb888/a20b0925b6191434d476b102af5cd216 to your computer and use it in GitHub Desktop.
Java active threads for a process by using top command
#!/bin/bash
pid=$1
nohup top -Hb -p $pid > /var/tmp/top-$pid-`date +%FT%H-%M-%S`.log &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment