当我做 free -m -s 1
它给出了这样的内容:
total used free shared buff/cache available
Mem: 3789 3022 347 90 419 377
Swap: 1023 1016 7
total used free shared buff/cache available
Mem: 3789 3022 347 90 419 377
Swap: 1023 1016 7
total used free shared buff/cache available
Mem: 3789 3022 347 90 419 377
Swap: 1023 1016 7
total used free shared buff/cache available
Mem: 3789 3022 347 90 419 377
Swap: 1023 1016 7
有没有一种方法可以只显示一组信息:
total used free shared buff/cache available
Mem: 3789 3022 347 90 419 377
Swap: 1023 1016 7
并要求free
我每1秒钟刷新一次这些信息?
watch -n 1 free -m
您可以watch
与其他命令(例如watch df -h
)一起使用。它做一件事并且做得很好。
请注意,如果您想观看复杂的命令,则需要正确引用它们:
watch 'df | grep tmpfs'
watch 'free; df'
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句