Products > Computers
how to check if root is rw mounted? GNU Linux, kernel >=v5
DiTBho:
--- Code: ---BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
TEST : Iterations/sec. : Old Index : New Index
: : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT : 86.325 : 2.21 : 0.73
STRING SORT : 7.2868 : 3.26 : 0.50
BITFIELD : 3.2679e+07 : 5.61 : 1.17
FP EMULATION : 7.1885 : 3.45 : 0.80
FOURIER : 4.5823 : 0.01 : 0.00
ASSIGNMENT : 1.4519 : 5.52 : 1.43
IDEA : 342.73 : 5.24 : 1.56
HUFFMAN : 13.21 : 0.37 : 0.12
NEURAL NET : 0.0052957 : 0.01 : 0.00
LU DECOMPOSITION : 0.12788 : 0.01 : 0.00
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX : 2.837
FLOATING-POINT INDEX: 0.007
Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU :
L2 Cache :
OS : Linux 6.2.0-rc2-rb532
C compiler : mipsel-unknown-linux-gnu-gcc
libc :
MEMORY INDEX : 0.946
INTEGER INDEX : 0.570
FLOATING-POINT INDEX: 0.004
Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.
--- End code ---
It doesn't have much validity as a benchmark.
But it gives you an idea more or less of what type of hardware you're working with.
brucehoult:
BYTEmark was well known, even in the 80s, as having several benchmarks that were not very suitable because a good compiler would either do a lot of the work at compile-time (e.g. in the case of BITFIELD merging loops to do things word at a time instead of bit at a time IIRC) or noticing that results were not used at all and simply deleting them.
DiTBho:
--- Quote from: brucehoult on January 10, 2025, 10:16:37 pm ---BYTEmark was well known, even in the 80s, as having several benchmarks that were not very suitable because a good compiler would either do a lot of the work at compile-time (e.g. in the case of BITFIELD merging loops to do things word at a time instead of bit at a time IIRC) or noticing that results were not used at all and simply deleting them.
--- End quote ---
I think it only makes sense comparing machines with the same toolchains, GNU/Linux { gcc, binutils }.
macboy:
If you want it to run even faster, don't make it a script, but a function within your shell. Then when you call it, you are not spawning a new process to execute a new shell to run the script. Your interactive shell just does the work itself. This will be faster.
You can put a function, or many of them, into a file (e.g. "myFunctions.sh") and source the file, which essentially executes all commands in the file. In bash, you source a file with the command "."
e.g.:
. myFunctions.sh
I do like MarkL's take on the problem, but if you are not a regex expert (a regexpert?) then it can be hard to follow. Here is what I had come up with:
--- Code: ---function do_fs_mode_get()
{
while read a b c d e f
do
if [ "$a" = "$1" ]
then
echo "FS: $a mode: ${d%%,*}"
return 0
fi
done < /proc/mounts
return 1
}
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version