Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block.String() output the not accurate cap info of the disk #285

Open
poetlife opened this issue Oct 22, 2021 · 1 comment
Open

block.String() output the not accurate cap info of the disk #285

poetlife opened this issue Oct 22, 2021 · 1 comment
Milestone

Comments

@poetlife
Copy link

Here is my code:

package main

import (
	"github.com/jaypipes/ghw"
	"log"
)

	log.Println(block.String())
	for i:=0; i<len(block.Disks);i++{
		log.Println("  ", block.Disks[i].String())
	}

then I got the output:

2021/10/23 00:57:27 block storage (2 disks, 2TB physical storage)
2021/10/23 00:57:27    \\.\PHYSICALDRIVE0 SSD (932GB) IDE [@unknown] vendor=(Standard disk drives) model=TOSHIBA DT01ACA100 serial=50IBH1ZMS
2021/10/23 00:57:27    \\.\PHYSICALDRIVE1 SSD (224GB) IDE [@unknown] vendor=(Standard disk drives) model=WDC WDS240G2G0B-00EPW0 serial=203227454509

Which mean I have 2 disks, and one is 932GB, another is 224GB, so WHY does the overall info show 2TB. Seems the accuracy is too low.

@ffromani
Copy link
Collaborator

Hi @poetlife ! the accuracy is indeed too low. It should be in GBs - not in TBs. On the bright side, only the string representation should have low accuracy. The data stored in block.Info should be accurate.

@ffromani ffromani added this to the v1.0.0 milestone Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants