mixu / archey.js

Archey.js is a system information tool written in JS (based on Archey)
29 stars 10 forks source link

Replaced gb with GB. #9

Closed willeccles closed 8 years ago

willeccles commented 8 years ago

Since gb is a completely different unit from GB, I have changed it so that GB will show instead of gb for RAM and disk meters. NOTE: this has only been tested on windows and OS X.

On OS X, disk (not RAM) shows "G" instead of "GB." This can be fixed later.

This image shows that it works on windows.

working on windows

willeccles commented 8 years ago

After looking at this for a moment, I realized that my disk space seems to be wrong.

My main drive is a 128GB SSD, then I have a 1TB HDD, 500GB HDD, and 250GB HDD.

Not sure what is up with that, but 1513.91GB seems a bit wrong.

mixu commented 8 years ago

hmm archeyjs parses the result of wmic logicaldisk get DeviceId,FreeSpace,Size - could you run that and post the result here?

willeccles commented 8 years ago

@mixu just ran it on Windows. I am using Windows 10, in case the OS version comes up for some reason in the future.

PS C:\Users\will> wmic logicaldisk get DeviceId,FreeSpace,Size
DeviceID  FreeSpace     Size
C:        14313099264   125455822848
D:        266328870912  499896020992
E:        65359872      104853504
G:        166659182592  1000096624640
O:

Not sure what O: is, probably a system partition. Also, E: is a small system partition I can't get rid of, roughly 100MB in size I believe.

mixu commented 8 years ago

thanks! I think these are all fixed by upgrading bytes from ~0.2.1 to 2.x - including the gb vs GB thing. I just published 0.1.1, can you give it a try via npm install -g archey@0.1.1?

mixu commented 8 years ago

specifically: (1000096624640 + 104853504 + 499896020992 + 125455822848) = 1625553321984

on bytes 0.2.1: bytes(1625553321984) = '1513.91gb' on bytes 2.2.0: bytes(1625553321984) = '1.48TB'

willeccles commented 8 years ago

@mixu yep, all is well now, I think. I'll close the pull.

mixu commented 8 years ago

:+1: