Leaderboard (728 x 90)

Saturday, November 19, 2011

How to enable NTFS filesystem on linux kernel

Introduction

kernel version m.n.x-y
m = major version number
n = minor version number (revision number and development status (odd number = development version and even number = stable version))
x = patch level
y = extra version number

{arch} = architecture

Required Package:
kernel-source
dev86
glibc-devel
make
gcc
binutils
ncurses-devel
cpp

Begin:
# cd /usr/src/linux-m.n

create default config from old kernel
# cp config/kernel-m.n.x-{arch}.config .config

modify kernel config
# make config - interactive
# make menuconfig - text mode
# make xconfig - gui mode

Edit extra version number
# vi /usr/src/linux-m.n/makefile

EXTRAVERSION=-yntfs

Check dependencies
# make dep

Remove certain files from previous compile operation
# make clean

Compile kernel source and build to file "bzImage"
# make bzImage

Compile dependencied modules
# make modules

Install compiled modules to /lib/modules/m.n.x-yntfs
# make modules_install

Install new compiled kernel to boot loader

Make initial ramdisk
# mkinitrd /boot/initrd-m.n.x-yntfs.img m.n.x-yntfs

Copy symbol table of the compiled kernel source to /boot
# cp /usr/src/linux-m.n/System.map /boot/system.map-m.n.x-yntfs

Copy new compiled kernel to /boot
# cp /usr/src/linux-m.n/arch/{arch}/boot/bzImage /boot/vmlinuz-m.n.x-yntfs

Backup config file of the compiled kernel source
# cp /usr/src/linux-m.n/.config /boot/config-m.n.x-yntfs

Add boot menu to grub boot loader
# vi /etc/grub.conf

# append these lines to grub.conf
# (hd0,0) = first partition of first hard drive
# /dev/VolGroup00/LogVol00 = volume or partition for / mountpoint

title Linux with NTFS support (m.n.x-yntfs)
root (hd0,0)
kernel /vmlinuz-m.n.x-yntfs ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-m.n.x-yntfs.img

Restart machine and select new compiled kernel in boot menu then check known file systems
# cat /proc/filesystems

Friday, November 4, 2011

for loop example in bash

Example 1
for i in 1 2 3 4 5
do
echo $i
done

Example 2
for i in {1..5}
do
echo $i
done

Example 3
for ((i=0; i<=5; i++))
do
echo $i
done

Example 4
Bash v4.0+ has inbuilt support for setting up a step value using {START..END..INCREMENT} syntax:
for i in {1..10..2}
do
echo $i
done

Friday, October 28, 2011

Linux System Monitoring Tools

1. top - Displays dynamic real-time view of a running system

2. vmstat - Report virtual memory statistics

3. w - Show who is logged on and what they are doing.

4. uptime - Tell how long the system has been running.

5. ps - display information about the current processes.

6. free - Display amount of free and used memory in the system

7. iostat - Report CPU statistics and input/output statistics for devices and partitions.

8. sar - Collect, report, or save system activity information.

9. mpstat - Report multiprocessors related statistics.

10. pmap - report memory map of a process

11. netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

12. ss - Dump socket statistics

13. iptraf - Interactive IP traffic Monitor

14. tcpdump - Detailed Network Traffic Analysis

15. strace - Trace system calls and signals

16. /Proc file system - Process information pseudo-filesystem.

17. Nagios - Application, Services, Servers And Network Monitoring with Email and SMS alert

18. Cacti - Web-based Monitoring Tool

19. KDE System Guard - Real-time Systems Reporting and Graphing

20. Gnome System Monitor - Real-time Systems Reporting and Graphing

21. nmap - network exploration tool and security auditing.

22. lsof - list open files

23. ntop - web based network traffic probe that shows the network usage, similar to what the popular top Unix command does.

24. Conky - light-weight system monitor for X, that displays any information (uname, uptime, CPU usage, mem usage, disk usage, "top" like process stats, and network monitoring,) on your desktop.

25. GKrellM - Single process stack of system monitors that can used to monitor CPUs, Process, Disk, Network Interface, Memory, File system, Temperature, fan, voltage sensor monitors, and many other things.

26. vnstat - a console-based network traffic monitor. It keeps a log of hourly, daily and monthly network traffic for the selected interface(s).

27. htop - htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form.

28. mtr - a network diagnostic tool that combines the functionality of the traceroute and ping programs.

29. users - print the user names of users currently logged in to the current host

Thursday, May 19, 2011

How can I know what configure options were used to compile it?

You can see the configure options using the mysqlbug command-line utility.

In your shell type mysqlbug and you'll see a template e-mail for bug submission.
At the bottom end of that e-mail you can see the configure line with all the options your copy of MySQL was compiled with.

Reference: http://serverfault.com/questions/62212/configure-options-mysql-server-was-compiled-with

Tuesday, January 4, 2011

Windows x64 problem: The 'Microsoft.Jet.OLEDB. 4.0' provider is not registered on the local machine.

Cause:

There is no 64 bit version of Microsoft Jet OLE DB driver.

Resolution:

1. Install lastest service pack for windows

2. Force program to run as a 32 Bit application. In order to do this, you need utility found in .NET SDK named corflags.exe.

>> corflags program.exe /32BIT+

2. For run on IIS, you need to enable 32 bit applications on IIS

>> cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1