top tips!

# top -b -n 1 | grep Mem
Mem: 1016656k total, 941892k used, 74764k free, 164588k buffers

# top -b -n 1 | grep Cpu
Cpu(s): 0.3%us, 0.3%sy, 0.1%ni, 99.0%id, 0.1%wa, 0.1%hi, 0.2%si, 0.0%st

-b : Batch mode operation
Starts top in ‘Batch mode’, which could be useful for
sending output from top to other programs or to a file.
In this mode, top will not accept input and runs until the
iterations limit you’ve set with the ‘-n’ command-line
option or until killed.

Leave a Reply

Your email address will not be published. Required fields are marked *