Phoronix Test Suite released

VirtualBox for OpenSolaris hosts available - FreeBSD soon?
The Linux hardware portal Phoronix released the first version of their new hardware benchmark suite “Phoronix Test Suite”. While the test suite is still in an early development state it already delivers promising results.

Benchmarking is always a bit tricky under Linux. While there are many well known and established Benchmark suites available for Windows, there are hardly any comparable solutions available for Linux. And no solution is really wide spread and accepted.

However, the well known Linux hardware page Phoronix tested and benchmarked hardware for years. And now the group behind the project decided to put all this experience together to build a real benchmark suite for Linux, the Phoronix Test Suite.

Currently, the test suite is in an early development state: there is no gui yet, the software is only available as a tar.gz file and the dependencies (on Fedora for example php-bcmath and php-cli) are not really documented. Additionally, the test suite downloads all necessary software for the tests and compiles the software itself locally. That means you do need quite some disk space (more than 1.5 GB) even if some of the software (like the game Nexuiz, mplayer or lame) is already installed. This is unfortunately necessary because it is the only way to guarantee that the results are truly comparable, and that no compile flags or distribution specific patches taint them.

But despite these shortcomings the test suite is already usable and can deliver interesting results: this test shows the audio-encoding test I did with my current machine. As you can see, there are not only the benchmark data themselves, but also the data of my machine. (And yes, this is a slow machine, and yes, I want to have a new one ;) ). The suite does not only benchmark the audio encoding speed, but also compilation speed and the graphics power. All different tests can be run independend from each other or combined. A full test (“universe”) is shown here.

It can be expeceted that future versions of the test suite will include more tests and more information about the tested system. For example, the universe test shown above does not include ethernet tests or information about the used graphics drivers. But this is likely just a question of time.

Short Tip: A simple udev rule for burn rights on /dev/sg*

shell.png
udev is a very helpful tool to manage your device lists and rights on your Linux machine. With custom rules you can alter your system to do exactly what you want. A simple example which I recently needed is to change the group and the rights of a device. Let’s say you need to have write rights on the device /dev/sg*. These are not given usually under Fedora:


crw-------   1 root     root       21,   0  2. Apr 18:26 sg0
crw-------   1 root     root       21,   1  2. Apr 18:26 sg1

However, programs like Nero’s burning suite for Linux require these. So the best way is to change the group of the devices to disk and afterwards give the group write rights. In udev the best way is to create a custom rule file: /etc/udev/rules.d/55-disk-burning.rules.


# cat /etc/udev/rules.d/55-disk-burning.rules
BUS=="scsi", KERNEL=="sg[0-9]*", GROUP="disk", MODE="0660"

After a reboot the rights are as needed:


crw-rw----   1 root     disk       21,   0  2. Apr 18:26 sg0
crw-rw----   1 root     disk       21,   1  2. Apr 18:26 sg1

Of course this still requires the user to be a member of the disk group…

Short Tip: Create a “bash alias” with an argument

shell.png
I always check for changes in rpm files. Unfortunately, the command to do so needs some typing:


rpm -q --changelog PACKAGENAME|most

(Btw., most is a replacement for less). The best idea would be to have a bash/zsh/whatever alias with an argument. This is unfortunately difficult or even impossible, but it is quite easy to define a simple function:


rpmch () { rpm -q --changelog "$1"|most}

Copy that string to your .zshrc or .bashrc and you can easily query the changelog of rpm packages with the command


rpmch PACKAGENAME

This of course works for other commands as well.

Short Tip: replace characters in txt files with sed

shell.png
When working with txt files or with the shell in general it is sometimes necessary to replace certain chars in existing files. In that cases sed can come in handy:


sed -i 's/foo/bar/g' FILENAME

The -i option makes sure that the changes are saved in the new file - in case you are not sure that sed will work as you expect it you should use it without the option but provide an output filename. The s is for search, the foo is the pattern you are searching the file for, bar is the replacement string and the g flag makes sure that all hits on each line are replaced, not just the first one.
If you have to replace special characters like a dot or a comma, they have to be entered with a backslash to make clear that you mean the chars, not some control command:


sed -i 's/./,/g' *txt

Sed should be available on every standard installation of any distribution. At lesat on Fedora it is even required by core system parts like udev.

Short Tip: Mount directories via SSH

shell.png
Other computers are often accessed via ssh. That is very easy and comes along with a lot of possibilities. However, working on files which are saved on the server is not that simple all the time. KDE offers the fish:// KIO for these cases, but this just works for KDE apps, and has to be called for each app individually.

In such cases it makes more sense to actually mount the server directories locally: sshfs let you mount any given server directory locally. And since it works on top of FUSE it does not require root interaction at all (given that the local user is a member of the fuse group).

All you have to do is:


sshfs -o idmap=user 192.168.0.1:/data ~/sshDir

The idmap=user option translates the server side uid to the client side uid and is therefore an often used and also needed option to avoid permission problems.

Of course the given directories have to exist on the used machines. Also, as already mentioned, make sure that the user who tries to use sshfs is a member of the fuse group! Last but not least the server must have a running ssh server, and the program sshfs has to be installed on the client machine. On Fedora, the package is called fuse-sshfs and is part of the main repositories. I guess it is similar on the other, bigger distributions as well.

Since every sshfs directory is a regular fuse directory, the umount is done via:


fusermount -u ~/sshDir

This can even be embedded into /etc/fstab and also understands typical ssh configuration options like other ports or the very handy key authorization.