Da ich mir nun bald das CUDA-Framework näher anschauen werde, hier ein paar Tipps um das SDK mit den Codebeispielen compiliert zu bekommen:
Um generell unter Ubuntu kompilieren zu können, sollte das Paket build-essential installiert sein. Nach der Installation der Ubuntu-Nvidia-Grafiktreiber (sind bereits aktuell) und des CUDA-Toolkits und SDK’s von der CUDA-Seite, gab es bei mir ein paar Probleme beim kompilieren der SDK-Beispiele: read more »
Dieser Blog dient mir auch dazu, mir Sachen zu dokumentieren die ich schnell vergess.
Z.b. so etwas triviales wie ein Raid1-Array nach einem Ausfall (z.B. eine defekte Platte) wieder lauffähig bekommen: read more »
This howto is about installing and configuring Xen under the Linux distribution Debian Lenny. It also shows some simple steps to create and manage Xen-images.
Xen belongs to the group of paravirtualization, there an hypervisor (which runs on the host system) distributes cpu-cycles and other resources to virtual guest systems. The guest system will be directly executed on the CPU, with the exception of system calls, which are forwarded to the hypervisor. This works without special hardware extensions at an amazing performance, closely to native speed. The only drawback is that the host system must be patched in order to use the hypervisor instead of real syscalls. Special kernel-patches for Linux, FreeBSD, Solaris, and other free operating systems are already available. If you like to run Windows, which can’t be patched, you must stick with hardware-virtualization, a feature that Xen now also offers. read more »
OpenVZ ist einer der eher unbekannteren Virtualisierungslösungen. Vom Ansatz her arbeitet es ähnlich wie Linux-Vserver: Ein Kernel wird in virtuelle “Zonen” eigeteilt, die sich fast wie eigenständige Server verhalten. Durch diese Art der Virtualisierung kann nur Linux unter Linux virtualisiert werden, jedoch fast jede Distribution.
Da es sich um keine volle Virtualisierung handelt, wird der Speicher des Hostsystems optimal genutzt und die allgemeine Performance ist sehr gut, der Overhead kann praktisch vernachlässigt werden.
Für OpenVZ und gegen Linux-Vserver spricht aufjedenfall die einfache Handhabung und die schnelle Installation. Auch wenn ich Linux-Vserver nur kurz gesehen habe, scheint es mir wesentlich komplizierter. Außerdem hat OpenVZ ein sehr interessantes Feature: Der Netzwerkverkehr wird vollständig virtualisiert, eigene Firewallregeln (Iptables) sind möglich.
Hier ein kleines Howto um OpenVZ unter Debian Lenny einzurichten: read more »
One of the biggest drawbacks of GNU Screen is that you don’t see an overview of your virtual terminals in most standard configurations. But that can be easily changed. My screen now looks like this:
Screenshot of extented screen with taskbar
You can clearly see which programs are running and you have a good overview. The other goodies like cpu load display and the clock is also very practical.
The global configuration file /etc/screenrc already has some minor tweaks (Depending on your distribution). If you only want the taskbar for a particular user, than the local .screenrc in your home directory is the file to edit.
With “backtick” a command-directive (1 here - must be a number) is noted. The “0 0″ then means that whenever a new output from the program is produced, screen stores the last line of output. “Hardstatus” is for the taskbar and each % directive is for special purposes. With `% 1 for example the last line of the backtick command is printed. For all the other directives better read the GNU screen-manpage
This awk-oneliner uses the information from /proc/stat to calculate the cpuload for one second. That is supported on all unixes with proc support (Mac OS X has no proc).
What’s missing now, is dynamic window titles. In the previous configuration, all titles are set to “n * bash”, we had to change the titles manually.
With a special escape-sequence, the title can be set from the console. The screen manpage explains the procedure:
The default name for all shell windows can be set with the "shelltitle"
command in the .screenrc file, while all other windows are created with
a "screen" command and thus can have their name set with the -t option.
Interactively, there is the title-string escape-sequence
(kname\) and the “title” command (C-a A). The former can be
output from an application to control the window’s name under software
control, and the latter will prompt for a name when typed. You can
also bind pre-defined names to keys with the “title” command to set
things quickly without prompting.
Finally, screen has a shell-specific heuristic that is enabled by set-
ting the window’s name to “search|name” and arranging to have a null
title escape-sequence output as a part of your prompt. The search por-
tion specifies an end-of-prompt search string, while the name portion
specifies the default shell name for the window. If the name ends in a
‘:’ screen will add what it believes to be the current command running
in the window to the end of the window’s shell name (e.g. “name:cmd”).
Otherwise the current command name supersedes the shell name while it
is running.
Here’s how it works: you must modify your shell prompt to output a
null title-escape-sequence (k\) as a part of your prompt.
The last part of your prompt must be the same as the string you speci-
fied for the search portion of the title. Once this is set up, screen
will use the title-escape-sequence to clear the previous command name
and get ready for the next command. Then, when a newline is received
from the shell, a search is made for the end of the prompt. If found,
it will grab the first word after the matched string and use it as the
command name. If the command name begins with either ‘!’, ‘%’, or ‘^’
screen will use the first word on the following line (if found) in
preference to the just-found name. This helps csh users get better
command names when using job control or history recall commands.
My shellprompt looks like this:
server1 pastacode #
That means, all my commands are typed in after the #. So, I have to add this to my .shellrc :
#dynamic title
shelltitle '# |bash'
Screen now looks for a # when it gets the escape-sequence. “| Bash” means that the default title is “Bash”. We now only need the escape sequence in our promt; that can be customized (in Bash) with the PS1 variable. To do this we will either edit the /etc/bashrc (for any user) or the local .bashrc in our home directory. My .bashrc looks like this:
The PS1 is altered to add the screen escape-sequence, but only when we are in screen. In my file, you can actually choose between two versions: either the current path is the dynamic title, or the program name, although I prefer the latter. Unfortunately viewing both seems to be not a trivial thing.
So I hope the whole thing works for you - for suggestions, better ideas - write a comment!
Last but not least my complete .screenrc:
#no bells and startup messages
startup_message off
vbell off
#10000 lines scrollback buffer
defscrollback 10000
#no login
deflogin off
# Default shell
shell bash
#Timeout for displaying messages
msgwait 1
activity " Activity has appeared in window %n - %t"
Dieser Artikel ist für alle, die Screen noch nicht kennen. Auf manchen Distributionen ist es bereits vorinstalliert auf anderen muss es nachinstalliert werden. Das Paket heißt eigentlich immer ’screen’.
Screen ist im Prinzip ein Windowmanager Ersatz für die Konsole. Man kann so auf mehreren Shells arbeiten und zwischen Ihnen hin und her springen. Auch bietet sich screen an, um Standart-Programme im Hintergrund laufen zu lassen.
Php ist inzwischen überall… und hat sich zur Programmiersprache des dynamischen Webs etabliert. Aber was, wenn es zu langsam wird?
Sicher: es gibt den eaccelerator und noch andere Möglichkeiten PHP schneller zu machen. Im großen und ganzen mag ich PHP aber gar nicht so sehr, also begab ich mich auf die Suche nach Alternativen. Warum nicht C++? Es war etwas schwer an die richtigen Informatinen zu kommen und es existieren auch noch alte Informationen die C(++) in Zusammenhang mit dem in die Jahre gekommenen CGI verwenden. read more »