Monday, December 18, 2006

Quenix project started again

Yesterday I move to Safura Tower from Stitel for the Quenix project.

From today the project is starting again after being stop about 1 year (8-9 months).

startx.....

Sunday, September 10, 2006

Success in Asterisk Clustering




HA

Provide a high-availability (clustering) solution for Linux which promotes reliability, availability, and serviceability (RAS) through a community development effort.

from: http://asteriskprojects.com/?page_id=4


ha.cf
------------------------------------------------------------
logfacility local0
keepalive 2
deadtime 20
warntime 10
initdead 70
udpport 694
#baud 19200
#serial /dev/ttyS0 # Linux
bcast eth1 # Linux
#ucast eth1 192.168.43.12
auto_failback on
#stonith_host * baytech 10.0.0.3 mylogin mysecretpassword
#stonith_host ken3 rps10 /dev/ttyS1 kathy 0
#stonith_host kathy rps10 /dev/ttyS1 ken3 0

#set kernel "nowayout=0" for that
#watchdog /dev/watchdog
node asterisk1.local asterisk2.local
--------------------------------------------------------------

haresources
--------------------------------------------------------------
asterisk1.local 192.168.22.99/24/eth0 drbddisk::shared Filesystem::/dev/drbd0::/share::ext3 drbdlinks mysqld sendmail asterisk httpd munin-node vsftpd ircd xplhub amportal xinetd
--------------------------------------------------------------

drbd.conf
--------------------------------------------------------------
global {
}

resource "shared" {
protocol C;
incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";
startup {
wfc-timeout 0; ## Infinite!
degr-wfc-timeout 120; ## 2 minutes.
}
disk {
on-io-error detach;
}
net {
# timeout 60;
# connect-int 10;
# ping-int 10;
# max-buffers 2048;
# max-epoch-size 2048;
}
syncer {
rate 10M;
group 1;
}

on asterisk1.local {
device /dev/drbd0;
disk /dev/sda4;
address 192.168.43.11:7789;
meta-disk internal;
}

on asterisk2.local {
device /dev/drbd0;
disk /dev/hda4;
address 192.168.43.12:7789;
meta-disk internal;
}
}

--------------------------------------------------------------

authkeys
--------------------------------------------------------------
auth 1
1 crc
#2 sha1 HI!
#3 md5 Hello!
--------------------------------------------------------------

Saturday, September 09, 2006

Got Gemei X-120 mp4

Got Gemei X-120 mp4 from my Father as a gift.
:)

Sunday, September 03, 2006

Success in OpenNMS


Today I setup OpenNMS in Debian sarge

/etc/apt/source/list
deb http://debian.opennms.org/ debian/opennms stable

# apt-get install java-common
# apt-get install sun-jdk1.4-installer
# build-sun-jdk14 ./j2sdk-1_4_2_05-linux-i586.bin
# dpkg -i j2sdk-1_4_2_05-linux-i586.deb

java-virtual-machine meta-package
# apt-get install java-virtual-machine

#apt-get install tomcat4 tomcat4-admin tomcat4-webapps

# apt-get install rrdtool
# apt-get install mrtg

/etc/postgresql/postgresql.conf

tcpip_socket = true
shared_buffers = 1024

/etc/postgresql/pg_hba.conf
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust


#apt-get install opennms opennms-common opennms-contrib opennms-db opennms-server opennms-webapp


Search for a JRE (suggested)
#cd /usr/share/opennms/bin
#./runjava -s

Run the Installer to Setup the PostgreSQL Database
#cd /usr/share/opennms/
#install -disU

Run the Installer to Setup the Web Application
#cd /usr/share/opennms/
# ./install -w /var/lib/tomcat4/webapps -W /var/lib/tomcat4/server/lib


edit /usr/share/opennms/etc/discovery-configuration.xml

include-range retries="2" timeout="3000"
begin 192.168.0.1 begin
end 192.168.0.254 end


start or restart

# /etc/init.d/postgres start
# /etc/init.d/tomcat4 start
# /etc/init.d/opennms start


http://opennms_installed_pc_ip:8180/opennms/

The initial user name is "admin" and the password is "admin".
(note: 8180 for debian)
(other Linux http://host:8080/opennms/)


edit capsd-configuration.xml for the service your want to monitor

capsd-configuration.xml
==============
scan="on"

example:
protocol-plugin protocol="Postgres" class-name="org.opennms.netmgt.capsd.TcpPlugin" scan="on" user-defined="false"
==============

your can finish here if u do not want to enable snmp & notification.


Enable SNMP in a server that you want to monitor. Then...

edit datacollection-config.xml to enable more monitoring graph in opennms.

datacollection-config.xml
===============
snmp-collection name="default"
maxVarsPerPdu = "50"
snmpStorageFlag = "all"
rrd step = "300"
===============


edit the snmp-config.xml to track servers with snmp

snmp-config.xml
==========
specific 192.168.25.32 specific
range begin="192.168.25.1" end="192.168.25.254"
==========


edit poller-configuration.xml

poller-configuration.xml
===============
status="on"

example:
service name="SMTP" interval="300000" user-defined="false" status="on"
===============


edit notifd-configuration.xml to enable notification
==============================
status="on"

example:
notifd-configuration
status="on"
pages-sent="SELECT * FROM notifications"
next-notif-id="SELECT nextval('notifynxtid')"
next-group-id="SELECT nextval('notifygrpid')"
==============================


edit javamail-configuration.properties for mail notification

javamail-configuration.properties
====================
# Properties are defined but commented out indicating the default values.
# This property defines system sender account.
#
# The default setting is root@[127.0.0.1]
#org.opennms.core.utils.fromAddress=root@localhost

#
# This property defines SMTP Host.
#
org.opennms.core.utils.mailHost=smtp.xyz.net
org.opennms.core.utils.mailer=smtpsend
org.opennms.core.utils.transport=smtp
org.opennms.core.utils.debug=true
#
# This property defines Mail authentication.
# The default setting is false
#org.opennms.core.utils.authenticate=false
#org.opennms.core.utils.authenticateUser="opennms"
#org.opennms.core.utils.authenticatePassword="opennms"

# This property controls the use of the JMTA, the
# default is true
#org.opennms.core.utils.useJMTA=true
==========================

set the email address via opennms visual configuration to receive emails.


done :)

Thursday, August 31, 2006

Wifi in debian

Today I configure Asus Spacelink WL-167g USB2 adapter in debian sid


"Asus Spacelink WL-167g USB2 adapter" which works with the
rt2570 driver, the sources of which can be downloaded on the RALINK website.

more


#apt-get install rt2570-source
#module-assistant

then it will build the rt2570-modules-2.6.17-2-686 (if u use kernel 2.6.17)

#modprobe rt2570

my /etc/network/interfaces
--------------------------
auto eth1
iface eth1 inet dhcp
wireless-essid your_ID
wireless-mode managed
wireless-key your_secret_key
--------------------------

Monday, July 24, 2006

allbn2unicode

i have started a project called allbn2unicode


#include stdio.h
#include stdlib.h
#include string.h
#include wchar.h
#include locale.h
#include langinfo.h

int main(int argc, char *argv[])
{
FILE *fp;
FILE *fp2;
wchar_t wr[80];
wchar_t *wca;
wchar_t hex,*hex2;
char str[80],*store;
int i,len;

/* set locale for bangla */
setlocale(LC_ALL, "bn_BD.UTF-8");

store = str;

wca = wr;

if(argc!=3){
printf("name \n");
exit(1);
}

if((fp = fopen(argv[1], "r")) == NULL) {
printf("Cannot open file.\n");
exit(1);
}

fgetws(wca, 100, fp);

/* if(fread(store,sizeof(store),1, fp) !=1) {
printf("Cannot open file.\n");
exit(1);
} */

/* optional for asci file mbstowcs(wca, store,20);*/

fclose(fp);

if((fp2 = fopen(argv[2], "wb")) == NULL) {
printf("Cannot write file.\n");
}

if(wr[0]==0x0985)
{
hex=0x0987;
}
else

hex=0x0985;

fputws(wca,fp2);

fclose(fp2);

return 0;
}

Friday, July 07, 2006

Install Solaris

Today i install Solaris 10

Cool OS but there was problem in my internet config

my this config was oky
/etc/hosts
/etc/defaultgateway

there was a little problem in
(i have no resolv.conf)
/etc/resolv.conf
(later i add nameserver)

and

cp /etc/nsswitch.dns /etc/nsswitch.conf

for restart network
/etc/init.d/inetsvc stop
/etc/init.d/inetsvc start

source: http://www.computing.net/solaris/wwwboard/forum/4219.html


Later i add debian in /etc/grub/menu.list

title Debian GNU/Linux, kernel 2.6.8-2-386
root (hd0,7)
kernel /boot/vmlinuz-2.6.8-2-386 root=/dev/hda8 ro
initrd /boot/initrd.img-2.6.8-2-386
savedefault
boot


to boot my debian

Monday, May 01, 2006

my frist ACM solve

problem 100

#include stdio.h


int calc (unsigned long int i, unsigned long int j, unsigned long int f);

int
main (void)
{
unsigned long int i, j, f;
while(scanf ("%lu", &i)==1)
{
if (!(0 < i && i < 1000000))
{
scanf ("%lu", &i);
}
scanf ("%lu", &j);
if (!(0 < j && j < 1000000)) {
scanf ("%lu", &j);
}
printf ("%lu\t %lu\t", i, j);
if (i > j)
{
f = i - j;
f = f + 1;
}
else
{
f = j - i;
f = f + 1;
}
calc (i, j, f);
}
return 0;
}

int calc (unsigned long int i, unsigned long int j, unsigned long int f)

{
unsigned long int m, k = 1, n = 0;
unsigned long int l[f];
unsigned long int p;

if (i > j)
{
p = i - j;
p = p + 1;
for (; j <= i; j++)
{
for (m = j; m > 1;)
{
if (m % 2 == 0)
m = m / 2;
else
m = 3 * m + 1;
k = k + 1;
}
l[n] = k;
n = n + 1;
k = 1;
}
}
else
{
p = j - i;
p = p + 1;
for (; i <= j; i++)
{
for (m = i; m > 1;)
{
if (m % 2 == 0)
m = m / 2;
else
m = 3 * m + 1;
k = k + 1;
}
l[n] = k;
n = n + 1;
k = 1;
}
}
p = p-1;
for (n = 0; n < p; n++)
{
if (l[n] > l[n + 1])
{
l[n + 1] = l[n];
}
}
printf ("%lu\n", l[p]);
}

Sunday, March 26, 2006

EDGE/GPRS in Linux

Today me (salahuddin66) and Lavluda successfully configured GPRS/EDGE in Linux.

Using wvdial

to check your mobile/modem as a modem
-------------------------------
#wvdialconf

it will generate /etc/wvdial.conf file for you.

Grameen Phone
For Grameen Phone your need to add

Init3 = AT+CGDCONT=1,"IP","gpinternet"
here is a sample of my /etc/wvdial.conf (Grameen Phone EDGE/GPRS)
------------------------------------------------------------
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","gpinternet"
Modem Type = Analog Modem
ISDN = 0
Phone = *99***1#
Modem = /dev/ttyUSB0
Username = xyz
Password = xyz
Baud = 115200
-----------------------------------------------------------
wvdialconf will generate the modem speed/Baud and /dev/xyz path according to your mobile phone


Aktel, Teletalk
here is a sample of my /etc/wvdial.conf
------------------------------------------------------------
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
Phone = *99***1#
Modem = /dev/ttyUSB0
Username = xyz
Password = xyz
Baud = 115200
-----------------------------------------------------------
wvdialconf will generate the modem speed/Baud and /dev/xyz path according to your mobile phone

Start
To start type wvdial in shell

Note:
If you have problem while generating wvdial.conf file in /etc/wvdial.conf then delete the old config file /etc/wvdial.conf and give wvdialconf to create a new configuraton file.

if you have any problem to find the /dev path for your mobile/modem, give
# tail -f /var/log/syslog
Then connect the phone/modem.
You can also use gnome-ppp or other ppp tools to connect.




Using gnome-ppp



Give phone number *99***1#




click on the detect. it will try to detect your phone/modem.
note: If it fails then give your /dev path manually. Search for you modem using #tail -f /var/log/syslog then connect the phone/modem.




it found my phone/modem in /dev/ttyUSB0




click Init Strings.
for Aktel, Teletalk and others (you do not need to change anything)




click Init Strings.
add Init3 only if you are using Grameen Phone EDGE/GPRS (only for GP)





after click connect








connected




details view


Note: If you face any problem using this as user. Run gnome-ppp as root
or check you are a member of dip group.

In
Debian or Ubuntu based distro give #adduser your_user_name dip if your are not a member.

Friday, March 24, 2006

Bought Siemens SK65

Today i have bought Siemens SK65



from Basundhara City. With Niripiti and ZBZ.

Thursday, March 02, 2006

New Office

Today we The Quenix Development Team move to our new office in Stitle in Bashoti Building from Safura Tower

Tuesday, February 28, 2006

all2theora

here is my all2theora script

(Thanks to my friend Zaher for fixing the Divx problem "-vf harddup")
(based on Florian Schilhabel dvd2divx script Licence: GPL)

#!/usr/bin/perl

use Getopt::Long;

GetOptions( "help" => \$help,
"i=s" => \$input,
"divx=s" => \$divx, );

if ($help) {
print "Welcome to the ALL2theora Helper Script\n";
print "\n";
print "this script encodes a all file to theora\n";
print "Usage:\n";
print "--help show this text\n";
print " this will only be possible if you are root\n";
print "--i Specify the Name of your Video file\n";
exit;
}

if ($input eq "") {
print "No Input file selected - You must specify one with: --i filename.\n";
print "\n";
print "this script encodes a all file to theora\n";
print "Usage:\n";
print "--help show this text\n";
print " this will only be possible if you are root\n";
print "--i Specify the Name of your Video file\n";
exit;
}

if ($divx eq "on") {

system ("mkfifo stream.yuv && chmod 777 stream.yuv && mencoder $input -ovc lavc -oac copy -o tmp.avi -lavcopts vcodec=mpeg1video:vbitrate=1200 -vf harddup -of mpeg && mplayer -vc dummy -vo null -ao pcm:file=stream.wav tmp.avi && encoder_example stream.wav stream.yuv > theora.ogg | mplayer -ao null -nosound -vo yuv4mpeg tmp.avi - 1>/dev/tty7 8>/dev/tty7 && rm stream.yuv && rm stream.wav && rm tmp.avi");
exit;
}

if ($divx eq "off") {
system ("mkfifo stream.yuv && chmod 777 stream.yuv && mplayer -vc dummy -vo null -ao pcm:file=stream.wav $input && encoder_example stream.wav stream.yuv > theora.ogg | mplayer -ao null -nosound -vo yuv4mpeg $input - 1>/dev/tty7 8>/dev/tty7 && rm stream.yuv && rm stream.wav");
exit;
}

if ($divx eq "") {
system ("mkfifo stream.yuv && chmod 777 stream.yuv && mplayer -vc dummy -vo null -ao pcm:file=stream.wav $input && encoder_example stream.wav stream.yuv > theora.ogg | mplayer -ao null -nosound -vo yuv4mpeg $input - 1>/dev/tty7 8>/dev/tty7 && rm stream.yuv && rm stream.wav");
exit;
}

print "Video Filename: $input\n";
print "working...\n";

exit;

Licence: GPL

Wallpaper for Music



Music

download it from
deviantart.com
Licence: GPL

Wallpaper for Open Source



Open Source

i have designed it in a week.

download it from
www.kde-look.org
Licence: GPL

Inspiration to a be a designer



linux_blue


This wallpaper was my inspiration to a be a designer. I have created it using inkscape.

This was the default wallpaper of OnebaseGo 2.0 Preview1 (www.onebaselinux.org)

download it from
www.kde-look.org
Licence: GPL

Monday, February 27, 2006

booting tty1


Starting my blog.

I am Salahuddin Pasha (salahuddin66)


myself

I was born in Bogra but i spend my childhood in Chittagong, now living in Dhaka
in Bangladesh

I like Open Source, GNU, FSF, Hurd


now i am

working as a Graphics Designer in Texas Group
a student of American International University Bangladesh AIUB in CSE
working in Ankur Bangla