Archive

Archive for the ‘tools’ Category

Tool of the week – xclip

August 23rd, 2010 madiga No comments

You’ll crap bricks when you hear about this tool.  If you’re background is on Mac, this tool is similar to pbcopy, pbpaste.  Until recent, I was not aware that Linux had a very similar tool available that can be used to do the same awesome things you can do with the above two.

The Linux version is called xclip.

xclip is a command line interface to the X11 clipboard. It can also be used for copying files, as an alternative to sftp/scp, thus avoiding password prompts when X11 forwarding has already been setup.

Tools like this can improve your productivity by avoiding many unnecessary and tedious things.

Categories: linux, tools Tags:

Tool of the week – ftsh

July 25th, 2010 madiga 1 comment

I came across this the other day and figured I add it to my archives. The Fault-Tolerant Shell (ftsh) is a small language for system integration that makes failures a first class concept. Ftsh aims to combine the ease of scripting with very precise error semantics. It is especially useful in building distributed systems, where failures are common, making timeouts, retry, and alternation necessary techniques.

Some examples:

try for 30 minutes
     cd /tmp
     rm -f data
     forany host in xxx yyy zzz
           wget http://${host}/fresh.data data
     end
end

If any element of the script fails, all running process trees are reliably cleaned up, and the block is tried again with an exponential backoff. You might think of this as exception handling for scripts.   This shell is probably a good starter for newbies out there that find shell scripting a bit cryptic.  ftsh makes it more readable and easily understandable.

Categories: tools Tags:

Tool of the week: p2pd

July 1st, 2010 madiga 2 comments

I came across p2pd and read it’s documentations briefly.  I really like the idea behind it as it uses the p2p mindset and architecture to extend on video streaming either by using native HTTP or SPP (Streaming Peer-to-Peer Protocol).

I’m more interested in utilizing the using HTTP piece where clients are not required to install and utilize any special protocols/tools in order to take advantage of p2pd.

Overview

Problem description: A content provider wishes to build a CDN for hosting (large) high quality video files for VoD streaming, and is assumed to already have a generic HTTP server (such as Apache) for web pages which will handle all all non-video presentation. The p2pd based CDN is only to be used to distribute the video data, after video playback has been requested. A separate media player application will handle decoding of the video once it has been received at the client machine.

The p2pd based CDN can consist of two types of nodes; servers and caches (SCC nodes). The servers keep media files in the directory /mediafiles, which is used to publish files. The caches store downloaded files in the directory /cachefiles. All p2pd processes are here assumed to run on port 8080. A file movie.mpg distributed by the CDN would have the URL http://cdn.example.com:8080/movie.mpg.

The machines available for building the CDN are assumed to have IP addresses in the range 10.0.0.1 – 10.0.0.5, with the DNS name cdn.example.com pointing to the nodes that should be accessible by users.

Users should not be required to download any additional software, but be able to use any web browser that supports HTTP.

As described above in p2pd HTTP documentation, having Apache is sufficient out of the box to build a CDN environment to stream VoD (video-on-demand).  it follows a model of server and caching servers.  You’d have a single server containing the primary content and as many caching servers from which connections are made to internal server containing the content if assets are not in cache.  The caching server IPs can be setup in DNS round-robin scenario to load balance them or a VIP on a hardware based device.

I think the above scenario can easily work for non-streaming purposes as well.  I haven’t tested this tool but assuming the expansion of CDN works well, there is no difference serving progressive http download of mpeg assets or html/css/php etc. sites.  The caching servers would use Apache and as long as that web server can run dynamic scripts (i.e php/perl etc), then building a large CDN using this same scenario would work for anything.

Categories: tools Tags: , ,

Tool of the week – Event and Task Manager!

June 24th, 2010 madiga 1 comment

Came across this neat, simple and efficient task management utility.  It has almost no overhead and is simple, period.

It provides a format for using simple text files to store reminders, a command line interface for viewing stored information in a variety of convenient ways and a wx(python)-based GUI for creating and modifying items as well as viewing them. Displayed items can be grouped by date, context, keyword or project and can be filtered in a number of ways. A display of busy and free times is also supported as is a reckoning view of time spent that is suitable for client billing. Alarms are supported for events and repetition for both events and tasks in a powerful and flexible manner.

Features:

  • Quickly enter an event, task, action or note using a simple, intuitive format.
  • Easily specify tasks and events that repeat in complex ways
  • Quick completion of entry fields. When creating or modifying an item, enter ‘@c’ and press Shift and Space to select from a list of all your previously used contexts or enter ‘@c er’ and press Shift and Space to select from contexts beginning with ‘er’. Quick completion also works after @k for keywords. When entering viewing options, quick completion can also be used after ‘-c’ and ‘-k’.
Categories: tools Tags:

Tool of the week – Flumotion!

June 21st, 2010 madiga 1 comment

I came across this recently and well it deserves it’s own recognition. Also, because I don’t want to forget about it as it maybe something I can use in the near future. Flumotion is a media streaming server.

It can do live streaming including live HTTP streaming and on-demand content. It is open-source and can support numerous formats and in many cases can be preferred over Flash Media Streaming Servers and others like it.

Built upon proven and tested free software solutions

The Flumotion Streaming Server is built upon a platform of proven free software solutions. We have currently focused on the Linux platform for our main development. Flumotion is mainly written in the extremely popular Python language.

The high-level functionality is built on top of Twisted. The low-level functionality is built on top of GStreamer.

Easy to use administration tool

Flumotion features an easy to use setup and administration tool which is closely integrated with the design of Flumotion. For some screenshots of these tools in action please take a look at the screenshots page.

Wide hardware support

Due to the developers’ decision to focus on supporting the GNU/Linux operating system, we have support for a wide range of audio and video input devices supported by the operating system.

Flumotion currently supports streaming from webcams, TV capture cards, FireWire DV cameras and the OSS and ALSA sound systems.

Distributed design

Flumotion has a distributed design, making it easy to spread the load over multiple machines, allowing you to do advanced media manipulation and stream generation. No matter how many different streams or multiple versions of the same stream you want to do, or different formats, or overlays, Flumotion can easily scale to handle it by distributing the load onto serveral machines.

Commercial support

While Flumotion is a free software product using the widely accepted GPL license, it has the advantage of having a commercial company behind it. This means that there is also commercial support and extra functionalities available.

Categories: tools Tags:

Tool of the week – sshconf

May 4th, 2010 madiga No comments

If you’re a sys admin, you’ve probably dealt with SSH related issues like allowing certain users, from specific IP addresses.  Allowing SSH2 and disabling SSH1, setting session timeouts and etc.  Sometimes it gets a bit messy dealing with the configuration file directly which is where sshconf comes along.

sshconf is a graphical frontend to manage ssh configurations for different hosts.  It creates Host specifications for the user’ s configuration file in ~/.ssh/config.

Features

  • add, edit or remove Host
  • add, edit or remove LocalForward(s) or RemoteForward(s) for a Host
  • open a Terminal with a connection to the Host
  • quick access to hosts via SystemTray Icon

The View is representing only a subset of the Options. The Logic behind that parse the whole set of options in the configuration file.

Options added by hand won’t be overwritten.

Categories: tools Tags:

Tool of the week – SchemaCrawler

May 2nd, 2010 madiga No comments

We have began a new section in our blog called “tool of the week”.  In this section, we will post a new tool or application that are mainly beneficial for DBAs, System Administrators and Programmers.  In this week’s posting, we are naming SchemaCrawler as the tool of the week.  What is SchemaCrawler and do?

  • SchemaCrawler is an open-source Java API that makes working with database metadata as easy as working with plain old Java objects.
  • SchemaCrawler is also a command-line tool to output your database schema and data in a readable form. The output is designed to be different with previous versions of your database schema.

SchemaCrawler is free and open-source API available under the LGPL license. SchemaCrawler is written in Java, making it operating system agnostic. Since it leverages JDBC, it is also database independent. It deliberately doesn’t have any RDBMS-specific code. SchemaCrawler allows you to compare structures between two different database servers, or even two different database systems, from different vendors.

SchemaCrawler comes with a set of command line tools that allow database metadata to be output as plain text , XHTML, or comma-separated text (CSV). The XHTML output is a combination of valid XML (that can be manipulated by XML tools or XSLT), and HTML that can be viewed in a browser. All formats are designed to be easy to diff , or find differences with other schemas that may have been output in the same format.

SchemaCrawler has grep functionality that allows you to search for table and column names using regular expressions. SchemaCrawler is capable of creating entity-relationship diagrams in DOT format, which GraphViz can convert into schema diagrams. SchemaCrawler has powerful scripting ability, using JavaScript. A live connection is provided to the JavaScript context to allow you to select from or even modify your database. Examples are provided for all of these with the download .

SchemaCrawler is integrated with, and allows you to write templates to generate SQL scripts or any other text output, using templating engines, such as Apache Velocity or <FreeMarker> . However, you will need to download Apache Velocity or <FreeMarker> separately, since these are not part of the SchemaCrawler download.

With all the above features, what better tool can you ask for?

Categories: tools Tags:

14 useful ARP monitoring tools

February 13th, 2010 madiga 1 comment

Some say ARP is an old school crap that it’s no longer useful in this modern day and age.  Those who say this, don’t know what it’s all about.  ARP is used to link IP address to a system’s physical MAC address in a local network, this is how the servers identify each other.

By understanding ARP and knowing how to use the arp utility, one can troubleshoot network related issues faster.  In this article, we’ve put together 14 tools specifically used to to deal with ARP related monitoring and troubleshooting.

1) Arping

- an ARP level ping utility. It’s good for finding out if an IP is taken before you have routing to that subnet. It can also ping MAC addresses directly.

2) arp-scan

-  sends ARP (Address Resolution Protocol) queries to the specified targets, and displays any responses that are received. It allows any part of the outgoing ARP packets to be changed, allowing the behavior of targets to non-standard ARP packets to be examined. The IP address and hardware address of received packets are displayed, together with the vendor details. These details are obtained from the IEEE OUI and IAB listings, plus a few manual entries. It includes arp-fingerprint, which allows a system to be fingerprinted based on how it responds to non-standard ARP packets.

3)  arpalert

- uses ARP address monitoring to help prevent unauthorized connections on the local network. If an illegal connection is detected, a program or script is launched, which could be used to send an alert message, for example.

4)  parprouted

- a daemon for transparent IP (Layer 3) proxy ARP bridging. This is useful for creation of transparent firewalls and bridging networks with different MAC protocols. Also, unlike standard bridging, proxy ARP bridging allows to bridge Ethernet networks behind wireless nodes without using WDS or layer 2 bridging.

5)  ARPSpoofDetector

-performs active and passive detection of ARP spoofing and IP (IPv4) address collision. The program can send healing packets with regular ARP information.

6)  Local IP Takeover

- provides network link redundancy within a single server that has multiple network interface cards (NICs) with each NIC connected to separate network switches. If the primary NIC fails (i.e. it cannot ping its default gateway), the “service” IP (the IP that the outside world connects to) will automatically float to the secondary NIC and a specially crafted ARP (utilizing send_arp) will be broadcast on the local network, thereby instructing all other hosts to update their local ARP cache. The result is minimal service downtime. Plus, no manual intervention is required in the event that a network card, cable, or switch breaks.

7) ARP Tools

- Collection of libnet and libpcap based ARP utilities. It currently contains ARP Discover (arpdiscover), an Ethernet scanner based on ARP protocol; ARP Flood (arpflood), an ARP request flooder; and ARP Poison (arppoison), for poisoning switches’ MAC address tables.

8 )  Gnome ARP

- an ARP monitoring program written on Gnome with the GTK toolkit and Ruby. It takes ARP tables and some system variables via SNMP and ARP protocols and determines whether any machines have changed their IP address. It is useful for detecting new machines on the network and detecting which machine have changed addresses. It is intended especially for network admins.

9) Arphound

- a tool that listens to all traffic on an ethernet network interface. It reports IP/MAC address pairs as well as events such as IP conflicts, IP changes, IP addresses with no RDNS, various ARP spoofing, and packets not using the expected gateway. Reporting is done to stdout, to a specified file, or to syslog in a format that can be easily parsed by scripts.

10)  wakearp

- a small utility to induce ARP resolution for any listening IP address in the local /24 subnet.

11)  MasarLabs NoArp

- a Linux kernel module that filters and drops unwanted ARP requests. It is useful when you need to add an alias to the loopback interface to use a load balancer.

12)  Antidote

- a detector for ARP poisoning on a switched network.

13)  arprelease

- a small libnet-based tool to flush ARP cache entries from devices like Cisco routers to move an IP from one Linux box to another.

14)  ARPoison

- a network analysis tool that sends ARP packets to/from specified hardware and protocol addresses.

Categories: tools Tags:

15 Remote Desktop Solutions for Linux.

February 7th, 2010 madiga 13 comments

There are a wide range of remote desktop applications that are available that can be used to connect to Windows environment but there aren’t too many that can be used to remote desktop from Linux to Linux or Windows to Linux. With this I mean, getting entire desktop of remote Linux environment on your local workstation.

Most people who are used to a Unix-style environment know that a machine can be reached over the network at the shell level using utilities like telnet or ssh. And some people realize that X Windows output can be redirected back to the client workstation. But many people don’t realize that it is easy to use an entire desktop over the network. There are a several of open source applications that can be used to achieve this.

1)  VNC (Virtual Network Computing) is a remote display system which allows the user to view the desktop of a remote machine anywhere on the internet. It can also be directed through SSH for security.

Basically you install VNC server on the server and install client on your local PC. Setup is extremely easy and server is very stable. On client side, you can set the resolution and connect to IP of VNC server. It can be a bit slow compared to Windows remote desktop and also has the tendency to take more time refreshing over low-bandwidth links. All in all VNC is an amazing piece of free software that gets the job done.

There is RealVNC , TightVNC and UltraVNC. Each has it’s advantages and disadvantages. Most popular one is RealVNC but if you’re upto it, experiment with all three and choose the one that works for you best. By default, communication between client and server is in clear text on port 5900. However, you can easily route all traffic via SSH tunnel. Here is a quick way of setting it up if you have access to command line shell:

ssh -ND 5900 <user>@remote.server.com

When you get prompted, enter your password. Pop open VNC client and connect to ‘localhost’. This’ll route your connection to VNC server on remote machine.

You can download VNC from:

2)  Then there is FreeNX. FreeNX is a system that allows you to access your desktop from another machine over the internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client. It provides near local speed application responsiveness over high latency, low bandwidth links.

FreeNX can be configured to run via SSH without any tunneling. It binds to your existing SSH install. Instead of guiding you through the installation of FreeNX in this article, you can visit the following URLs that’ll guide you through the installation on Ubuntu:

3) The third free application is 2X Terminal Server for Linux. 2X TerminalServer for Linux is an Open Source project, licensed under the GPL and is free of charge. As far as performance goes, NoMachine’s technology is on par with Windows’ own Remote Desktop Protocol (RDP) suite, better than VNC. Both X2 and FreeNX is based on NoMachine technology.

Here are some quick links if you’re interested in using this software:

4) Then there is is XDMCP. The X Display Manager Control Protocol uses UDP port 177. Compared to the list above, it’s not as easy to setup for remote desktop but it’s the original way of doing this on Linux. You can get setup instructions and other tips in the following URL:

5) CygwinX. A complete Linux emulation on Windows. You’ll find every tool and app that you have on Linux on Cygwin.

6) XRDP. RDP server that runs on Linux, thus allowing you to use Windows Remote Desktop Client or rdesktop to connect.

7) x2vnc – great little utility that allows you to tie a linux and windows (or anything that can run the vncserver) together with a ingle keyboard/mouse, avoiding the need for a switcher box. Mousing cross screens transparently switches between machines, and cut and aste works.

8 ) Xming – t’s a great and lightweight implementation of X11 for Windows that allows you to connect to a Linux box.

9) KDE Desktop Sharing (formerly krfb) – part of KDE since version 3.1. It is located in the kdenetwork package. If your distribution splits the KDE applications into separate packets, you may find the client as ‘krdc’ and the server as ‘krfb’. Also uses VNC technology.

10) X-Win32 - Top rated PC X server solutions for Windows PCs connecting to remote Unix and Linux host systems. Works well over SSH.

11) Single Click UltraVNC – In case you would like to remote control without any software installed on the target computer you need UltraVNC SC. The user on the to be controlled computer needs to simply click on a web page and remote controlling begins.

12) CrossLoop – CrossLoop is a FREE secure screen sharing utility designed for people of all technical skill levels. CrossLoop extends the boundaries of VNC’s traditional screen sharing by enabling non-technical users to get connected from anywhere on the Internet in seconds without changing any firewall or router settings.

13) Thinstation – Although not a remote desktop app but worth mentioning here. Thin client linux distro for terminals using std. x86 hw. It can boot from network, pxe, syslinux,loadlin, CD, floppy or flash-disk and connect to servers using VNC, RDP, XDM, SSH and etc.

14) rdesktop - an open source client for Windows NT Terminal Server and Windows 2000/2003 Terminal Services, capable of natively speaking Remote Desktop Protocol (RDP) in order to present the user’s NT desktop. rdesktop currently runs on most UNIX based platforms with the X Window System, and other ports should be fairly straightforward.

While you’re at it, get grdesktop from (http://www.nongnu.org/grdesktop/). It is a GNOME frontend, for rdesktop. It can save several connections (including their options), and browse the network for available terminal servers.

15) ssh -X – You can check out this great article written by a slashdot user sometime ago.

Windows to Mac / Mac to Windows

1) RDP Client for Mac allows you to connect to a Windows-based computer and work with programs and files on that computer from your Macintosh computer.

2) OSXVnc – Vine Server is a full featured VNC server for Mac OS X providing remote access to the GUI, keyboard and mouse using Vine Viewer or any other VNC client.

3) Chicken of the VNC – A VNC client allows one to display and interact with a remote computer screen. In other words, you can use Chicken of the VNC to interact with a remote computer as though it’s right next to you.

Unfortunately I was not able to find too many available to connect to Mac from Windows other than VNC. I think Windows need to support RDP into Mac. Many people would benefit from this.

If I am missing anything from the list, please let me know.

Categories: linux, tools Tags:

Cool Desktop Multiplier

February 4th, 2010 madiga No comments

I came across this neat application called Userful Desktop Multiplier. It is a virtualized X server that turns one computer into ten “workstations” by using extra video cards, keyboards, and monitors. This approach offers significantly higher performance and lower hardware costs than Thin Client or LTSP.

It installs on most popular Linux distributions (Red Hat, Novell/SuSE, Fedora, Mandriva, Xandros, Linspire, Ubuntu, etc.). It supports USB touch screens (Elotouch, Microtouch), card-swipes, barcode scanners, as well as all virtually all video cards supported by X. It features easy setup and graphical configuration. Download it from here.

Desktop Multiplier

Categories: linux, tools Tags: