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

Unix: Shell Script Wrapper Examples

Up
vote
Down

Shell script wrappers can make the *nix command more transparent to the user. The most common shell scripts are simple wrappers around third party or system binaries. A wrapper is nothing but a shell script that includes a system command or utility.

Linux and Unix like operating system can run both 32bit and 64bit specific versions of applications. You can write a wrapper script that can select and execute correct version on a 32bit or 64bit hardware platform. In cluster environment and High-Performance computing environment you may find 100s of wrapper scripts written in Perl, Shell, and Python to get cluster usage, setting up shared storage, submitting and managing jobs, backups, troubleshooting, invokes commands with specified arguments, sending stdout to stdout and stderr to stderr and much more.

In this post, I will explains how to create a shell wrapper to enhance the basic troubleshooting tool such as ping and host. read more...
mail this link | permapage | score:9656 | -nixcraft, June 24, 2012

Beginner Ubuntu Tips

Up
vote
Down

Twenty-five tips for Ubuntu beginners...
Adding another source for software is easy; once you've installed addrepo, you can do it in the terminal by typing something along the lines of addrepo deb http://mirror2.ubuntulinux.nl/ lucid-seveas all.

If you find new repositories online, they will usually give you the right details to enter. You could also do it graphically by going to 'System | Administration | Software Sources | Third Party Software | Add'. read more...
permapage | score:9302 | -Ray, November 9, 2010

Linux Iptables Examples

Up
vote
Down

Linux comes with a host based firewall called Netfilter. It is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack.

This Linux based firewall is controlled by the program called iptables to handles filtering for IPv4, and ip6tables handles filtering for IPv6. This tutorial list most common iptables solutions required by a new Linux user to secure his or her Linux operating system from intruders. read more...
mail this link | permapage | score:9297 | -nixcraft, December 14, 2011

Tutorial: Identify Linux bottlenecks with kSar

Up
vote
Down

The sar command collect, report, or save UNIX / Linux system activity information. It will save selected counters in the operating system to the /var/log/sa/sadd file. From the collected data, you get lots of information about your server such as:

1. CPU utilization
2. Memory paging and its utilization
3. Network I/O, and transfer statistics
4. Process creation activity
5. All block devices activity
6. Interrupts/sec etc.

sar output can be used for identifying server bottlenecks. However, analyzing information provided by sar can be difficult, so use kSar, which can take sar output and plot a nice easy to understand graph over period of time. read more...
mail this link | permapage | score:9253 | -nixcraft, December 16, 2009

Tutorial: RHEL 5.3 to 5.4 upgrade

Up
vote
Down

Red Hat Enterprise Linux v5.4 has been released and available via RHN for immediate update. The new version includes the kernel-based virtual machine (KVM) virtualization, next generation of developer features and tools including GCC 4.4, a new malloc(). Also included clustered, high-availability filesystem to support Microsoft Windows storage needs on Red Hat Enterprise Linux.

This tutorial explains how to upgrade RHEL v5.3 to RHEL v5.4. read more...
permapage | score:9150 | -nixcraft, September 3, 2009

PDFedit: A Linux PDF editor

Up
vote
Down

Adobe Acrobat is a commercial tool for manipulating PDF files. Earlier I was using CUPs - printing system, to export PDF files. Iíve also tried out gv for the same purpose. However, I needed complete editing of pdf documents. My search ended with PDFedit software, which is free and open source editor for manipulating PDF documents. The software available in both GUI and CLI (commandline) interface. read more...
permapage | score:9064 | -nixcraft, December 19, 2007

Install new skype in Ubuntu 12.04

Up
vote
Down

Skype is one of the best Video calling software,owned by Microsoft.Skype offer lot of features like Video call,Direct Phone call,Chatting and more.
Features: http://www.skype.com/intl/en/features/ read more...
permapage | score:8897 | -Linux Tips, April 6, 2012

Download: Linux 3D Client for Starship Traders

Up
vote
Down

[Note: Katrina Kirellii now maintains the Linux and Windows versions of the graphical client. The new code can be downloaded from this page.]

Linux game testers wanted

A new version of the Starship Traders multiplayer strategy game is under development. The new version, ST2, has a 3D interface and includes an X-Window-based client program. ST2 is considerably faster than its WWW predecessor and integrates a graphical display and point-and-click mouse controls with a complete keyboard interface. Linux users are needed to participate in the first test game since no other operating systems are yet supported.

The new server is up and running now and a Linux version of the client is available. The client is a dynamically linked Linux x86 binary and requires the Mesa3D or OpenGL libraries -- which should already be installed on most modern distros. Internet access is also required to play in the test game, of course.

To participate in the game you must download, gunzip, and run the Linux binary as described below. It should connect to the ST2 test game automatically and you will be prompted to log in.

[Here is a screenshot of a sector with a starbase, a planet, a tradingpost, some sector debris, a few fighters, a wormhole, and, if you look closely, a couple of small starships in the lower left quadrant intermixed with the text. This screenshot is with the window at 640x480. For a less cluttered appearance you can click resize -- while playing -- to expand (or shrink) the window.]

Download and setup instructions
  • Right click here
  • select Save ...
  • gunzip sst012.gz (your browser may do this step automatically)
  • chmod 555 sst012
  • ./sst012
... and you should be online.

The source code, released 17 September, 2001, can be downloaded from this page.

The Game

Starship Traders II is a trading and war game set in a universe divided into multiple galaxies. Individual locations within the game, called 'sectors', can contain ports, planets, nebulas, wormholes, and black holes, as well as objects owned by players. Players can park their starships, deploy their fighters, and build starbases in sectors.

Players can earn money ('microbots') by hauling commodities between ports and from planets. These microbots can be used as cash to buy equipment and military hardware at trading posts, or microbots can be used directly in combination with commodities to build fighters or starbases.

Players can deploy fighters and build starbases to guard prime trading territories and valuable sectors or they can use fighters to attack the deployed forces of other players. Players can also attack and destroy the starships of other players that they find.

Players can create teams which are ranked separately from the player standings. Players can apply to a team and the team captain can then either accept or reject the application. Team members can move safely through the fighter and starbase fortifications of their teammates and allied attack-mode starbases will not attack them.

Obviously, as in any multiplayer strategy game, politics and diplomacy can be important. Try to avoid making too many enemies early in the game!

Controls

F1 and F2 will scroll you back and forward in the scrolling portion of the heads-up display. F10, F11, and F12 will select different size windows. Running the client with a -w argument (eg.: sst012 -w) will cause it to load into a normal, resizeable window with the standard borders and window controls. Otherwise, it runs in a full-screen mode which may not include borders.

You can fly around within a sector using the arrow keys and pageup/pagedown. Don't do much of this or you may get lost. As you enter each new sector, you start out in the same relative position that you were in in the previous sector so it's possible to fly far away from the center of a sector and not easily find it again. If that happens, log out and back in to get back to the center of the sector.

Move the mouse over any clickable menu option (those that change color when the pointer is over them) and wait about 2 seconds for a popup tip about that menu item.

There is a log off (quit) command in the menu that logs you out, disconnects from the server, terminates the client, and closes the window. If you go link-dead while playing, however, or are otherwise left with an unresponsive client, press Escape to close the window and terminate the client.

Game play

Routine trading and galaxy exploration can be accomplished with as little effort as clicking Computrade on the heads-up display. You can also click on anything in the top half of the display to select that option. Note that options containing a capital letter can also be selected by pressing the appropriate key. Therefore, pressing the c key is equivalent to clicking Computrade.

Options without a capital letter generally have the hot key designated with parens. For example, "keyboard map (?)" can also be accessed by the '?' key.

Right click on any item in the top half of the heads-up display for a brief explanation of that menu option (and the corresponding keyboard key).

History

Starship Traders II is derived, through a long and meandering lineage, from The Last Resort, which evolved from Tsarwars, itself inspired by Czarwars. Czarwars was a DOS-based BBS game dating back to December, 1986. Czarwars was inspired by Chris Sherrick's version of Trade Wars, which drew it's inspiration from Hewlett-Packard's Star Trader, from The People's Book of Computer Games.

Changlog

5/22/01, v.0.02: Lockup after 5 minutes idle bug fixed
5/24/01, sst004: Menu items change color, Star clusters added
5/24/01, sst005: Popup tips added on clickable items
5/24/01, sst006: Rotating ports
5/26/01, sst007: Bigger, moving fighters, more popup tips
5/26/01, sst008: Moving ships, more popup tips
5/27/01, sst009: All heads-up display items now have popup tips
5/27/01, sst010: Bug fix: resizable window works again
5/29/01, sst011: Colors won't wash out on some displays, cursor added, in-sector movement speed scales better on high-speed displays, bar charts work correctly, bottom line of text doesn't disappear on some window sizes
5/31/01, sst012: minor popup documentation changes
5/12/02, sst012d: bug fix, new menu options added
mail this link | permapage | score:8788 | -Ray, May 12, 2002 (Updated: March 21, 2007)

Wake Linux with Cron

Up
vote
Down

Here's how to wake up your sleeping Linux system with a cron job...
Here's the latest in our new series on OS tips from power users: a seemingly trivial task. You have a computer, most likely a laptop, that you wish to keep suspended while you're not working. For example, let's say overnight. At the same time, you wish to run a handful of maintenance tasks, like backups and cleanup, which you don't normally do during the day. So you need a mechanism that will send your machine to sleep, wake it up when necessary, run cron jobs, then send it back to sleep again.
read more...
mail this link | permapage | score:8782 | -Ray, December 15, 2010

Install skype from repository in Ubuntu 12.04

Up
vote
Down

Since Ubuntu 10.04 (Lucid Lynx), Skype is part of the Canonical partner repository. To install Skype add the Canonical Partner Repository. It is highly recommended to use the package provided in the Canonical partner repository, not the one distributed from the skype website...

(here are some nicely precise prints) read more...
permapage | score:8782 | -Linux Tips, April 12, 2012 (Updated: April 24, 2012)

Install Skype in Ubuntu 11.04

Up
vote
Down

Skype hasnít been uploaded to the official partner repository of Ubuntu 11.04 Natty Narwhal. So for those who are trying out Natty out there will need to install Skype from their website. Below is the steps for that. read more...
permapage | score:8666 | -Linux Tips, January 11, 2011

Linux: Determine which process is using the CPU

Up
vote
Down

Whenever a Linux system CPU is occupied by a process, it is unavailable for processing other requests. Pending requests must wait till CPU is free. This becomes a bottleneck in the system. Following command will help you to identify CPU utilization, so that you can troubleshoot CPU related performance problems.

Finding Linux CPU utilization is one of the important tasks. Linux comes with various utilities to report CPU utilization. With these commands, you will be able to find out - CPU utilization, Display the utilization of each CPU individually (SMP cpu), Find out your systemís average CPU utilization since the last reboot, Determine which process is eating the CPU(s) etc. read more...
mail this link | permapage | score:8612 | -nixcraft, January 14, 2007

iozone Tutorial: Measure Linux Filesystem I/O Performance

Up
vote
Down

This article gives you a jumpstart on performing benchmark on filesystem using iozone a free Filesystem Benchmark utility.

Following are few situations where you may be interested in performing a filesystem benchmarking.

=> Deploying a new application that is very read and write intensive.
=> Purchased a new storage system and would like to measure the performance.
=> Changing the RAID level and would like to measure the performance of the new RAID.
=> Changing the storage parameters and would like to know the performance impact of this change

(here are some impact canvas prints) read more...
mail this link | permapage | score:8607 | -nixcraft, July 4, 2008 (Updated: April 24, 2012)

Tutorial: Setup Linux iSCSI SAN

Up
vote
Down

Linux target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. The key goals are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.

The developer of IET is also helping to develop Linux SCSI target framework (stgt) which looks like it might lead to an iSCSI target implementation with an upstream kernel component. iSCSI Target can be useful:

a] To setup stateless server / client (used in diskless setups).
b] Share disks and tape drives with remote client over LAN, Wan or the Internet.
c] Setup SAN - Storage array.
d] To setup loadbalanced webcluser using cluster aware Linux file system etc.

In this tutorial you will learn how to have a fully functional Linux iSCSI SAN using tgt framework. read more...
mail this link | permapage | score:8588 | -nixcraft, November 14, 2008

Linux Sysadmin interview: Format and tips

Up
vote
Down

Recently I had to come up with a list of questions and a format for a sysadmin interview. From past experiences and talking to colleagues I found quite a few possible approaches and reasons, but there still are some common rules interviewers should keep in mind.

Use an email quiz to filter out the fakes and save heaps of time. We had a vacancy for a more senior role a while ago and received lots of good CVs. Barely the 2% of the applicants we sent the quiz to came back to us with decent answers, some wouldn't even finish it! Something easy is enough, we asked to describe a step-by-step backup restoration and to do some reformatting on a csv file.

Never scare them! Some people have an hard time during interviews but perform very well when on the job. Obviously you want to consider the emotional factor,especially for a sysadmin, which more than others might end up having to carry out critical tasks under pressure. But don't forget that the type of stress is different, and responding badly to one doesn't mean responding bad to the other, and vice-versa.

Avoid questions that can be answered with a RTFM! Otherwise it's cheaper to buy a parrot and read man-pages to it before bed time. As usual there are limits, some commands and options should be known. But try to prove they can use their brain rather than just remembering things. Possibly come up with problem-solving oriented questions, put together a bunch of different log files and ask them to reconstruct what happened; or ask them to explain you how they would deploy software to a large number of machines.

Leave questions as open as possible, you're moreinterested to understand their approach and attitude rather than in the actual answers (again, this is true to some extent, catch my drift). Invite them to think aloud, that generally works.

Find out if they are passionate about the subject, ask them about their distribution and why they use it (this is also a good way to spot zealots, avoid them as plague!). Ask them why they want to work as sysadmin and if they have particular reasons to apply for a position within your company.

If your company is mostly based on FLOSS, find out their knowledge and interest in free libre software, that is also a good indicator of passion.

Down to the questions (bear in mind the target was a junior admin):

Attitudinal questions

  • Test their knowledge of the "community", who's Linus Torvalds; Richard Stallman; Alan Cox; Eric Raymond, and maybe another few big names like Tanenbaum and Theo De Raadt.
  • Do you run Linux at home?
  • What distribution, why?
  • What project are you most proud of?
  • Why are you leaving your current job?
  • Why do you want this job?
  • Why should we hire you?
  • What is a sysadmin?

Geek questions
This is highly optional, but I'm possibly looking for a geek, and any person applying for a sysadmin position should be able to answer at least the first 2 questions.

  • Can you expand RTFM? BOFH?
  • What's the last man page you've read?
  • Do you read any webcomics?

Generic linux questions

  • What are setuid/setgid in relation to file permissions?
  • What are setuid/setgid in relation to directory permissions?
  • What is an inode?
  • What does init do? What does inetd do?
  • Whatís PGP/GPG; Public/Private Key cryptographic systems
  • Whatís ssh? Setting up trust between accounts.
  • How does ssl work?
  • What are different directories in / for?
  • What to do , if the newly build kernel does not boot.?
  • Do you know what source management is? have you used it? what software?
  • How does the boot process (init levels) work on Linux

Things we need
Depending on your business there might be some piece of software you heavily use, hence have particular interest for the candidate's knowledge about it Have you used Apache? Talk to me about it. In my case we primarily do web based services so I ask about apache and mysql.

  • What do you know about configuring and/or compiling Apache;
  • Virtual Hosts?
  • .htaccess files?
  • mod_perl? mod_php?
  • log files and log management
  • Are you familiar with SQL?
  • Do you know about indexes?
  • Can you name and explain some of the tables in the mysql database

Cli
We send an email quiz before the interview which includes a scripting test. You might want to setup one for the interview, generally parsing CSV files is a good one.

  • What shell do you use?
  • bash?
  • do you know any other?
  • Name some basic shell command like cut and explain what they do
  • Sed/awk?
  • Which editor? vim/emacs/something else

File systems and disks

  • What is the big difference between ext2 and ext3?
  • What about xfs?
  • Reiserfs?
  • Partitions layout
  • Different raid levels

Networking

  • Whatís a hub?
  • Problems with hubs
  • Whatís a switch?
  • Whatís a router?
  • Whatís the difference between UDP and TCP?
  • How would you find what ports are open on a machine (local and remote)?
  • Whatís the OSI model? What are the seven levels?
  • How would you capture network traffic?
  • Whatís a VLAN?
  • How does DNS work?
  • How does FTP work?
  • How does SMTP work?
  • What's traceroute?

Security

  • Do you know what a chroot is?
  • Do you know what a BoF is?
  • Do you know what an sql injection is?
  • Do you know what a DoS attack is?
  • Do you know what a botnet is?
  • What firewall applications have you used?
  • Can you name the problems of firewalling ftp?

read more...
mail this link | permapage | score:8565 | -Filippo Spike Morelli, May 21, 2007

Unix: Find Hidden Processes and Ports

Up
vote
Down

Unhide is a little handy forensic tool to find hidden processes and TCP/UDP ports by rootkits / LKMs or by another hidden technique. This tools works under both Linux / Unix, and MS-Windows operating systems. read more...
permapage | score:8546 | -nixcraft, November 30, 2011

Customize Linux Mint 10

Up
vote
Down

After a review of Linux Mint 10, the next logical step is to write a few tutorials and tips for those that might need it. The first of these tutorials is a very basic one: It will present several steps you can take to customize a new installation of Linux Mint 10.

The list of tips that will be presented covers basic desktop customizations, enabling and configuring Gufw, the graphical firewall client, and installing standard GNOME games. read more...
permapage | score:8507 | -finid, November 27, 2010

User Mode Linux Interview: Maximize performance, jail attackers

Up
vote
Down

In this interview, "User Mode Linux" author and project architect Jeff Dike gives security tips on UML and discusses why, in some ways, UML is better than Xen and VMware.
Where you might have hostile UML users, you should seriously consider jailing the UML. I know of no exploits that would allow a UML user to escape to the host, but I obviously can't guarantee that they don't exist. Putting the UML in a chroot jail adds another layer of protection to the security already provided by UML.
read more...
mail this link | permapage | score:8485 | -janewalker6847, July 15, 2006

Install LTSP in Ubuntu 10.10

Up
vote
Down

If you Like to use Linux in your Internet Cafe, LTSP is the best solution, You can also reuse your old computers even with out a hard disk and also use low cost thin clients. For using old computers, you need some technical knowledge for installing Boot ROMs in your Network card. If you using a newer machine with PXE boot, Just install LTSP server and and set PXE Boot to tour Client.

Here i am going to show you, how to install/setup LTSP on top of an already running desktop system. read more...
permapage | score:8466 | -Linux Tips, December 6, 2010

Configure LEMP for maximum performance

Up
vote
Down

If you are using nginx as your webserver, you are looking for a performance boost and better speed. nginx is fast by default, but you can optimize its performance and the performance of all parts (like PHP and MySQL) that work together with nginx. Here is a small, incomprehensive list of tips and tricks to configure your LEMP system (Linux, nginx, MySQL, PHP-FPM) for maximum performance. These tricks work for me, but your mileage may vary. Do not implement them all at once, but one by one and check what effect the modification has on your system's performance. read more...
mail this link | permapage | score:8456 | -falko, September 24, 2012
More articles...
Buy Large Abstract Art Prints

Selected articles

The Network Computer: An opportunity for Linux

Linux vs. Windows: Why Linux will win

Shadow.sh: A simple directory shadowing script for Linux

No, RMS, Linux is not GNU/Linux

Beneficial Computer Viruses

Librenix T-Shirts and Coffee Mugs!

How to install Ubuntu Linux on the decTOP SFF computer

Why Programmers are not Software Engineers

The life cycle of a programmer

Closed Source Linux Distribution Launched

The Real Microsoft Monopoly

Mono-culture and the .NETwork effect

Space Tyrant: Multithreading lessons learned on SMP hardware

MiniLesson: An introduction to Linux in ten commands

Testing the Digital Ocean $5 Cloud Servers with an MMORPG

Why software sucks

Space Tyrant: A threaded game server project in C

Missing the point of the Mac Mini

Hacker Haiku

Space Tyrant: A threaded C game project: First Code

Microsoft to push unlicensed users to Linux

Space Tyrant: A multiplayer network game for Linux

Apple to Intel move no threat to Linux

Programming Language Tradeoffs: 3GL vs 4GL

Tutorial: Introduction to Linux files

Graffiti Server Download Page

VPS: Xen vs. OpenVZ

Linux dominates Windows

Apple DIY Repair

The short life and hard times of a Linux virus

The Supreme Court is wrong on Copyright Case

Download: Linux 3D Client for Starship Traders

Scripting: A parallel Linux backup script

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

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