dongzhoulong1797 2015-05-04 01:19
浏览 668
已采纳

如何在GO中获取总内存/ RAM?

How can I get the total amount of memory/RAM attached to a system in Go? I want to use native code only if possible. I have found a library that wraps linux sysinfo command. Is there a more elegant way?

  • 写回答

2条回答 默认 最新

  • doukong1901 2015-05-04 01:28
    关注

    Besides runtime.MemStats you can use gosigar to monitor system memory.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?