Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Linux Kernel Debugging Tools

Up
vote
Down

Your Kernel just crashed or one of your drive is not working!! What do you do?

Well, this article gives an introduction to some kernel debugging tools for Linux. These tools makes the kernel internals more transparent. These tools help you to trace the kernel execution process and examine its memory and data structures.

The tools discussed here are :

1. Kernel debugger, kdb

2. Kernel GNU debugger, kgdb

3. GNU debugger, gdb

4. JTAG- based debuggers.

Of the mentioned tools, the kdb and kgdb were introduced as patches to the kernel code. The plain debugger gdb doesn’t need the patching process with kernel code. The JTAG (Joint Test Action Group) based debuggers are hardware assisted and powerful tools, but are expensive.

Here I will explain the installation and usage of the kdb tool. The rest of the tools are briefed. read more...
mail this link | permapage | score:9533 | -shyju, November 15, 2008

Unix signals list

Up
vote
Down

Processes are required to respond to signals sent to them. This is one way a user can communicate with signals and control them.
Signals are asynchronous events that can occur to a running process and may be caused by hardware, software or users. Signals are numeric integer messages that have been predefined so they understand what these signals mean. When a process receives a signal, that process must respond to the signal. Uncaught signals will cause default actions to take place, which often means the process is terminated. If you use “kill -l”, or “trap -l” you can get a list of available signals:
read more...
mail this link | permapage | score:9528 | -aweber, December 31, 2010

Scripting: Bash Array Tutorial

Up
vote
Down

An excellent introduction to bash arrays including 15 examples...
$ cat arraymanip.sh
#! /bin/bash
Unix[0]='Debian'
Unix[1]='Red hat'
Unix[2]='Ubuntu'
Unix[3]='Suse'

echo ${Unix[1]}

$./arraymanip.sh
Red hat
read more...
permapage | score:9522 | -Ray, June 7, 2010

Programming the Sony PS3 SPE cores under Linux

Up
vote
Down

Take even greater advantage of the synergistic processing elements (SPEs) of the Sony PS3 in this installment of Programming high-performance applications on the Cell BE processor. Part 2 looks in depth at the Cell Broadband Engine processor's SPEs and how they work at the lowest level, while Part 1 showed how to install Linux on the PS3 and explored a short example program. read more...
mail this link | permapage | score:9522 | -Ida Momtaheni, February 21, 2007

Build Apps with Android SDK, Eclipse, PhoneGap (Ubuntu 10.10)

Up
vote
Down

This tutorial describes how you can set up a development environment for building Android apps on an Ubuntu 10.10 desktop using Eclipse, the Android SDK, and PhoneGap. I will describe how to build Android apps from the command line with PhoneGap and from the GUI with Eclipse and PhoneGap and how to test them in an Android emulator and on a real Android device. PhoneGap allows you to develop your Android applications using web technologies such as HTML, CSS, and JavaScript (e.g. with JavaScript libraries such as jQuery/jQTouch), and it will turn these web apps into native Android apps (in fact, PhoneGap supports multiple platforms such as Android, iPhone, Palm, Windows Mobile, Symbian, so you can use the same sources to create apps for multiple platforms). read more...
mail this link | permapage | score:9516 | -falko, January 27, 2011

Tutorial: Build an Arduino laser game

Up
vote
Down

Arduino is an easy-to-use electronics platform. The entire platform, both the hardware and the software, is completely open source, and the language is loosely based on C/C++. Whether you're new to Arduino or a seasoned builder, this project has something for you. There's nothing quite as satisfying as creating an interactive physical object. Use this tutorial to create an interactive laser game called "'Duino tag," where players can play tag using devices built nearly from scratch. read more...
permapage | score:9493 | -solrac, February 2, 2009

Expect Script Examples

Up
vote
Down

Expressions, if statements, for loops, and while loops examples are covered in this mini-tutorial:
This article explains the following in the expect scripting language.
  • Expressions – arithmetic operation
  • if construct in expect
  • looping constructs
read more...
permapage | score:9485 | -Ray, January 21, 2011

Dojo for Java programmers

Up
vote
Down

Many developers have strong skills in Java programming, but only limited experience in JavaScript. They can struggle with the conceptual leap from a strongly typed, object-oriented compilation language to a dynamic, weakly typed scripting language. This article helps you bridge the gap from Java code to Dojo, shows why it may be necessary to set context, and describes how to go about it. read more...
permapage | score:9447 | -jmalasko, October 21, 2008

Debugging Shell Scripts

Up
vote
Down

Learning how to find the errors in your shell scripts is an important skill for successful shell scripting. The debug options in the Bash shell can help with that. read more...
permapage | score:9438 | -aweber, February 2, 2012

Forking vs. Threading

Up
vote
Down

What is Fork/Forking:
Fork is nothing but a new process that looks exactly like the old or the parent process but still it is a different process with different process ID and having it’s own memory. Parent process creates a separate address space for child. Both parent and child process possess the same code segment, but execute independently from each other.

What are Threads/Threading:
Threads are Light Weight Processes (LWPs). Traditionally, a thread is just a CPU (and some other minimal state) state with the process containing the remains (data, stack, I/O, signals). Threads require less overhead than “forking” or spawning a new process because the system does not initialize a new system virtual memory space and environment for the process. read more...
mail this link | permapage | score:9438 | -Napster, March 1, 2010

Space Tyrant Index Page: Linux game server development project

Up
vote
Down

This page links to the various articles that have been published about Space Tyrant, a multithreaded, network socket programming Linux game server project in C.

[Update: 07Jun2014 You can play a development version of an upcoming MMORPG in text mode at telnet://textMMOde.com:2323
or, on a command line, enter:
telnet textmmode.com 2323
to log in and play. This game is based on Space Tyrant and the scenario is based on a modified Starship Traders.]

[Update: 03Jun2014 Starshiptraders, the parent of Space Tyrant, and the descendant of Czarwars, Lives Again]

Read below for the history and overview or just click these links for the articles:Space Tyrant is a C language Linux game server development project. It started out in February, 2005 as a humble echo server with high ambitions. On March 18, ST had its design and intentions announced to the world.
Today we kick off a new multithreaded, network socket programming project which we will call Space Tyrant. Our mission is to write an open source, multiplayer, networked, strategy game in the C programming language. The goal of this project is to make a solid code base which implements a simple space trading game upon which other games can then be built. The game will be a subset of The Last Resort (TLR) that currently runs at Ioresort.com. This project will be a learning exercise for me as well as for any interested readers. The current state of the source code will be released with each article update.
Source code to ST, then just an echo server, was not released.

Then, on March 27, 2005, ST was promoted to a crude chatserver.
This is the first code release of Space Tyrant. This is an early stage of development and, at this point, only implements the listening thread, the two IO threads for each player connection, and a skeletal game logic thread that does little beyond proof-of-concept code.
Next, on May 30, 2005, ST started to resemble some sort of incomplete text game.
It’s now possible to connect to the game via telnet and to create an account, log in, and be issued a ship. Once you’re logged in, there is a universe to explore filled with ports for buying and selling goods and planets for scooping free goods. From those trading activities you can earn money, called microbots. Other than trading to earn more money, you only use your microbots to buy fighters -- which you can use to attack other players or the neutral fighters that guard some sectors.
As of this release, the source code was placed under the GPL, version 2.

On June 26, 2005, Space Tyrant was released with many shiny new abilities. Players can now deploy fighters to guard sectors, navigate with the aid of an autopilot, rank the various players in the universe, and sleep peacefully knowing their alternate universe is being backed up constantly by a sporty new backup thread. Yes, good times are surely upon us.
If you’re looking for a planet, type the ‘L’ command that you would normally use to land on a planet in your sector. In the absence of a planet, the L key will engage the autopilot which will search for the nearest planet and give you a ‘/’ command to autowarp to it.
There is normally a copy of the development version of the server running on my decTOP on port 23. To access it, type (or click, if it works for you) the following command:

(telnet to my ST server)

The current development version of the code is usually at http://librenix.com/st/st.c but the individual articles link to the specific versions discussed in each article.

You can mail me about the project at spacetyrant [at] librenix.com -- or you can just telnet into Space Tyrant, as listed above, and send me a radio message. I'm likely to get that faster. ;)


The Space Tyrant project has a new website, SpaceTyrant.com, where the latest source code is always available. Also, new articles about ST programming and about ST gameplay will be posted there as they come available.


Information on The Last Resort follows. TLR is one of the two games that Space Tyrant is intended to replace someday. Space Tyrant has a long way to go before it replicates TLR's 25,000 lines of C code. So far, it has reused only about 40 lines of TLR code, a handy 'bit-plane' sort dating back to 1998.

  • TLR Survival Manual
  • Is this game for you? read more...
  • mail this link | permapage | score:9426 | -Ray, June 25, 2005 (Updated: June 7, 2014)

    Vim Plugins: matchit.vim

    Up
    vote
    Down

    This is the third post in the article series "Vim Plugins You Should Know About". This time I am going to introduce you to a plugin called "matchit.vim".

    Matchit extends the existing functionality of “%” key (percent key). I'll first briefly remind you what the original “%” does and then explain how matchit.vim enhances it. read more...
    permapage | score:9413 | -pkrumins, February 6, 2009

    Vim plugins: snipmate.vim

    Up
    vote
    Down

    This article introduces the snipmate vim plugin.

    Snipmate.vim is probably the best snippets plugin for vim. A snippet is a piece of often-typed text or programming construct that you can insert into your document by using a trigger followed by a .

    For example, you type "for" and press TAB, and the plugin inserts "for (i = 0; i < n; i++) { }" in your code! read more...
    permapage | score:9412 | -pkrumins, August 10, 2009

    Pattern matching in shell scripting

    Up
    vote
    Down

    This article is excerpted from the book Beginning Portable Shell Scripting.
    Shell programming is heavily dependent on string processing. The term string is used generically to refer to any sequence of characters; typical examples of strings might be a line of input or a single argument to a command. Users enter responses to prompts, file names are generated, and commands produce output. Recurring throughout this is the need to determine whether a given string conforms to a given pattern; this process is called pattern matching. The shell has a fair amount of built-in pattern matching functionality.
    read more...
    mail this link | permapage | score:9410 | -Ray, January 1, 2009

    DWR Java Ajax: User Interface (pdf)

    Up
    vote
    Down

    Caution: this article is in PDF format. -Ed.

    In this article, the author of the book DWR Java Ajax Application shows how to develop samples based on DWR, which demonstrate how to dynamically change the common user interface elements such as tables, lists, and field completion. It also covers steps to make a dynamic user interface skeleton for these samples.

    The section on dynamic user interfaces shows how to get started with a DWR application, and it presents a user interface skeleton that will be used to hold the tables and lists sample, and the field completion sample.

    The article is divided into the following three sections:

    • Creating a Dynamic User Interface—starts with creating a web project and a basis for samples mentioned in this chapter
    • Implementing Tables and Lists—shows us how to use DWR with them
    • Implementing Field Completion—has a sample for typical field completion
    read more...
    mail this link | permapage | score:9391 | -Niraja Mulye, December 30, 2008

    Sed One-Liners Explained

    Up
    vote
    Down

    My previous post was about Awk One-Liners Explained and now I bring to you Sed One-Liners Explained!

    Most people are only familiar with one particular command of sed, namely the "s" (substitute) comand. s/comand/command/. That is unsatisfactory. Sed has at least 20 different commands for you.

    For example, any ideas what this sed one-liner does?

    sed '/n/!G;s/(.)(.*n)/&21/;//D;s/.//'

    Read the article to find it out! read more...
    permapage | score:9366 | -pkrumins, November 22, 2008

    Install FB4Linux in Eclipse

    Up
    vote
    Down

    Flash development in Linux is often left to a generic text editor used with the free Flex SDK. It is certainly possible to code this way, but you do lose out on a lot of the functionality of a more specific IDE. The FB4Linux project provides a plugin for Eclipse that provides a similar environment to FlashBuilder 4. The only downside is that the installation instructions gloss over a few of the details required to get the plugin installed in Eclipse 3.5.2, which is the version of Eclipse that is available in the Ubuntu software repositories at the time of writing. This article shows you how to get FB4Linux up and running from start to finish. read more...
    mail this link | permapage | score:9355 | -mcasperson, July 27, 2010

    Tutorial: Linux Dialog Boxes

    Up
    vote
    Down

    Dialog lets you create dialog boxes from Unix/Linux shell scripts...
    'dialog' is a utility for building console-based 'front ends' in UNIX like operating systems.

    In this brief tutorial I am mentioning the usage of few important basic controls available with this 'dialog' utility and later I have created a very simple front end application in UNIX bash scripting using dialog.
    read more...
    permapage | score:9334 | -Ray, January 1, 2010

    Tutorial: UDP socket based client server C programs

    Up
    vote
    Down

    This short and sweet tutorial has the example C source code for both a UDP client and server.
    This article explains how to write a simple UDP client/server system in C for the Linux or Unix platform. Writing client-server applications using UDP sockets is considered very easy, yet we sometimes miss some essential steps, which results in spending more time in intense debugging sessions. I went through one such experience. It is quite hard to remember all the socket API details quickly without having to wade through tons of man pages, so this page lists the standard code for UDP Client Server program. I hope it will be useful for others, too.
    [The original article has gone offline and the link has been replaced by a working page. -Ed.] read more...
    mail this link | permapage | score:9310 | -Ray, February 23, 2004 (Updated: August 24, 2008)

    Online Ruby Interpreter

    Up
    vote
    Down

    Try Ruby online with this online tutorial / interpreter. It runs in your browser.
    Ruby is a programming language from Japan (available at ruby-lang.org) which is revolutionizing the web. The beauty of Ruby is found in its balance between simplicity and power.

    Try out Ruby code at the prompt above. In addition to Ruby's builtin methods, the following commands are available:
    read more...
    permapage | score:9307 | -Ray, November 30, 2005
    More coding articles...
    Abstract Art Prints by Ray Yeargin

    coding headlines

    The life cycle of a programmer

    Tutorial: Android development environment on Fedora 14

    Space Tyrant: A threaded game server project in C

    perl dispatch table examples

    More CommandLineFu One-Liners Explained

    JSEclipse Tutorial: A JavaScript Eclipse Tool

    Space Tyrant: Multithreading lessons learned on SMP hardware

    Tutorial: Creating graphics with PHP

    Scripting: Put a clock in your bash terminal

    The Real Microsoft Monopoly

    Mono-culture and the .NETwork effect

    Why Programmers are not Software Engineers

    Space Tyrant: A multiplayer network game for Linux

    Space Tyrant: A threaded C game project: First Code

    I wrote my first programming e-book: Awk One-Liners Explained

    Why software sucks

    Programming Language Tradeoffs: 3GL vs 4GL

    C Source Code Example: Multithreaded RPC Server

    String matching in regular expressions

    Tutorial: Write a PHP wiki

    Vim Plugins: ragtag.vim

    Introduction to Java programming

    Eclipse: Use gdb from CDT

    Awk Tips, Tricks and Pitfalls

    A multithreaded web server for Linux (source code)

    Python for Kids

    Import XML into OpenOffice Calc with XSLT

    Ajax tricks: Lightbox, fader, etc

    PowerPC assembly language

    Java J2EE Tutorial: Secret Santa Web Application

    Bash Functions

    Quick and Dirty Vimdiff Tutorial

    Compile Crystal Space in Ubuntu 10.04

    Review: DevelopGo: A Linux Live CD for Programmers

    Scripting: Bash floating point

    Beginner and Intermediate / Advanced SQL Tutorials

    Install WebSphere MQ on Linux

    Linux Debugging Tools for C

    Scripts for custom Linux distributions

    Tutorial: Install the Aptana AJAX IDE on Ubuntu

     

    Firefox sidebar

    Site map

    Site info

    News feed

    Features

    Login
    (to post)

    Search

     
    Articles are owned by their authors.   © 2000-2012 Ray Yeargin