Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 22 January 2011

"Virtual Memory is NOT Virtual"...kamal maiti

Posted on 10:33 by Unknown
Guys,

As per my observation and study I don't think virtual memory is virtual that has implemented on linux/windows operating system. So, you can ask me why it's not virtual? And you guys can say "in computer science everyone believes that there is virtual memory which is abstract layer of the memory space". Ok if this is the case then explain why it's virtual? What I suspect that your answer would be like "the term "virtual" is a really a abstract view and idea or guess that doesn't have any real existance since cpu generates the logical addresses or set of logical memory address".

Let me first tell you "what is virtual memory as per the current notion". On linux OS cpu generates a set of logical address for a process or task before loading it on the RAM or primary memory. So, the task or program will be first loaded in that logical address space(set of logical addresses). The "swap" partition is used for the logical address space on linux and please note that swap partition is created during installing of the OS or later since it's a part of linux OS. Now swap partition is the part of hard disk. The hard disk is real, So, swap partition is also real. Now swap partition is used as a logical address space. So, again logical address space is virtual memory(as per the current convention). Here we can say logical address space is also real. So, the virtual memory is also real. That's why I don't think it's virtual. It's real memory. You can say it "first primary memory" and RAM can be called "second primary memory".

Let me take an example. The "init" is the first process which resides on the logical or swap memory. As per its requiremts cpu loads the program/libraries on the RAM. Here is a real view of the logical address(start address , end address, access permission, size of the each page,major no:minor no, total size) of the task "init".


--------------
[root@kmaiti ~]# cat /proc/1/maps
00400000-00420000 r-xp 00000000 fd:01 527519 /sbin/init
0061f000-00621000 rw-p 0001f000 fd:01 527519 /sbin/init
02563000-025a4000 rw-p 00000000 00:00 0 [heap]
3d43a00000-3d43a1e000 r-xp 00000000 fd:01 40 /lib64/ld-2.12.so
3d43c1d000-3d43c1e000 r--p 0001d000 fd:01 40 /lib64/ld-2.12.so
3d43c1e000-3d43c1f000 rw-p 0001e000 fd:01 40 /lib64/ld-2.12.so
3d43c1f000-3d43c20000 rw-p 00000000 00:00 0
3d43e00000-3d43f75000 r-xp 00000000 fd:01 42 /lib64/libc-2.12.so
3d43f75000-3d44175000 ---p 00175000 fd:01 42 /lib64/libc-2.12.so
3d44175000-3d44179000 r--p 00175000 fd:01 42 /lib64/libc-2.12.so
3d44179000-3d4417a000 rw-p 00179000 fd:01 42 /lib64/libc-2.12.so
3d4417a000-3d4417f000 rw-p 00000000 00:00 0
3d44200000-3d44217000 r-xp 00000000 fd:01 7379 /lib64/libpthread-2.12.so
3d44217000-3d44417000 ---p 00017000 fd:01 7379 /lib64/libpthread-2.12.so
3d44417000-3d44418000 r--p 00017000 fd:01 7379 /lib64/libpthread-2.12.so
3d44418000-3d44419000 rw-p 00018000 fd:01 7379 /lib64/libpthread-2.12.so
3d44419000-3d4441d000 rw-p 00000000 00:00 0
3d44600000-3d44618000 r-xp 00000000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44618000-3d44818000 ---p 00018000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44818000-3d44819000 rw-p 00018000 fd:01 11283 /lib64/libnih.so.1.0.0
3d44a00000-3d44a09000 r-xp 00000000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44a09000-3d44c08000 ---p 00009000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44c08000-3d44c09000 rw-p 00008000 fd:01 346 /lib64/libnih-dbus.so.1.0.0
3d44e00000-3d44e07000 r-xp 00000000 fd:01 7380 /lib64/librt-2.12.so
3d44e07000-3d45006000 ---p 00007000 fd:01 7380 /lib64/librt-2.12.so
3d45006000-3d45007000 r--p 00006000 fd:01 7380 /lib64/librt-2.12.so
3d45007000-3d45008000 rw-p 00007000 fd:01 7380 /lib64/librt-2.12.so
3d4a600000-3d4a640000 r-xp 00000000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a640000-3d4a83f000 ---p 00040000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a83f000-3d4a840000 r--p 0003f000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4a840000-3d4a841000 rw-p 00040000 fd:01 7381 /lib64/libdbus-1.so.3.4.0
3d4e600000-3d4e616000 r-xp 00000000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
3d4e616000-3d4e815000 ---p 00016000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
3d4e815000-3d4e816000 rw-p 00015000 fd:01 7393 /lib64/libgcc_s-4.4.4-20100726.so.1
7f76c8840000-7f76c884c000 r-xp 00000000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c884c000-7f76c8a4b000 ---p 0000c000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4b000-7f76c8a4c000 r--p 0000b000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4c000-7f76c8a4d000 rw-p 0000c000 fd:01 41 /lib64/libnss_files-2.12.so
7f76c8a4d000-7f76c8a52000 rw-p 00000000 00:00 0
7f76c8a6d000-7f76c8a6e000 rw-p 00000000 00:00 0
7fff72f53000-7fff72f68000 rw-p 00000000 00:00 0 [stack]
7fff72fff000-7fff73000000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
[root@kmaiti ~]#
--------------

See logical memory has started from "00400000" to "ffffffffff601000". Please note that each task has divided into 4KB pages here. So, do you think this is virtual?? No it's not at all. This logical memory allocation has on "swap" partition. In windows swap partiton has ".swap" extension.


Don't be confused with the "virtualization of the computer resources". Here os multiple images are running on one host machine and each VM or VPS looks like a original machine. Here we can say each VM or VPS is a virtual machine.


What's your opinion? Please share here! Don't take it as an ego! Just share your logical thinking and analysis! Your opinion is always appreciated!

TC :)
Read More
Posted in | No comments

Thursday, 20 January 2011

How to allow secure mail SMTP ports at the firewall?

Posted on 23:01 by Unknown
Guys,

Following iptables rules will allow server SMTPS incoming client request (open port 465) for server ip address "server_IP" :

----------
#iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d server_IP --dport 465 -m state --state NEW,ESTABLISHED -j ACCEPT
#iptables -A OUTPUT -p tcp -s server_IP --sport 465 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
----------


Note : Please replace the server_IP with your server's IP address where mail server has setup.

Try :)
Read More
Posted in | No comments

Monday, 17 January 2011

How to check the network driver on the linux machine?

Posted on 01:13 by Unknown
Ans :

=======================

#dmesg | grep eth0

o/p :

[root@kmaiti net]# dmesg | grep eth0
0000:00:19.0: eth0: (PCI Express:2.5GB/s:Width x1) f0:de:f1:27:4d:ad
0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection
0000:00:19.0: eth0: MAC: 9, PHY: 10, PBA No: a002ff-0ff
ADDRCONF(NETDEV_UP): eth0: link is not ready
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
0000:00:19.0: eth0: 10/100 speed: disabling TSO
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
0000:00:19.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
0000:00:19.0: eth0: 10/100 speed: disabling TSO
e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
0000:00:19.0: eth0: 10/100 speed: disabling TSO
[root@kmaiti net]

Here name of the network driver is : e1000e

Information about it :

#modinfo driver_name

op :

[root@kmaiti net]# modinfo e1000e
filename: /lib/modules/2.6.32-71.7.1.el6.x86_64/kernel/drivers/net/e1000e/e1000e.ko
version: 1.2.7-k2
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation,
srcversion: 93CB73D3995B501872B2982
. . . . . .. . . . . . .. . . .. .

===========================
PS :
List of network drivers on my machine :

--------
[root@kmaiti net]# pwd
/usr/src/kernels/2.6.32-71.7.1.el6.x86_64/drivers/net
[root@kmaiti net]# ls
appletalk atl1e can cxgb4 enic igb ixgbe Makefile pcmcia skfp usb wimax
arcnet atlx chelsio e1000 fs_enet igbvf ixgbevf mlx4 phy stmmac vmxnet3 wireless
arm benet cris e1000e hamradio irda ixp2000 myri10ge qlge tokenring vxge
atl1c bonding cxgb3 ehea ibm_newemac ixgb Kconfig netxen sfc tulip wan
[root@kmaiti net]#
--------

Try :)
Read More
Posted in | No comments

Sunday, 16 January 2011

How to increase the size of virtual memory on linux?

Posted on 10:37 by Unknown
Guys,

When a Linux system is initially set up, a swap partition is created on the hard drive that will be used as virtual memory in Linux, along with other partitions used for data.

Here are the steps to create the swap file :

======
#dd if=/dev/zero of=/mnt/swapfile bs=1M count=1024
#mkswap /mnt/swapfile
#swapon /mnt/swapfile
#echo "/mnt/swapfile none swap defaults 0 0" >> /etc/fstab
======

That's it :

Note : I shall discuss about the virtual memory(What exactly it is) and how kernel is creating virtual address space for a process before loading the process on the physical memory ie RAM(Primary memory). Just follow me...

Tc :)
Read More
Posted in | No comments

Wednesday, 12 January 2011

How to use tcpdump command to capture the network packet?

Posted on 21:30 by Unknown
1. Capture complete to tcp packets :


tcpdump -nnvXSs 1514 -c2 tcp


* host // look for traffic based on IP address (also works with hostname if you're not using -n)

# tcpdump host 1.2.3.4

* src, dst // find traffic from only a source or destination (eliminates one side of a host conversation)

# tcpdump src 2.3.4.5
# tcpdump dst 3.4.5.6

* net // capture an entire network using CIDR notation

# tcpdump net 1.2.3.0/24

* proto // works for tcp, udp, and icmp. Note that you don't have to type proto

# tcpdump icmp

* port // see only traffic to or from a certain port

# tcpdump port 3389
* src, dst port // filter based on the source or destination port

# tcpdump src port 1025
# tcpdump dst port 389

* src/dst, port, protocol // combine all three

# tcpdump src port 1025 and tcp
# tcpdump udp and src port 53

* Port Ranges // see traffic to any port in a range
tcpdump portrange 21-23

* Packet Size Filter // only see packets below or above a certain size (in bytes)
tcpdump less 32
tcpdump greater 128

[ You can use the symbols for less than, greater than, and less than or equal / greater than or equal signs as well. ]
// filtering for size using symbols
tcpdump > 32
tcpdump <= 128

Capture all Port 80 Traffic to a File

# tcpdump -s 1514 port 80 -w capture_file

Much important * :
--------------
Then, at some point in the future, you can then read the traffic back in like so:

Read Captured Traffic back into tcpdump

# tcpdump -r capture_file
-------------

Logical expression :
1. AND
and or &&
2. OR
or or ||
3. EXCEPT
not or !

TCP traffic from 10.5.2.3 destined for port 3389:

# tcpdump -nnvvS tcp and src 10.5.2.3 and dst port 3389

Traffic originating from the 192.168 network headed for the 10 or 172.16 networks:

# tcpdump -nvX src net 192.168.0.0/16 and dst net
10.0.0.0/8 or 172.16.0.0/16

Non-ICMP traffic destined for 192.168.0.2 from the 172.16 network:

# tcpdump -nvvXSs 1514 dst 192.168.0.2 and src net
172.16.0.0/16 and not icmp

Traffic originating from Mars or Pluto that isn't to the SSH port: // requires name resolution

# tcpdump -vv src mars or pluto and not dst port 22
=========

PS: Made it more available in the internet.
Read More
Posted in | No comments

First assembly programme on 64bit linux machine??

Posted on 21:27 by Unknown
Platform : x64 bit intel arch
Processor : intel core i5 processor
OS : RHEL6 linux
Compiler name : NASM
Assembly compiler src :

http://www.nasm.us/pub/nasm/releasebuilds/2.09.03/nasm-2.09.03.tar.gz

command
: nasm
====

Programme :
vi hello.asm
-----
section .data ;section declaration

msg db "Hello, world!",0xa ;our dear string
len equ $ - msg ;length of our dear string

section .text ;section declaration

;we must export the entry point to the ELF linker or
global _start ;loader. They conventionally recognize _start as their
;entry point. Use ld -e foo to override the default.

_start:

;write our string to stdout

mov edx,len ;third argument: message length
mov ecx,msg ;second argument: pointer to message to write
mov ebx,1 ;first argument: file handle (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel

;and exit

mov ebx,0 ;first syscall argument: exit code
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel

-----

and save it as hello.asm
====

Compiling :

-----
[root@kmaiti assembly_test]# nasm -f elf hello.asm
-----

Linking(making one executable file using object files) :

-----
$ ld -s -o hello hello.o

or

[root@kmaiti assembly_test]# ld -m elf_i386 -s -o hello hello.o

Execution :

[root@kmaiti assembly_test]# ./hello
Hello, world!
[root@kmaiti assembly_test]# pwd
/home/kmaiti/Downloads/assembly_test
[root@kmaiti assembly_test]# /home/kmaiti/Downloads/assembly_test/hello
Hello, world!
[root@kmaiti assembly_test]#
-----


PS: [root@kmaiti assembly_test]# ld -m elf_i386 -s -o hello hello.o // Here code has compatible on 32 bit machine. But to compile it on 64bit machine, I used emulator here for 32bit machine. It's "elf_i386". An emulator in computer sciences duplicates (provides an emulation of) the functions of one system using a different system, so that the second system behaves like (and appears to be) the first system.

Try :)
Read More
Posted in | No comments

How to create shared object file on linux ?

Posted on 21:19 by Unknown
Dynamically Linked "Shared Object" Libraries: (.so)

=============
How to generate a shared object: (Dynamically linked object library file.) Note that this is a two step process.

1. Create object code
2. Create library
3. Optional: create default version using a symbolic link.

Library creation example:

gcc -Wall -fPIC -c *.c
gcc -shared -Wl,-soname,libctest.so.1 -o libctest.so.1.0 *.o
mv libctest.so.1.0 /opt/lib
ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so
ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so.1


This creates the library libctest.so.1.0 and symbolic links to it.

Compiler options:

* -Wall: include warnings. See man page for warnings specified.
* -fPIC: Compiler directive to output position independent code, a characteristic required by shared libraries. Also see "-fpic".
* -shared: Produce a shared object which can then be linked with other objects to form an executable.
* -W1: Pass options to linker.
In this example the options to be passed on to the linker are: "-soname libctest.so.1". The name passed with the "-o" option is passed to gcc.
* Option -o: Output of operation. In this case the name of the shared object to be output will be "libctest.so.1.0"

Library Links:

* The link to /opt/lib/libctest.so allows the naming convention for the compile flag -lctest to work.
* The link to /opt/lib/libctest.so.1 allows the run time binding to work.

================
Compile main program and link with shared object library:

Compiling for runtime linking with a dynamically linked libctest.so.1.0:

gcc -Wall -I/path/to/include-files -L/path/to/libraries prog.c -lctest -o prog
Use:
gcc -Wall -L/opt/lib prog.c -lctest -o prog


Where the name of the library is libctest.so. (This is why you must create the symbolic links or you will get the error "/usr/bin/ld: cannot find -lctest".)
The libraries will NOT be included in the executable but will be dynamically linked during runtime execution.

List Dependencies:

The shared library dependencies of the executable can be listed with the command: ldd name-of-executable

Example: ldd prog

libctest.so.1 => /opt/lib/libctest.so.1 (0x00002aaaaaaac000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000003aa4e00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003aa4c00000)


Run Program:

* Set path: export LD_LIBRARY_PATH=/opt/lib:$LD_LIBRARY_PATH
* Run: prog
==============

Library Info(global sysmbols) using nm command :
[root@kmaiti assembly_test]# nm -D /lib64/libcap.so.2
w _Jv_RegisterClasses
0000003d4e0038b0 A __bss_start
U __ctype_b_loc
U __ctype_tolower_loc
w __cxa_finalize
U __errno_location
U __fxstat
w __gmon_start__
U __lxstat
---------------

Try :)
Read More
Posted in | No comments

How kernel invokes system call function on linux ?

Posted on 10:14 by Unknown
Guys,

I have mentioned the steps here so that you'll get an idea about the invoking of the system call.

============
1. Executing any command or task. Process has been generated.
2. Process calls library function in user space.
3. Library is consisted of different types of object files and object files contain "system call" function(s). Library also pushes arguments on the stack.
4. Library will issue syscall (int 0x80 / sysenter / ...)
5. Execution will switch to syscall context in kernel mode.
6. kernel will look up systemcall table and dispatch to respective function syscall function in the kernel will handle the syscall. Then result will be returned to the user space.
7. If task is related to any device, kernel will call the device driver (module or subroutine ) and in the mean time it'll send one interrupt to that device so that its driver can access it and process the desired operation and return the result to the kernel. The result will be ok or error and this will be returned to userspace.

Note : Here is the URL for system call table

----
http://bluemaster.iu.hio.no/edu/dark/lin-asm/syscalls.html
----

============

That's it.

Example : I have executed some commands at the user level to give an idea.

command : ls

===========
[root@kmaiti /]# ls //executed command
bin cgroup etc lib lost+found misc mounted NotBackedUp proc root selinux srv tmp var
boot dev home lib64 media mnt net opt remotehome sbin share sys usr VirtualMachines
[root@kmaiti /]# which ls
alias ls='ls --color=auto'
/bin/ls
[root@kmaiti /]# ldd /bin/ls //Depended libraries of the ls binary file
linux-vdso.so.1 => (0x00007fff06dff000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003d45a00000)
librt.so.1 => /lib64/librt.so.1 (0x0000003d44e00000)
libcap.so.2 => /lib64/libcap.so.2 (0x0000003d4de00000)
libacl.so.1 => /lib64/libacl.so.1 (0x0000003929a00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003d43e00000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003d44600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d43a00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d44200000)
libattr.so.1 => /lib64/libattr.so.1 (0x0000003d54600000)

[root@kmaiti /]# strace ls //Tracing the system call functions
execve("/bin/ls", ["ls"], [/* 27 vars */]) = 0
brk(0) = 0x2618000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7c8998d000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=108955, ...}) = 0
mmap(NULL, 108955, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7c89972000
close(3) = 0
open("/lib64/libselinux.so.1", O_RDONLY) = 3 //SEE HERE ONE LIBRARY HAS BEEN CALLED
. . . .. . . . .. . . . .. . . . . .. . ..

Here execve, mmap, open, access, fstat, close all are system call functions.

Example of 4th step using assembly language (I am showing how kernel has been called ):

Program : printing "Hello, world!"

--------
[root@kmaiti assembly_test]# cat hello.asm
section .data ;section declaration

msg db "Hello, world!",0xa ;our dear string
len equ $ - msg ;length of our dear string

section .text ;section declaration

;we must export the entry point to the ELF linker or
global _start ;loader. They conventionally recognize _start as their
;entry point. Use ld -e foo to override the default.

_start:

;write our string to stdout

mov edx,len ;third argument: message length
mov ecx,msg ;second argument: pointer to message to write
mov ebx,1 ;first argument: file handle (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel

;and exit

mov ebx,0 ;first syscall argument: exit code
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel

[root@kmaiti assembly_test]# ./hello
Hello, world!
[root@kmaiti assembly_test]#

--------

See kernel has been called at the last line.

===========


Check it out and let me know if you want to suggest anything here :) I appreciate you in advance.

Take care :)
Read More
Posted in | No comments

Thursday, 6 January 2011

How to install video player(real player) on linux system?

Posted on 23:30 by Unknown
Guys,

You can install real player on the linux machine to play the video files. Please install the package. You'll get it from here.

======
http://www.real.com/realplayer/download
======

Install the rpm like :

rpm -ivh rpm_name. You can install using auto installer.

Then go to "application >> sound & video >> find the real player.

Select the video file and enjoy it.

Try :)
Read More
Posted in | No comments

How to install mplayer on linux machine?

Posted on 23:00 by Unknown
Guys,

mplayer can be used to watch video files on linux machine. You can download the software using svn(subversion) tool. Just make it sure that svn has installed on the machine(check like : which svn). If it's there then stop the firewall and follow to compile the mplayer package. If svn is not present on the machine please install it first. Please refer the following URL to do the same :

-------------
http://kmaiti.blogspot.com/2011/01/how-to-install-subversion-svn-on-linux.html
-------------

Environment : RHEL 6, 64 bit OS
Kernel : 2.6.32-71.7.1.el6.x86_64


Then once svn is there, please refer the following steps to install the mplayer.

-------------
root@server[] cd /usr/local/src

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

root@server[] cd mplayer

root@server[] svn update

root@server[]./configure

root@server[] make

root@server[] make install
-------------

O/P on my mc :

------------
[root@kmaiti mplayer]# mplayer -v
Creating config file: /root/.mplayer/config
MPlayer SVN-r32769-4.4.4 (C) 2000-2010 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 11
CPU: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz (Family: 6, Model: 37, Stepping: 5)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
------------

PS : You may get following error during executing ./configure.

----
[root@kmaiti mplayer]# ./configure
No FFmpeg checkout, press enter to download one with git or CTRL+C to abort

./configure: line 53: git: command not found
Failed to get a FFmpeg checkout
-----

Just install ffmpeg like :

-----
[root@kmaiti mplayer]# yum -y install git ffmpeg
----

Try :)
Read More
Posted in | No comments

configure: error: could not find library containing RSA_new

Posted on 04:03 by Unknown
Guys,

It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL option.

Example (configuring neon, needed to install svn) :

With SSL :
--------
cd ../neon
./configure --enable-shared --prefix=$HOME \
--with-libs=$HOME --with-ssl
--------

Without SSL :

--------
cd ../neon
./configure --enable-shared --prefix=$HOME \
--with-libs=$HOME
--------

try :)
Read More
Posted in | No comments

How to install subversion (svn) on linux ?

Posted on 03:32 by Unknown
Guys,

I have referred the second procedure to install svn on my rhel6 mc.

Procedure 1 :
=========
cd /usr/local/src/

wget http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.5.tar.gz
wget http://www.sqlite.org/sqlite-3.5.2.tar.gz

tar xzf subversion-1.4.5.tar.gz
tar xzf subversion-deps-1.4.5.tar.gz
tar xzf sqlite-3.5.2.tar.gz

cd sqlite-3.5.2
./configure
make
make install

cd ../subversion-1.4.5
./configure
make
make install
================


Note : If above one doesn't work please refer the following steps :


Procedure 2 :


================
wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
tar -xzvf subversion-1.4.6.tar.gz
tar -xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6

cd apr
./configure --enable-shared --prefix=$HOME
make && make install

cd ../apr-util
./configure --enable-shared --prefix=$HOME \
--with-expat=builtin --with-apr=$HOME \
--without-berkeley-db
make && make install

cd ../neon
./configure --enable-shared --prefix=$HOME \
--with-libs=$HOME
make && make install

./configure --prefix=$HOME --without-berkeley-db \
--with-editor=/usr/bin/vim --with-apr=$HOME \
--with-apr-util=$HOME --with-neon=$HOME \
--without-apxs --without-apache
make && make install

check :

which svn
svn --version
================

Try :)
Read More
Posted in | No comments

Wednesday, 5 January 2011

How to install ksar on linux machine?

Posted on 01:20 by Unknown
Guys,

To view the system activities on a graph of linux machine, you need to install ksar package. Just download the package and execute "sh run.sh" command inside that downloaded directory on konsole. It'll open java applet and run the local command at "Data" option. That's it.


Source file of the package :

==========
http://sourceforge.net/projects/ksar/files/ksar/5.0.6/kSar-5.0.6.zip/download?use_mirror=biznetnetworks
==========

Try :)
Read More
Posted in | No comments

Tuesday, 4 January 2011

How to configure tata photon + on linux machine + rdehat

Posted on 09:27 by Unknown
Guys,

Please read the article before proceeding to configure the USB modem.

==============
[root@kmaiti ~]# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
^RSSILVL: 60
--> Sending: ATQ0
ATQ0
OK
--> Re-Sending: ATZ
ATZ
OK
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
ERROR
--> Invalid dial command.
==============

I got the above error message during executing the "wvdial" command to configure the Tata Photon+ EC1261 USB modem with the RHEL6 linux machine. The error usually throws if your modem isn't activated. You need to first activate it. I spent 3-4 hrs to activate it on my linux machine but I was unable to do that since I needed to dial *228. But there was no such option on linux either at GUI or at command prompt. So, my basic concept is I have to activate it at the windows machine. That I did on my friend's machine. Then I just connect the modem to my laptop. Then executed "wvdial" command. It was automatically connected the modem and it had shown two DNS IP addresses. I added those IP in the /etc/resolve.com file. Then I successfully browsed the google.com and other sites. So, /etc/resolve.conf file looks :

----------------
[root@kmaiti ~]# cat /etc/resolv.conf
#@VPNC_GENERATED@ -- this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
# Generated by NetworkManager
search csb redhat.com


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
nameserver 10.11.255.156
nameserver 10.7.142.21
[root@kmaiti ~]#
----------------

Execution of the wvdial command :

===============
[root@kmaiti ~]# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Tue Jan 4 14:03:23 2011
--> Pid of pppd: 9827
--> Using interface ppp0
--> pppd: =
--> pppd: =
--> pppd: =
--> pppd: =
--> local IP address 59.161.2.155
--> pppd: =
--> remote IP address 172.29.243.145
--> pppd: =
--> primary DNS address 121.242.190.180
--> pppd: =
--> secondary DNS address 121.242.190.210
--> pppd: =


^CCaught signal 2: Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: =
--> Connect time 16.2 minutes.
--> pppd: =
--> pppd: =
--> Disconnecting at Tue Jan 4 14:19:31 2011
[root@kmaiti ~]#
===============

So, first activate the modem with your service provider and then refer the following steps to configure the modem on your linux machine :

===============
1. Connect / Plug your photon+ to the system and wait till it gets ditected.
2. Open a terminal, run a command "dmesg" and check it is showing the modem name as HUAWEI.
3. Run another command "sudo wvdial" and it will create a config file in /etc/wvdial.conf, something like shown below.
(if u don't have wvdial, you can download it from open.alumnit.ca)

by running "cat /etc/wvdial.conf"
or you can edit it using the command "vi /etc/wvdial.conf"

#
[Dialer Defaults]
Modem = /dev/modem
Baud = 115200
Modem Type = Analog Modem
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
[Dialer info]
Init9 = AT&V
[Dialer photon+]
Modem = /dev/modem
Baud = 115200
Modem Type = Analog Modem
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Phone =#777
Username = internet //You need to set this during activating the modem on windows m/c.
Password = internet //
Auto DNS = off
#

Note : Here is the exact content on my machine.

----------
[root@kmaiti ~]# cat /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
; Phone =
ISDN = 0
; Username =
; Password =
;Phone = 9345675190
Phone = #777
Modem = /dev/ttyUSB2
Username = lovely
Password = lovely
Baud = 9600
Dial Command = ATDT
New PPPD = yes
stupid Mode = 1
[root@kmaiti ~]#
----------

Some of the field may be already filled.

4. In terminal, connect by "wvdial" and don't cancel it. Then add the dns IP at resolve.conf file and save them. Now browse the pages.
===============

Try :)
Read More
Posted in | No comments

ATDT#777 ERROR --> Invalid dial command

Posted on 09:24 by Unknown
Guys,

==============
[root@kmaiti ~]# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
^RSSILVL: 60
--> Sending: ATQ0
ATQ0
OK
--> Re-Sending: ATZ
ATZ
OK
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
ERROR
--> Invalid dial command.
==============

I got the above error message during executing the "wvdial" command to configure the Tata Photon+ EC1261 USB modem with the RHEL6 linux machine. The error usually throws if your modem isn't activated. You need to first activate it. I spent 3-4 hrs to activate it on my linux machine but I was unable to do that since I needed to dial *228. But there was no such option on linux either at GUI or at command prompt. So, my basic concept is I have to activate it at the windows machine. That I did on my friend's machine. Then I just connect the modem to my laptop. Then executed "wvdial" command. It was automatically connected the modem and it had shown two DNS IP addresses. I added those IP in the /etc/resolve.com file. Then I successfully browsed the google.com and other sites. So, /etc/resolve.conf file looks :

----------------
[root@kmaiti ~]# cat /etc/resolv.conf
#@VPNC_GENERATED@ -- this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
# Generated by NetworkManager
search csb redhat.com


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
nameserver 10.11.255.156
nameserver 10.7.142.21
[root@kmaiti ~]#
----------------

Execution of the wvdial command :

===============
[root@kmaiti ~]# wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Tue Jan 4 14:03:23 2011
--> Pid of pppd: 9827
--> Using interface ppp0
--> pppd: =
--> pppd: =
--> pppd: =
--> pppd: =
--> local IP address 59.161.2.155
--> pppd: =
--> remote IP address 172.29.243.145
--> pppd: =
--> primary DNS address 121.242.190.180
--> pppd: =
--> secondary DNS address 121.242.190.210
--> pppd: =


^CCaught signal 2: Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: =
--> Connect time 16.2 minutes.
--> pppd: =
--> pppd: =
--> Disconnecting at Tue Jan 4 14:19:31 2011
[root@kmaiti ~]#
===============

So, first activate the modem with your service provider and then refer the following steps to configure the modem on your linux machine :

===============
1. Connect / Plug your photon+ to the system and wait till it gets ditected.
2. Open a terminal, run a command "dmesg" and check it is showing the modem name as HUAWEI.
3. Run another command "sudo wvdial" and it will create a config file in /etc/wvdial.conf, something like shown below.
(if u don't have wvdial, you can download it from open.alumnit.ca)

by running "cat /etc/wvdial.conf"
or you can edit it using the command "vi /etc/wvdial.conf"

#
[Dialer Defaults]
Modem = /dev/modem
Baud = 115200
Modem Type = Analog Modem
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
[Dialer info]
Init9 = AT&V
[Dialer photon+]
Modem = /dev/modem
Baud = 115200
Modem Type = Analog Modem
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Phone =#777
Username = internet //You need to set this during activating the modem on windows m/c.
Password = internet //
Auto DNS = off
#

Note : Here is the exact content on my machine.

----------
[root@kmaiti ~]# cat /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
; Phone =
ISDN = 0
; Username =
; Password =
;Phone = 9345675190
Phone = #777
Modem = /dev/ttyUSB2
Username = lovely
Password = lovely
Baud = 9600
Dial Command = ATDT
New PPPD = yes
stupid Mode = 1
[root@kmaiti ~]#
----------

some of the field may be already filled.

4. In terminal, connect by "wvdial" and don't cancel it. Then add the dns IP at resolve.conf file and save them. Now browse the pages.
===============

Try :)
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • Details about NFS timeout on Red Hat Enterprise Linux 5
    There are two mount options for timeouts of an NFS request. # timeo: a timeout value. the unit is 1/10 seconds. # retran...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • How to configure NFSv4 with kerberos on linux?
    Guys, Please refer the following steps to do the same : Used Environment : kerberos(i.e NFSv4) server : RHEL 5.5, 64 bit arch NFS client : R...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...
  • How to redirect tomcat log to syslog server?
    I assume that you are going to use log4j tool to log the tomcat messages. In order to redirect these messages in syslog file, you should mod...
  • What is "WCHAN" attribute at "ps -alwww" on linux ?
    WCHAN : Name of the kernel function in which the process is sleeping, a "-" if the process is running, or a "*" if the p...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ▼  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ▼  January (15)
      • "Virtual Memory is NOT Virtual"...kamal maiti
      • How to allow secure mail SMTP ports at the firewall?
      • How to check the network driver on the linux machine?
      • How to increase the size of virtual memory on linux?
      • How to use tcpdump command to capture the network ...
      • First assembly programme on 64bit linux machine??
      • How to create shared object file on linux ?
      • How kernel invokes system call function on linux ?
      • How to install video player(real player) on linux ...
      • How to install mplayer on linux machine?
      • configure: error: could not find library containin...
      • How to install subversion (svn) on linux ?
      • How to install ksar on linux machine?
      • How to configure tata photon + on linux machine + ...
      • ATDT#777 ERROR --> Invalid dial command
  • ►  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.