Skip to content

Instantly share code, notes, and snippets.

@johanburati
Created June 15, 2020 22:52
Show Gist options
  • Save johanburati/8688cf7359f32c9d2b2b3285b0a216e7 to your computer and use it in GitHub Desktop.
Save johanburati/8688cf7359f32c9d2b2b3285b0a216e7 to your computer and use it in GitHub Desktop.
StackOfAllProcess.sh
#!/bin/bash
echo "Protected disks"
/etc/vxagent/bin/inm_dmit --get_protected_volume_list
echo "Stats"
for dev in `/etc/vxagent/bin/inm_dmit --get_protected_volume_list`
do
echo $dev
echo "=============="
/etc/vxagent/bin/inm_dmit --get_volume_stat $dev
echo "----------end----------"
done
echo "Process list is as follows"
ps -ef
for pid in `ps -ef | awk '{print $2}'`
do
echo "PID: ${pid}"
echo "Comm: `cat /proc/${pid}/comm`"
echo "============Start================"
for tid in `ls /proc/${pid}/task`
do
echo "Tid: ${tid}"
cat /proc/${pid}/task/${tid}/stack
done
echo "------------End------------------"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment