Every things is covered in this article,
https://devopsden.io/article/how-to-check-processes-running-on-ec2