Month: April 2009

You can use Nagios to monitor all sorts of hardware and software. The opportunity to write your own plug-ins makes it possible to monitor everything that your Nagios server can communicate with. As you can use any computing language that manages command-line arguments and exit status.
Here you find a nagios pluging developed with python.
The pluging named check_openvpn, it connects to the management OpenVPN server checks for actives connection and return the amount connected OpenVPN clients. it’s forked from openvpn-status scripts.

First of all download the check_openvpn script into your pluging directory on debian it’s /usr/lib/nagios/plugins/.

To use the new plug-in, you have to register it first, create the file command called openvpn.cfg with contents as below:

GNU GRUB (“GRUB” for short) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts. GRUB can be used to select from different kernel images available on a particular operating system’s partitions, as well as to pass boot-time parameters to such kernels.

Every once in a while windows may have the inclination to overwrite your bootloader with its own. This will make accessing your system impossible.
Well, there is a solution to override the 512 Kb of your drive that represent the MBR.
In the fact you can follow these steps to repair your GRUB loader:
Boot your PC with a Live CD in the drive, after run fdisk to display list of your partitions system.

To resolve host names and addresses in the domain name system or the local hosts, there are many functions defined as well as the function gethostbyname.

The gethostbyname() is a function that returns a structure of type hostent for the given host name.
Here name is either a host name, or an IPv4 address in standard dot notation.
You can find here an example of using gethostbyname(3).

Here i’ve marked the steps that i followed to share cwhois and how i upload it to sourceforge.
First of all, i prepared the code source of cwhois application, i archived it and i compressed it with bzip2.
Sourceforge provides a file management service to ease the process of uploading files.
The file management service allows upload via web form, WebDAV, SFTP, SCP, and rsync over SSH.

I used a WebDAV linux client named cadaver. You can installed with aptitude$ sudo aptitude install cadaver

Note that the upload url is in this form https://frs.sourceforge.net/u/us/user/uploads
where ‘u’ is the first occurence in your username, ‘us’ is the first and the second character,
and ‘user’ have also to be remplaced with your username.
So, i put the application.

Well everything seems to be ok, i went to SF.net > Projects > cwhois > Admin > File Releases
and i added a release 0.1, also i added the uploaded File cwhois.tar.bz2 To This Release.

cwhois is another GUI widget using wxpython, developed for fun and profit.
cwhois is a very simple and generic whois client, it send a request to whois servers and try to give you the domain’s registration information. It support both of Internet protocol ipv4 and ipv6.

Many times, i find myself making and moving to a directory quite a bit, normally I use something like this$ mkdir ~/dir && cd ~/dir
or$ mkdir -p create/new/dir && cd create/new/dir
You can’t have a simple BASH script that reads “mkdir $1 && cd $1” because it would only switch to the directory while running as a child process instead of actually switching to the directory.
However there is a quick and easy way to combine the tasks, add a function mkcd() to your .bashrc.$ cat >> ~/bashrc
function mkcd(){
[ -n “$1” ] && mkdir -p “$@” && cd “$1”;
}

Kernel based graphic mode setting:
This feature allows the kernel to control the graphics hardware after the required components are initialized (such as the PCI bus and graphics card).
In this way, the kernel can enter the desired screen resolution much earlier in the boot process.

Networking changes:
WiMAX support,
Worldwide Inter-operability for Microwave Access, a telecommunication technology that provides
wireless transmission of data using a variety of transmission modes.
It provides up to 75 Mbit/s symmetric broadband speed without the need for cables.
The technology is based on the IEEE 802.16 standard (also called Broadband Wireless Access).
The stack has been provided by Intel, and it includes a driver for the Intel Wireless WiMAX/Wi-Fi Link
5×50 USB/SDIO devices.

Access Point support in the wifi stack,
Wireless access points (APs or WAPs) are specially configured nodes on wireless local area
networks (WLANs).
Access points act as a central transmitter and receiver of WLAN radio signals.

Filesystem:
Btrfs:
Btrfs is a new filesystem developed from scratch following the design principles of filesystems like ZFS, WAFL, etc.
It was created by Oracle. btrfs is licensed under GPL.
The main Btrfs features include:

Extent based file storage (2^64 max file size)

Space efficient packing of small files

Space efficient indexed directories

Dynamic inode allocation

Writable snapshots

Subvolumes (separate internal filesystem roots)

Compression

… more information about btrfs can be found in the btrfs wiki page.

squashfs:
Squashfs is a compressed read-only filesystem for Linux. Squashfs is intended for general read-only filesystem use,
for archival use, and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed.
It is used by the Live CD versions of Debian, Fedora, Gentoo Linux, GParted, Ubuntu, … and on embedded distributions such as
the OpenWRT and DD-WRT router firmware.
Squashfs is also free software (licensed under the GPL) for accessing Squashfs filesystems.
Some squashfs overview:

Data, inodes and directories are compressed.

Squashfs stores full uid/gids (32 bits), and file creation time.

Files up to 2^64 bytes are supported. Filesystems can be up to 2^64 bytes.

Inode and directory data are highly compacted, and packed on byte boundaries.