How to monitor the performance of the model running on R Studio?

I want to know the resources occupied by the model or programming running on R Studio. (CPU、Memory etc.)
My Linux version is Red Hat 7.
Is there any tool or command can help me to do that?
Thank you!

There is the visual profiling tool, profvis