Skip to content

Conversation

@Avinash1423
Copy link
Contributor

#87

Added a method getMotherBoardName and getInterfaceType methods in Util.java .
These methods are sensitive to platform.

Mother Board Name is displayed along w cpu info in title area
Interface Type is diplayed along with disk info

@Avinash1423
Copy link
Contributor Author

@jamesmarkchan pls take a look at the PR.


line=line.trim();

if(line.isEmpty()) { continue;}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor but if you could add spaces around the keywords like if to avoid others formatting your code and you don't loose the line authorship. same with the = assignment operator and before the {. :)


try {
if (App.os.startsWith("Windows")) {
process = new ProcessBuilder("wmic", "diskdrive", "get", "InterfaceType").start();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have three disk on my system and got this:

image

I think you'd need to get the drive letter to map a drive to it's interface. I wonder if we would be able to tell between scsi and m2 or scis and pcie4/pcie5. I have x3 gen 4 pcie m2 drives.


if(line.isEmpty()) { continue;}

if(line.equalsIgnoreCase("InterfaceType") || line.equalsIgnoreCase("TRAN")|| line.equalsIgnoreCase("NAME")) { continue;}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I've found helpful for code reviews and future maintenance is to show the normal output of the command being used in the java docs or comments. I'm definitely interested in collecting more information on the drives interface so happy to see you are looking at this. worth looking at disk-model.ps1 to see how the drive and target attribute column can be queried in order to create the mapping. might be able to do it with command line also. @jslcom might have thoughts on the linux solutions.


try {
if (App.os.startsWith("Windows")) {
process = new ProcessBuilder("wmic", "baseboard", "get", "Product").start();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i got this

image

} else if (App.os.contains("Linux")) {
process = new ProcessBuilder("cat", "/sys/devices/virtual/dmi/id/board_name").start();
} else if (App.os.startsWith("Mac OS")) {
process = new ProcessBuilder("system_profiler", "SPHardwareDataType").start();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i got this

image

} else if (App.os.contains("Linux")) {
process = new ProcessBuilder("lsblk", "-d", "-o", "tran").start();
} else if (App.os.startsWith("Mac OS")) {
process = new ProcessBuilder("diskutil", "info", "disk0").start();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what the output looks like, not sure I see the interface.

image

@jamesmarkchan
Copy link
Member

@Avinash1423 i'm not sure if the title and graph title are getting too cluttered but nice to explore making this info easily read. For certain we want this information stored as part of the benchmark and accessible to us and the user.

Screenshot From 2026-01-03 12-24-16

my thoughts to make look more consistent are:

  1. in the title replace the | with a -
  2. in the chart title sequence in info so the interface comes after the disk model and proceeds the partition symbol and is separated by dashes -.

Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
@Avinash1423 Avinash1423 force-pushed the interfaceAndMotherboard branch from 88d6f95 to d9dc368 Compare January 6, 2026 19:52
@Avinash1423
Copy link
Contributor Author

@jamesmarkchan i made some changes, please take a look.

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

Successfully merging this pull request may close these issues.

2 participants