On Wednesday, September 26, 2012, ISockGo wrote:
I will really appreciate if you can elaborate it little more, which API can give me CPU or memory usage at the run time. I have checked the runtime package, but didn't figure out a api, which can help me in this scenario.
Do you want CPU/memory usage for your program or the whole system?
For the first case, runtime (ReadMemStats for example) and possibly runtime/pprof
will help you.
For the latter case, you need to use OS-specific ways to get that info.