lclarkmichalek / archey3

Simple python script to print the Archlinux logo with basic system information.
http://bluepeppers.github.com/archey3
Other
62 stars 27 forks source link

errors in calculating RAM #24

Closed graysky2 closed 9 years ago

graysky2 commented 10 years ago

Recently, free RAM shows up as a negative number.

archey3-0.5-2

               +                
               #                
              ###               
             #####              OS: Arch Linux x86_64
             ######             Hostname: ease
            ; #####;            Kernel Release: 3.17.2-1-custom
           +##.#####            Uptime: 0:01
          +##########           WM: Xfwm
         #############;         DE: Xfce
        ###############+        Packages: 748
       #######   #######        RAM: -31025 MB / 31737 MB
     .######;     ;###;`".      Root: 4.4G / 117G (3%) (ext4)
    .#######;     ;#####.       Boot: 42M / 477M (8%) (ext4)
    #########.   .########`     Data: 545G / 2.1T (25%) (ext4)
   ######'           '######    
  ;####                 ####;   
  ##'                     '##   
 #'                         `#  

squishy@ease ~ % free -m
              total        used        free      shared  buff/cache   available
Mem:          31737         362       30773         180         601       30982
Swap:             0           0           0
rski commented 10 years ago

free was updated, breaking the lines calculating free RAM. Since free now has a column for free memory anyway there is no reason to calculate it in archey. I'll submit a pull request fixing it

lclarkmichalek commented 10 years ago

Eugh yeah hmm yeah. Feel free to submit a PR (though I may seem inactive, I do follow the archey AUR thread), otherwise I'll take a look at it tomorrow (Don't have an arch install handy atm, and cba to find a docker image)

rski commented 10 years ago

Sorry - I was wrong It was just that free now already subtracts the buff/cache from the used column, so archey can now use directly the used column without any extra calculations

lclarkmichalek commented 10 years ago

Well if that fixes it, submit me a pull request and I'll be happy to merge :)

rski commented 10 years ago

there should be a pull request for this

Xiaoming94 commented 9 years ago

Bumping this, We are still waiting for a merge

lclarkmichalek commented 9 years ago

Merged, reopen if still broken