Command Line API

OS type and version Debian 12 x64
Webmin version 2.105
Virtualmin version 7.9.0
Related packages SUGGESTED

Hi, I am trying to figure out how to get the CPU percentage from the command line API and all that is returned is 5 numbers that add up to 100. I checked the documentation at info – Virtualmin, but that doesn’t explain what the numbers represent. I’d also like to know what the numbers represent for memory as well. Any help would be greatly appreciated. Thanks!

If you’re on the command line, you have direct access to the tools Virtualmin uses to gather data about the system, there’s no reason to get CPU usage data from Virtualmin.

I like top for realtime CPU (and memory, and process, etc.) info.

I suspect info is pulling the data from vmstat, and the numbers will be in labeled columns if you use vmstat.

Thank you, Joe! Running vmstat now clarifies what the numbers represent. I am working on a PHP script that gathers information about my server and info provides most of the information that I need, I just didn’t understand the CPU and memory information. Thanks again for your help! :grinning:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.