Linux Blog

Linux Performance Boosting – Graphics

Filed under: General Linux — TheLinuxBlog.com at 12:24 pm on Thursday, July 31, 2008

Is your Linux box chugging along? Does it take a while for web pages to load or to boot up? Does your screen lag when you scroll a web page?

Well my friends, you’ve come to the right place. The issue with your Linux box performing poorly could be a graphics issue. A lot of distributions do not install the correct graphics drivers by default. Yes, your graphical user interface might work, but without the correct Linux graphic drivers you will not get the performance that you should be getting.

Linux has a default video driver called VESA, most video cards work with this driver but perform poorly. The reason behind this is VESA uses the CPU to do graphics processing and does not rely on the video card for 3D acceleration. If you have a 3D accelerated video card (most ATI / NVIDIA’s I will not go into detail here) then you might be able to offload graphics processing from your CPU onto your GPU.

Here is how to test to see if your frames per second if you are using the VESA standard driver:

 

[owen@LinuxBlog ~]$ glxgears
2623 frames in 5.0 seconds = 524.096 FPS
1677 frames in 5.0 seconds = 334.784 FPS
1948 frames in 5.0 seconds = 389.488 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 19707 requests (19415 known processed) with 0 events remaining.

Now, the performance of this machine is quite good so the resulting frames per second (FPS) is not too shabby, but its not the best either. After installing the correct Linux video card driver for this Linux box lets take a look at what kind of performance I get:

[owen@LinuxBlog ~]$ glxgears
6179 frames in 5.0 seconds = 1235.749 FPS
6558 frames in 5.0 seconds = 1311.449 FPS
6489 frames in 5.0 seconds = 1295.583 FPS
XIO:  fatal IO error 22 (Invalid argument) on X server ":0.0"
after 39 requests (39 known processed) with 0 events remaining.

As you can see from the results the graphics driver make a huge difference in the number of FPS I can achieve, but this is not the only benefit from using the correct 3D accelerated driver. When the correct driver is installed, the graphics card does most of the work therefore freeing up the CPU do other tasks. Its a win-win situation, so get your graphics card set up properly today!

Upgrading Slackware to Current

Filed under: Linux Video Tutorials — TheLinuxBlog.com at 12:09 am on Tuesday, July 29, 2008

Hey there everyone!

I actually made this Linux video tutorial on how to upgrade Slackware to Current quite some time ago but forgot to post it. The sound quality of this video is not the best, so I’d adjust the volume if I were you.

Anyhow, here is the video:

on a side not there are more Linux Video Tutorials to come!

Automated scanning with the shell

Filed under: Shell Script Sundays — TheLinuxBlog.com at 9:25 am on Sunday, July 27, 2008

I recently needed to scan a lot of images on my desktop PC. Unfortunately I am not the owner of an automatic document feed printer, and if I were it wouldn’t have helped this time because the documents I needed to scan were not feed able. XSANE is a great way to scan documents visually in Linux. Its not the easiest to use, but it has plenty of options. Part of the SANE package is scanimage, scanimage can be used from the shell.

The first thing that I did was a few test images with scanimage. I quickly found out that scanimage outputs in pnm format, and at a high resolution if the correct options are used. Once I found out the good options for my scanner (scanimage –resolution 400 > file.pnm) I wrote a quick shell script to scan up to 1000 times or until I don’t give the script any input. To do this, I used a combination of snippets that can be found in this blog column.

Here is a direct link to the script, and the shell script source below

#!/bin/bash
for i in `seq 1 1000`; do
 
#get input line
read inputline;
 
if [ $inputline ]; then
 
#Process Scanned Image in BG
echo Scanning Pg$i;
scanimage --resolution 400 > Pg$i.pnm;
echo Next;
else
exit
fi
 
done;

To use it all I do is execute the script, and I get to scan up to 1000 documents providing I type something after it prompts “Next”, and then hit enter. Once I was done scanning, I just hit enter to stop the script execution and then moved on to manipulating the images with the shell.

Hope this shell script scanning script is useful, if it is then drop me a comment, or if you have any suggestions or it was not at all helpful still drop me a comment.

Yakuake – The Nifty Terminal

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 12:47 pm on Friday, July 25, 2008

Yakuake – “Pronunciation Key: yuh-kweyk”

Yakuake is a terminal emulator for KDE
“Why do we need another terminal emulator?”
I hear you ask.

Well, the Yakuake terminal emulator resembles the terminal from Quake (hence the name), except the only thing that gets owned when you run Yakuake is your to-do list.

Have you ever been fragged in Quake because you hit the Tilda key by accident?
Ever used this to your advantage while playing two player by pressing your opponents tilda key?

Have no idea what I’m talking about?
envision a terminal that magically pops up when you press a shortcut, hides when your not using it but retains the output / processes and does not show up in the task bar.

Sure there are old school ways of achieving the same thing, but Yakuake is convenient. It is based on Kommander so its highly configurable and customizable but it works right out of the package.

I use it on most of my machines and for quick tasks I find myself using a regular xterm less. If you want a quick easy access to a terminal I’d recommend trying Yakuake out, take a look at all of the keyboard shortcuts and see if there is any way you can make it work better for you.

I have my keyboard shortcuts set up so I can add new sessions, close sessions, rename sessions, move sessions and resize the terminal. It works great with the switch to session shortcuts that I also set up.

Its in the Fedora repositories, I’m sure its included in Debians 18,000 or so packages and probably Gentoo’s too, so give it a shot!

I’ll see what I can do about a video tutorial in the future to demonstrate the power of Yakuake.

The Open Source Community – Please wait a while…

Filed under: General Linux — TheLinuxBlog.com at 11:12 am on Thursday, July 24, 2008

Netbeans, Please wait a whileYou have to admire the open source community. With such a diverse group of people all kinds of things can happen. One thing that cracked me up today was the language used in the NetBeans project (see image.)

I’m a big fan of the project don’t get me wrong, I just thought it was funny. I actually have a personal encounter with something similar when I was the developing a project. I was coding some error handling procedures on a website where all invalid input (temporarily) got directed to an obnoxious error page that read “Error!” with a bright yellow background and black text. When a end user accidentally typed a url in wrong it created the error. Since this website was for a bunch of writers they didn’t like this too much, so they picked on me until it was fixed.

This is part of the problem with the open source community. When an application is created often not enough thought is put into the interface and terminology used or the thought process of the low tech end user. It is different when a company develops an application because they can spend money on designers, interface experts and writers. In the open source community there is a lack of resources and collaboration to make this happen.

Even with well established organizations like Tigris (subversion) cryptic messages that appear in certain products can be difficult to decipher for problems as simple as permissions issues.

I don’t think it is a good idea for every one to “wait a while” to solve this problem because its not going to fix its self. So in closing I propose the question:

“what can the open source community do to solve this problem?”

Please discus.

How a shell script made 1.5 million.

Filed under: General Linux — TheLinuxBlog.com at 6:26 pm on Tuesday, July 22, 2008

I was reading articles from one of my local libraries online resource of Linux Journals (they have every issue) and found an article on a comic book store (It can also be found here.) I  read the entire article and have to say that it was a good look back in history.

In regards to quick and dirty scripting not much has changed in the 14 years since this article was written. Any one can learn how to program or write a script. The owner of this business looked at the process and then looked at ways he could automate it. His method worked out well, when after 3 years his small shop grossed 1.5 million in sales.

I think it is quite amazing that a small comic book store was able to gross this amount in the first quarter only 3 years after opening. I wonder if this would have been achieved if the store had to purchase or pay a third party to develop software. It is fortunate that the writer of the article was interested in Linux and pursued scripting. Since this was written in 1994, he was in the right place at the right time. I am sure that if he expanded his system enough he could have possibly done automated phone sales, mail order and online sales. All with simple shell scripts.

If you get a chance try reading some of the old articles from LinuxJournal.com. I think I’m going to continue reading these old articles from the library since they have no ads. I find them very interesting and who knows maybe they will inspire me to do something.

VMWare: “Unable to build the vmnet module”

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 10:49 am on Monday, July 21, 2008

If you run into the following problem:

VMware Server is installed, but it has not been (correctly) configured
for the running kernel. To (re-)configure it, invoke the
following command: /usr/local/bin/vmware-config.pl.

and then try to issue the vmware-config.pl command and get something similar to the following:

/tmp/vmware-config1/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/vmware-config1/vmnet-only/bridge.c:949: error: implicit declaration of function ‘sock_valbool_flag’
make[2]: *** [/tmp/vmware-config1/vmnet-only/bridge.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.10-47.fc8-i686'
make: *** [vmnet.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmnet-only'
Unable to build the vmnet module.

Then try to use the VMWare any patch from: http://groups.google.com/group/vmkernelnewbies/files
I had used the patch before to get my VMWare Server up and running but did not realize that you had to use the patch after kernel upgrade or your VMWare server will no longer work.

Who knew?

Timing your reboots with Twitter support!

Filed under: Shell Script Sundays — TheLinuxBlog.com at 12:01 am on Sunday, July 20, 2008

Firstly, I’d like to start off by saying that all of the concepts in this post should have been covered in other posts, so I will not go into great detail on the specifics of this script. If you need to know more information about any of the commands, check the man page section at the bottom of this page, from the man pages will be examples of other posts covering similar topics.

The purpose of this script for me was to time my reboot times. It could be modified to log the time it takes to replace hardware or add memory, but thats another post. Since we are logging reboot times, we are (hopefully) dealing with small numbers and therefore don’t have to deal with formatting time (at least not for now.)

The script should work on multiple systems that have bash. There is nothing too special about it. It uses the reboot command so the user this is launched as will have to have access to that command. You put the script in the users bin directory and chmod it. The user must also have write access to this. Also, they must have write access to their home directory, but this should not be a problem for most. Line 8 of the script needs to be changed to the user you plan on running this as.

After that test that the timereboot command works by typing timereboot:

[owen@linuxblog ~]$ timereboot
Usage: /home/linuxblog/bin/timereboot {time|ttime|back}

Once that is done, thats a pretty good indication that the script is working. Next, I suggest commenting out the reboot command on line #25 if this is a critical mission and you don’t want to reboot multiple times to get it working. If not go ahead and try the time command. Once your system is back up and your logged in you type the “timereboot back” command, it will then tell you the time taken since your system was done.

Once you have verified that the time works, you can go ahead and add it to your bashrc to automatically perform the action once your logged in. All you need to do is add a line like this:

home/linuxblog/bin/timereboot back

Now, if you want you can try again and see the results automatically.

“Thats great, but how do I post it to twitter?”

Well, there is one last thing that you have to do to get your reboot time posted to twitter. Edit line 55 and change to your twitter username and password. Do the same thing as before to reboot, but use the ttime parameter to log to twitter.

This script, does not post to twitter that you are rebooting (although it could) nor does it format the time, but it works and should give you a starting point if you are interested in doing this. It doesn’t really serve a real purpose other than to inform people how quickly or how slow you reboot. Also, please note that this is not a start up time. This times from when you issue the command until you issue the back command, or log in using the .bashrc method.

If you have any questions about this script or any other idea’s let me know and I’ll be happy to help or implement them for fun.

And here is the Twitter reboot script

Linux Needs More Haters!

Filed under: General Linux — TheLinuxBlog.com at 1:54 pm on Friday, July 18, 2008

In response to Jeremy Allison from ZDNet’s Blogs who claims not to be a blogger! Sorry, I thought about saying I have a “column” too but it just doesn’t work when you have “blog” in your URL. But onto the main topic of this post: LinuxHater!

I’m read linuxhater and I’m still a luser. Linux is the operating system that people love to hate. If you haven’t ever read http://linuxhater.blogspot.com before I’d give it a look. Its a great read, and I don’t think that Linux users should take it to heart, I can understand that some people may get upset from the effort that they personally put into a project, but if your not willing to admit your flaws where is the room for growth?

To improve criticism is needed and the LinuxHater blog definitely has lots to say and doesn’t always go about discussing the issues in a dignified way, but if you read it in good fun its great!

A few things you may not know about YUM

Filed under: Linux Software — TheLinuxBlog.com at 3:14 pm on Tuesday, July 15, 2008

Yum stands for “YellowDog Updater Modified”

Yum is a standard way to update multiple distributions.

The openSUSE build repository uses the yum updating system

Yum was written in Python.

If you install the yum-utils package you can download yum rpm packages by running:

 yumdownloader --source yum

There are graphical front ends to YUM

Yum is maintained by the Linux@Duke project, thats right the basketball team you love to hate: The Blue Devils.

Command of the day: chvt

Filed under: Linux Software — TheLinuxBlog.com at 1:07 pm on Monday, July 14, 2008

Changing virtual terminals is almost essential for the Linux system administrator. If you don’t know what I mean by this then try pressing CTRL+ALT+F5 once you are there press CTRL+RIGHT ARROW until you get back to your display (should be two or so times depending on your distribution)

Until a few minutes ago I didn’t know that this could be done by the command line. chvt is a nifty command to change virtual terminal. Basically all you have to do is type “chvt 2” to change to tty2. I found it while I was looking for a solution to open up a view of other active terminals.

This could be handy if your on a laptop or your function keys are missing / broken.

Next Page »