Need Linux Code ( command ) to check the SATA cable data transmission speed

Hi,
Any one could help me to check the data transmission speed of the data,
Scenario: Jetson NANO + Carrier board ( Everfocus Make) and we have integrated the SATA cable via Carrier board to connect the HDD for video storage, Now we need Linux code to ensure and check how much data is transmitted via the connected SATA cable to HDD. this is required to measure periodically ther is no loss.
Thanks in Advance .

If a drive follows “S.M.A.R.T.”, and most SATA drives do, then you can get various reports from the drive itself. You might need to install first, “sudo apt-get install smartmontools”. Then, basic information, including link speed, is given with this (assuming “/dev/sda”, adjust for your case):
sudo smartctl -i /dev/sda

For a verbose listing you could run this (I’m piping to “less” since it is long):
sudo smartctl -x /dev/sda | less

If there have been other errors, then you might run “dmesg | egrep -i sda”.

Thank you very much , let me implement the above inputs and incase of any further support required , i will revert .

DATA TRANSMISSION SPEED TRIALS
Dear Friend ,
We have did the trials for the mesurement of the SATA - Data Transmission Speed and find the attached random results,
1.However all the results is showing as 3.0 Gb /sec in constant manner, we suspect that this is right or wrong since there is no any variation.
2.Could you guide us that how to execute this code ( SMART TOOL ) over Satellite ( GPS) or Remote host mode as we have to test the data transmission over remote access vis VMS media server Application.
Thanks in advance.
Regards,
Ramesh

3 Gb/s implies SATA 2 mode. SATA 3 would be 6 Gb/s. Those are link speeds, not necessarily actual throughput, but it is a good start.

So far as running this remotely, do you have ssh access? It is trivial to run this command via ssh. This is even more true if you set up private encryption keys to allow your host PC to simply “work” without passwords (and keys are more secure). I am not familiar with VMS media server application, perhaps you could describe what access you have, and if not ssh, then if there is a manual somewhere on setting up this server to run local shell commands.

Dear Friend,
Thanks for your Valuable Feedback,
However, we need to ensure whether the connected SATA cables are really delivering the 6 Gb/s and also try to transmit the data at maximum speed so that there will be not any packet loss.

We are working to connect with network mode using SSH and will share the results once completed at our end.

I won’t be able to tell you how to measure actual throughput, but if this were SATA III mode (the above is only SATA II mode), then 6 Gb/s is only theoretical. It might be possible to check some clock speed, whereby a maximum speed is known (but throttled back when heat is too high). Your true throughput will never be very close to 6 Gb/s (the link speed, not the disk speed) due to overhead, but the clock itself might be something you could determine.

Dear Friend ,
Thanks for your inputs,
Could you please advise how the clock speed is related with the measurement of Data transfer rate between the Main board and the HDD /SSD.

I do not know the answer to that. If the driver is to an NVIDIA device, then perhaps someone from NVIDIA would know. My guess is that the useful clock would be one which changes when heat goes up or down. However, if this is a generic SATA driver, and not part of NVIDIA-specific hardware, then even NVIDIA likely won’t know. There would be a chain of drivers and hardware related to this, and finding not the “goal” setting, but actual current running clock, would be more difficult to find. I just don’t know the answer to that.

Dear Friend,
Thanks for your detailed feedback.

Incidentally, although I do not have an answer, sometimes that information is reflected somewhere in “/sys” (which is a set of drivers pretending to be files and living in RAM). Often the “/sys” files are named after what they deal with. I don’t have any Jetsons with SATA devices on them, so I couldn’t try (the drivers would not be loaded and so the “/sys” files related to this would not exist), but if you first “sudo -s” (you need to be root for this), then try the following:

cd /sys
find . -iname '*sata*'

There might be a file you can see named after the clock, and “cat <filename>” might be a clue. Even if it isn’t exactly what you want, then the “/sys” file would be a strong clue as to the driver involved, and you might be able to look at the driver source code relative to what is putting out that “/sys” file.

Dear Friend ,

Thanks for your inputs, let me execute your above valid inputs and provide my feedback.

Best Regards,
Ramesh

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.