How to get CPU %user %system in FreeBSD without using top?

5,718

iostat(8) shows CPU statistics:

   us      % of cpu time in user mode
   ni      % of cpu time in user mode running niced processes
   sy      % of cpu time in system mode
   in      % of cpu time in interrupt mode
   id      % of cpu time in idle mode
Share:
5,718

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    Is there any other FreeBSD command besides "top" which can be used to get the following values?

    CPU: % user, % nice, % system, % interrupt, % idle

    My problem to be specific is that these values do not get updated by just "top" but require "top -d 2" and this command does not work in the current framework I'm working with.

    • arrowd
      arrowd over 11 years
      The systat(1) command might be useful.
    • TOOGAM
      TOOGAM almost 7 years
      w shows some system stats. If you can't use parameters, consider running a script that can use the parameters.