how to check memory occcupy rate by command?

thank you!

The command pidin mem should do it. If you want to do it programmaticaly get the source to pidin and check it out yourself.