KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.84k stars 454 forks source link

Disk usage is doubled on WSL #660

Closed Roguyt closed 4 years ago

Roguyt commented 4 years ago

I'm submitting a ... (check one with "x")

[x] bug report
[ ] new distro request

Bug report

▶ screenfetch -v
:: Finding distro...found as 'Debian 10'
:: Finding hostname and user...found as 'clmntw@CARBON-PAPILLON'
:: Finding kernel version...found as 'x86_64 Linux 4.4.0-18362-Microsoft'
:: Finding current uptime...found as '7m'
:: Finding current package count...found as '428'
:: Finding current shell...found as 'zsh 5.7.1'
:: Finding current resolution(s)...found as 'No X Server'
:: Finding desktop environment...found as 'Not Present'
:: Finding window manager...found as 'Not Found'
:: Finding window manager theme...found as 'Not Found'
:: Finding GTK2 theme...found as 'Not Found'
:: Finding GTK3 theme...found as ''
:: Finding icon theme...found as 'Not Found'
:: Finding user font...found as 'Not Found'
:: Finding current CPU...found as 'Intel Core i7-8565U @ 8x 1.992GHz'
:: Finding current disk usage...found as '285G / 1.9T (15%%)'
:: Finding current GPU...found as 'Not Found'
:: Finding current RAM usage...found as '6596MiB / 16156MiB'
         _,met$$$$$gg.           clmntw@CARBON-PAPILLON
      ,g$$$$$$$$$$$$$$$P.        OS: Debian 10 buster(on the Windows Subsystem for Linux)
    ,g$$P""       """Y$$.".      Kernel: x86_64 Linux 4.4.0-18362-Microsoft
   ,$$P'              `$$$.      Uptime: 7m
  ',$$P       ,ggs.     `$$b:    Packages: 428
  `d$$'     ,$P"'   .    $$$     Shell: zsh 5.7.1
   $$P      d$'     ,    $$P     Disk: 285G / 1.9T (15%)
   $$:      $$.   -    ,d$$'     CPU: Intel Core i7-8565U @ 8x 1.992GHz
   $$\;      Y$b._   _,d$P'      RAM: 6596MiB / 16156MiB
   Y$$.    `.`"Y$$$$P"'
   `$$b      "-.__
    `Y$$
     `Y$$.
       `$$b.
         `Y$$b.
            `"Y$b._
                `""""

Hello,

There is a bug currently when running screenfetch on a brand new Windows box using WSL. It's saying that my total disk size is around 2TB which is twice the real value. I think the issue is around the command use by screenfetch to actually get this value

▶ df -h -x aufs -x tmpfs -x overlay --total
Filesystem      Size  Used Avail Use% Mounted on
rootfs          953G  143G  811G  15% /
C:\             953G  143G  811G  15% /c
total           1.9T  285G  1.6T  15% -

It appears that the / and the /c (which is a symlink to the real windows partition) who are basically the same disk are posing a problem. A fix seems to be to add another filesystem to the excluded list of the df command

▶ df -h -x aufs -x tmpfs -x overlay -x drvfs --total
Filesystem      Size  Used Avail Use% Mounted on
rootfs          953G  143G  811G  15% /
total           953G  143G  811G  15% -

I'll submit a pull request to fix the issue on dev later today

Best regards