Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Yet another new inxi feature: disk speeds!

Message
Author
User avatar
h2-1
Forum Regular
Forum Regular
Posts: 430
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#11 Post by h2-1 » Fri May 18, 2018 4:48 pm

the mmcblk and usb failures confirm that those aren't going to be happening at this point. I do believe I could generate a USB speed value, maybe, but it would be the usb bus speed, not the device speed, or rather, the device usb speed, like, 2, 3, and so on, which is already available in --usb so that's not super pressing.

mmcblk have almost no data, they also often fail for disk vendor, the only reason there for example is that I added the actual string AFGCE to sandisk ID. So that confirms that mmcblk isn't going to be happening for speed. I did look through an mmcblk system dataset to see if anything even remotely resembling speed data existed, and I could not find anything at all.

NVMe is the really hard one, since it has data, but that data has to be synthesized to produce a Gb/s speed rating for the entire set of lanes, and the overhead of the PCIe data transfers.
Last edited by h2-1 on Fri May 18, 2018 4:49 pm, edited 1 time in total.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
stsoh
Forum Regular
Forum Regular
Posts: 449
Joined: Sun Aug 20, 2017 10:11 am

Re: Yet another new inxi feature: disk speeds!

#12 Post by stsoh » Fri May 18, 2018 4:49 pm

ID-1 = ssd
ID-2/3 = hdd
should hdd have spin speed??
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 430
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#13 Post by h2-1 » Fri May 18, 2018 4:50 pm

I don't believe spin speed is available as data. Unless it's some code I don't know about.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
stsoh
Forum Regular
Forum Regular
Posts: 449
Joined: Sun Aug 20, 2017 10:11 am

Re: Yet another new inxi feature: disk speeds!

#14 Post by stsoh » Fri May 18, 2018 4:55 pm

check rotation rate.

Code: Select all

$ sudo smartctl -i /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.16.9] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     TOSHIBA Q300
Serial Number:    75.......RX
LU WWN Device Id: 5 00080d c0026e3c5
Firmware Version: SAFM11.2
User Capacity:    120,034,123,776 bytes [120 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat May 19 04:54:09 2018 +08
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

user@mx:~/Desktop
$ sudo smartctl -i /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.16.9] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" DT01ACA... Desktop HDD
Device Model:     TOSHIBA DT01ACA200
Serial Number:    Y7......AS
LU WWN Device Id: 5 000039 fd1c2c12c
Firmware Version: MX4OABB0
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat May 19 04:54:21 2018 +08
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

user@mx:~/Desktop
$ sudo smartctl -i /dev/sdc
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.16.9] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" DT01ACA... Desktop HDD
Device Model:     TOSHIBA DT01ACA200
Serial Number:    37........AS
LU WWN Device Id: 5 000039 fe5dfdcc2
Firmware Version: MX4OABB0
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat May 19 04:54:39 2018 +08
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 430
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#15 Post by h2-1 » Fri May 18, 2018 4:59 pm

I'm not using smartctl for this feature, I need to get rid of root/sudo requiring subshell commands in pinxi, and remove recommends/dependencies for features as much as possible (particularly when the tool would only be used for a single thing which is an extra data value already), those currently form the greatest bottlenecks in inxi. We are looking at creating Perl xs C modules for inxi, which could in theory be used to grab various bits of data without requiring extra programs, but that's a slow process, and I am not the one doing it since I don't do C. But it is being worked on slowly, I believe a raw replacement is almost running for the data from glxinfo for example.

I do wonder where smartctl gets the info from though.

Sometimes there are codes in values that can be translated to data, but it just depends on what /sys has in it.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 430
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#16 Post by h2-1 » Fri May 18, 2018 5:10 pm

Just as an aside, one of the reasons I need to start getting rid of these types of helper programs is that sometimes they are very slow, that's because for instance in the case of smartctl, it's primary purpose is to allow you to work with hard drives, and a completely secondary purpose is to issue a report on the drive. But to run the tool requires launching all of it, in this case, I timed it, with SSD root drive, the time to deliver the report is 0.230 seconds, which is really slow. I generally won't use tools that take more than 50 or so milliseconds, unless there is truly no other way to get the data, and the data matters a lot. lsusb is that way, it's really slow, but I currently have no other way to generate usb data, though i may make a way in Perl if I can.

Basically, if the single part of smartctl is sliced out, and turned into one feature of a system data perl xs C module, it will run almost instantly, I believe, though this all remains to be seen.

Just to compare, if you do: fdisk -l /dev/sda it takes on this system 8 milliseconds, which is why I use fdisk in disk scheme as a fallback tool.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 430
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#17 Post by h2-1 » Fri May 18, 2018 5:17 pm

I'd say this 'speed:' item is in general going to report the speed the thing is actually running at, not its designed speed. I see that on this board, for example, which is SATA 2, so a SATA 3 ssd reports at 3.0 Gb/s, aka, SATA 2.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
stsoh
Forum Regular
Forum Regular
Posts: 449
Joined: Sun Aug 20, 2017 10:11 am

Re: Yet another new inxi feature: disk speeds!

#18 Post by stsoh » Fri May 18, 2018 5:55 pm

i know tat u wanted to omitted sudo and data speed u are referring to, another example for rotational speed:

Code: Select all

user@mx:~/Desktop
$ sudo hdparm -I /dev/sda | grep Rotation
	Nominal Media Rotation Rate: Solid State Device
user@mx:~/Desktop
$ sudo hdparm -I /dev/sdb | grep Rotation
	Nominal Media Rotation Rate: 7200
user@mx:~/Desktop
$ sudo hdparm -I /dev/sdc | grep Rotation
	Nominal Media Rotation Rate: 7200
MX-17.1_x64 Horizon, G41M-P33 Combo (MS-7592), Pentium E5400 (2706 MHz), 8Gb RAM (984 MT/s),
Intel 4 Series Integrated Graphics, Realtek PCIe Fast RTL8101/2/6E, PCI Gigabit RTL8169 Ethernets.
Accepted Linux when i found MX-Linux in 2016.

User avatar
h2-1
Forum Regular
Forum Regular
Posts: 430
Joined: Sat Nov 15, 2008 3:16 pm

Re: Yet another new inxi feature: disk speeds!

#19 Post by h2-1 » Fri May 18, 2018 6:06 pm

hdparm is much faster. It's interesting when you actually run tests on the speed of various programs, some are incredibly well written highly optimized, and very fast, and others are slow, clunky, and probably not very well written internally.

that's in the ballpark for speeds. Neither hdparm or smartctl can be assumed to be present in user systems, but hdparm is at least fast.

Oddly, while testing that, I discovered that the test on ssd takes 0.21 seconds, and the test for spinning disk takes only 0.02 seconds, give or take.

However, the spinning speed isn't actually what the speed: item was about, but it is something I can add to the long term list of possible future features on github.

Running commands in subshells is one of the very worst things re speed you can do, that was part of the reason for rewriting pinxi into perl, among many others, that let me dump a lot of subshells, but the worst ones are when you have to start an entirely new program in a subshell, I believe these create kernel forks, which are extraordinarily expensive re execution time. So the first thing I do now when testing possible new commands to use is to test their raw execution speeds.

pinxi -v8, on this system, for example, takes about 2 seconds in total. If you added to that 3 rotating speed subshells, it would add roughly .3 seconds alone for that single item, that is, about 1/7 of the time it takes inxi to run EVERYTHING. That's why subshells are evil.
Last edited by h2-1 on Fri May 18, 2018 6:10 pm, edited 1 time in total.
smxi/sgfxi site (manuals, how-to's, faqs) :: script forums :: Check out inxi sys info script!

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2350
Joined: Wed Apr 11, 2018 5:09 pm

Re: Yet another new inxi feature: disk speeds!

#20 Post by fehlix » Fri May 18, 2018 6:07 pm

Amazing stuff!

Code: Select all

pinxi -Mdxxxzy80
Machine:
  Type: Desktop System: Gigabyte product: N/A v: N/A serial: <filter> Chassis: 
  type: 3 serial: <filter> 
  Mobo: Gigabyte model: Z77M-D3H v: x.x serial: <filter> 
  BIOS: American Megatrends v: F15a date: 12/31/2013 
Drives:
  HDD Total Size: 7.85 TiB used: 1.21 TiB (15.4%) 
  ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
  speed: 6.0 Gb/s serial: <filter> rev: 2B6Q scheme: GPT 
  ID-2: /dev/sdb vendor: Seagate model: ST4000DM005-2DP166 size: 3.64 TiB 
  speed: 6.0 Gb/s serial: <filter> rev: 0001 scheme: GPT 
  ID-3: /dev/sdc vendor: Seagate model: ST4000DM005-2DP166 size: 3.64 TiB 
  speed: 3.0 Gb/s serial: <filter> rev: 0001 scheme: GPT 
  ID-4: /dev/sde type: USB vendor: Generic model: Flash HS-MS SD 
  size: 59.5 MiB serial: <filter> rev: 5.14 scheme: MBR 
  ID-5: /dev/sdg type: USB vendor: SK Hynix model: HFS128G39TND-N210A 
  size: 119.24 GiB serial: <filter> scheme: MBR 
  Optical-1: /dev/sr0 vendor: Optiarc model: DVD RW AD-7260S rev: 1.03 
  dev-links: cdrom,cdrw,dvd,dvdrw 
  Features: speed: 48 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “antiX”