I use below command to show memory and cpu usage on MacOS but it shows in G not byte. How can I make it show byte in the output?

$ top -l 1 -n 0
Processes: 432 total, 2 running, 430 sleeping, 2306 threads 
2018/01/16 11:23:44
Load Avg: 2.54, 4.00, 5.70 
CPU usage: 6.58% user, 10.63% sys, 82.78% idle 
SharedLibs: 193M resident, 55M data, 24M linkedit.
MemRegions: 166609 total, 6388M resident, 85M private, 1820M shared.
PhysMem: 15G used (3079M wired), 593M unused.
VM: 3253G vsize, 1098M framework vsize, 10135734(0) swapins, 11401593(0) swapouts.
Networks: packets: 3462765/3440M in, 2340820/1677M out.
Disks: 6698979/126G read, 3697913/112G written.

1 Answer 1


Any command you enter in Terminal.app provides help with the "man" command. For a list of the options on "top" you would type in:

man top

I had a quick look through the options and I did not see anything that allowed you to change the displayed memory units. Perhaps if you had a closer look?

Wondering if there is a way to feed the output through something else that would convert to bytes. Possible but that is beyond my meagre CLI skills...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .