Obtaining resource within the app

Updated:Apr 12, 2022

Question

How can I obtain resource information within the app.


Answer

Please find your answer below.

 

  1. Use WebAPI(getAppResourceInfo) in loopback.

  2. Obtain from “/proc/[pid]/status” or “/proc/[pid]/statm”