Sunday, July 31, 2011

What is Hardware Virtualisation?

    In an computing world Virtualisation is an creation of virtual ( just like an clone ) version related hardware, desktop, server and network.

Goal Of Virtualisation:
  • Centralize administrative tasks.
  • Optimization.
  • Utilization.
  • Improving scalability and work loads.  
Hardware Virtualisation:

                      Creation of virtual machines in hardware virtualisation is act, just like an real computer with an operating system. Resource executed on the virtualisation is away from the underlying hardware resources.

Types of Hardware Virtualisation:
  • Full virtualisation: Almost complete simulation of the actual hardware to allow software, which typically consists of a guest operating system, to run unmodified
  • Partial virtualisation: Some but not all of the target environment is simulated. Some guest programs, therefore, may need modifications to run in this virtual environment.
  • Paravirtualisation: A hardware environment is not simulated; however, the guest programs are executed in their own isolated domains, as if they are running on a separate system. Guest programs need to be specifically modified to run in this environment.                  

Tuesday, July 26, 2011

How to create database and "grant all" perm for an user

   We can create Database in two way, one is using mysqladmin  and other is using mysql prompt.

Method 1: Using mysqladmin

root@debian:# mysqladmin -u root -v create gnu

Method 2 : Using mysqlprompt

root@debian:/home/mughil# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 112
Server version: 5.1.49-3 (Debian)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database foss;
Query OK, 1 row affected (0.02 sec)

After creating db, we have to assign grant perm to  user on the db.

mysql> grant all on foss.* to mughil@localhost identified by 'mughil';
Query OK, 0 rows affected (0.00 sec)

mysql>quit
Bye

Monday, July 25, 2011

List of Linux Audio Software

    Audio software on the Linux platform is becoming very stable and advanced. Here i have try to provide some of the details of the audio application supported in linux.

Audio Players / Music Managers :

Audacious Semi-lightweight audio player with a WinAmp/XMMS-like skinnable GUI.
Amarok KDE audio player offering a wealth of features, yet intuitive to use.
Banshee Music management and playback software for GNOME.
BMPx Compact media player, the successor to the Beep Media Player.
Exaile Music player aiming to be similar to KDE's Amarok, but for GTK+.
JuK Jukebox and music manager for the KDE desktop.
gmusicbrowser Jukebox for large collections of mp3/ogg/flac/mpc files.
Listen Player which helps you to organize your music collection.
Quod Libet Music management program.
Rhythmbox Integrated music management application, originally inspired by Apple's iTunes.
Songbird Provides a uniquely open approach to Internet digital media network services.

DJ Tools :

Mixxx Digital DJ system, for wave, ogg and mp3 files.
terminatorX Realtime audio synthesizer that allows you to "scratch".

Music Clients for the MPD (Music Player Daemon):

Ario GTK2 client.
GMPC Optimised to work on low end machines and over slow networks.
Sonata Lightweight GTK+ music client.

Recording / Editing :

Audacity Digital audio editor.
Ardour Digital audio workstation program.
Jokosher Simple yet powerful multi-track studio.
Sweep Audio editor and live playback tool.
Traverso DAW Multitrack audio recording and editing program.

Composition & Music Notation :

LilyPond Produce musical scores that are engraved with traditional layout rules.
Rosegarden Sophisticated MIDI (and audio) sequencer and notation editor.
MuseScore Graphical WYSIWYG music score typesetter.

Sequencers :

Breakage Intelligent drum machine designed to play complex, live breakbeat performances.
MusE Qt-based MIDI/audio sequencer.
Qtractor Audio/MIDI multi-track sequencer written in C++ around the Qt4 toolkit.
LMMS Alternative to popular (but commercial) programs like FL Studio, Cubase and Logic.
Hydrogen Advanced drum machine.
Seq24 Loop based MIDI sequencer.

Synthesizers & Samplers :

Fluidsynth Real-time software synthesizer based on the SoundFont 2 specifications.
Bristol Emulation package for a number of different 'classic' synthesisers.
LinuxSampler Professional grade software audio sampler.
SooperLooper Live looping sampler.

Tools :

JAMin State-of-the-art realtime mastering processor.
Kid3 Edit ID3v1 and ID3v2 tags in MP3 files in an efficient way.
Sonic Visualiser Inspect and analyse the contents of music audio files.
Sound Juicer Lean CD ripper using GTK+ and GStreamer.
Streamripper Records shoutcast-compatible streams.

Sound Servers / Daemons :

JACK Low-latency audio server daemon.
MPD Allows remote access for playing music and managing playlists.
PulseAudio Networked sound server project

How To Check Reverse DNS Lookup

       People can remember Domain Name rather than ip-address.For an example www.debian.org than their ip-address 206.12.19.7.There are two types DNS, Forward DNS and Reverse DNS.

Forward DNS : Networks use the Domain Name System to determine the IP address associated with a domain name.


Reverse DNS : Reverse DNS lookup is the inverse process, the resolution of an IP address to its designated domain name.

dig is the command to make the DNS Queries.

root@debian:~# dig +noall +answer debian.org

Output :

debian.org.        3547    IN    A    206.12.19.7
debian.org.        3547    IN    A    128.31.0.51

+noall, +answer option tell the dig command to report only the answer of the DNS query and skip the rest of the output.

Reverse DNS can be checked in two method, one with the -x option passing to the dig command and other host command.

Method 1:

root@debian:~# dig  +noall +answer -x  128.31.0.51

Output :

51.0.31.128.in-addr.arpa. 1745    IN    PTR    senfl.debian.org.


Method 2:

root@debian:~# host  128.31.0.51

Output :

51.0.31.128.in-addr.arpa domain name pointer senfl.debian.org.

Common Uses of Reverse DNS :

1.Anti-spam
2.Network troubleshooting
3.Avoid spammers and phishers using a forward confirmed reverse DNS etc

Thursday, July 21, 2011

How To Check Disk Usage in Linux System

df command will show the overall disk usage of the system.

#df -h

Output:

Filesystem            Size   Used     Avail    Use%    Mounted on
/dev/sda1              39G    35G      2.5G      94%      /
tmpfs                 283M          0    283M        0%      /lib/init/rw
udev                  279M    188K    278M        1%      /dev
tmpfs                 283M    156K    283M       1%      /dev/shm

Some of the options we can pass into the df command is as follow:

        -a, --all
              include dummy file systems
       -B, --block-size=SIZE
              use SIZE-byte blocks
       --total
              produce a grand total
       -h, --human-readable
              print sizes in human readable format (e.g., 1K 234M 2G)
       -H, --si
              likewise, but use powers of 1000 not 1024
       -i,  --inodes
              list inode information instead of block usage
       -k    like --block-size=1K
       -l,  --local
              limit listing to local file systems
       --no-sync
              do not invoke sync before getting usage info (default)
       -P, --portability
              use the POSIX output format
       --sync invoke sync before getting usage info
       -t, --type=TYPE
              limit listing to file systems of type TYPE
       -T, --print-type
              print file system type
       -x, --exclude-type=TYPE
              limit listing to file systems not of type TYPE
       -v     (ignored)


du command is used to estimate the specific usage of file or directory

# du -sch my_ntop_goes_here/

Output:

16M    my_ntop_goes_here/
16M    total

Some of the options we can pass into the du command is

       -a,  --all
               write counts for all files, not just directories
       -B,  --block-size=SIZE
               use SIZE-byte blocks
       -b,  --bytes
               equivalent to `--apparent-size --block-size=1'
       -c,  --total
              produce a grand total
       -D, --dereference-args
              dereference only symlinks that are listed on the command line
       -H    equivalent to --dereference-args (-D)
       -h, --human-readable
              print sizes in human readable format (e.g., 1K 234M 2G)
       --si  like -h, but use powers of 1000 not 1024
       -k    like --block-size=1K
       -l,  --count-links
              count sizes many times if hard linked
       -m   like --block-size=1M
       -L, --dereference
              dereference all symbolic links
       -P, --no-dereference
              don't follow any symbolic links (this is the default)
       -0, --null
              end each output line with 0 byte rather than newline
 

Monday, July 18, 2011

How To Check The Memory Usage in Debian / Fedora System

Free is one the linux command to display the total amount of free and used physical memory and swap memory in the system, as well as the buffers used by the kernel.

Display memory in MB :

$ free -m

Output :
                          total    used    free    shared   buffers    cached
Mem:                   564     495      68              0           67          147
-/+ buffers/cache:            280    283
Swap:                 1101        8   1093

Display total memory in an line:

$ free -mt

Output :
                          total    used    free    shared   buffers    cached
Mem:                   564     495      68              0           67          147
-/+ buffers/cache:            280    283
Swap:                 1101        8   1093
Total:                1666       557   1109

Some of the OPTIONS we can pass in free command as below :

-b Display the amount of memory in bytes.
-c count
Display the result count times. Requires the -s option.
-g Display the amount of memory in gigabytes.
-k Display the amount of memory in kilobytes. This is the default.
-l Show detailed low and high memory statistics.
-m Display the amount of memory in megabytes.
-o Display the output in old format, the only difference being this
option will disable the display of the "buffer adjusted" line.
-s Continuously display the result delay seconds apart. You may
actually specify any floating point number for delay, usleep(3)
is used for microsecond resolution delay times.
-t Display a line showing the column totals.
-V Display version information.

Saturday, July 16, 2011

How to Set the Static IP In Command Line

RED Hat / Fedora Linux :

     Login as root, Change the directory to /etc/sysconfig/network-scripts/

# cd /etc/sysconfig/network-scripts/

      Here you can find the Ethernet configuration file such as ifcfg-eth0, ifcfg-eth1.Using any one of the favorite editor, you can edit or append the Ethernet configuration file.

# vim ifcfg-eth0

Edit/Append as follow:

DEVICE=eth0
BOOTPROTO=static
HWADDR=00:30:48:57:A6:2M
IPADDR=192.168.0.2
NETMASK=255.255.255.0
ONBOOT=yes

     After modification , save and close the file.

To Set Gateway and Hostname :

   Change to the directory /etc/sysconfig/ and edit network file.

#vim network

NETWORKING=yes
HOSTNAME=host.example.com
GATEWAY=192.168.0.1

To Set Nameserver :

    Change the directory /etc/ and edit the resolv.conf file

#vim resolv.conf

search dns-search-path
nameseever dns1.ip-address
nameserver dns2.ip-address

    After updating the ip-address, gateway and the nameserver restart the network service.

# /etc/init.d/network restart

Debian / Ubuntu Linux :


   Main Network Configuration Files is /etc/network/interfaces. Using any one of the favorite editor, you can edit or append the Ethernet configuration file.

#vim /etc/network/interfaces

Edit/Append as follow:

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

     After modification , save and close the file

To Set Nameserver :

   Change the directory /etc/ and edit the resolv.conf file

#vim resolv.conf

search dns-search-path
nameseever dns1.ip-address
nameserver dns2.ip-address

    After updating the ip-address, gateway and the nameserver restart the network service.

#/etc/init.d/networking restart