Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

%CPU is displayed as integer.

Help
GHS
2008-01-15
2013-05-08
  • GHS
    GHS
    2008-01-15

    Hi,
      I'm having a problem with top running under RedHat Enterprise 4.6. The %CPU is displayed as an integer. Is there a way to make it display as a float (like it is in every other top display I've ever seen)?
    Thanks
    Glenn

     
    • Even under linux, top reports %cpu as a float.  I have just checked the latest release, 3.7beta3, on my ubuntu system and it is correctly reporting %cpu as a float to the hundredths of a percent.  If you are still having issues please report the version of top you are using (top -v).

       
      • GHS
        GHS
        2008-01-22

        Thanks for the reply. I get for top -v:
        top: procps version 3.2.3

        An example of the display is:
          PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
            2 root      RT   0    0   0:00.21  0.0     0    0    0 S migration/0

        Note that %CPU is an integer. In all other top's I've seen this  value would be 0.0 or perhaps 0.1 etc.
        This was made with the top supplied with RedHat Enterprise 4.6.

        Glenn

         
    • That's the top that is distributed with Linux and only runs on Linux.  That's not my code so I cannot comment.  I suggest you take it up with RedHat or whoever authored that particular utility.

       
      • GHS
        GHS
        2008-01-22

        Ok I'll do that. Thank you very much for your time.
        Glenn