/usr/sbin/tethereal -i lo -nx -f 'port 5050' > /tmp/ASN/tcp2asn_test || best run command
/usr/sbin/tethereal -i bond0 -VVVnx -f "port 5050 and ip host 10.144.165.167" > /tmp/ASN/tcp
diff -uNr tracer_sms.c tracer_sms.c.new
// CVS Commands
373 cvs ci testUT_*.c
394 cvs update
cvs co -r V1_2 asn // to get the version of asn reffered as V12
setting tab in vi
set tabstop=2
core generation problem
1162 ulimit
1163 ulimit -a
1164 ulimit -c unlimited
GRANT ALL ON test_db7.* TO kathir@localhost IDENTIFIED BY "kathir";
In order to run a simple file using gdb to see all its contents , you can do like this
1. compile it with gcc -g options using following comman
gcc -g
2. run gdb like this
gdb filename
3. now you can analyse, it using break points, incase you need command line argumane, set it at run time.
run
set args -i 1
where
i b
d b
make -f makefile
// Make file arguments
g++ -L/usr/local/mysql/lib -I/usr/local/mysql/include MySqlInsert.cpp
-o MySqlInsert -lm -lnsl -lmygcc -lmysqlclient -lz
// mkesarwani|kumar1606
// how to open multiple files in vi
find . -name Makefile | xargs vi
// date change in linux
[root@Linux1 root]# date
Mon Nov 1 12:43:45 IST 2004
[root@Linux1 root]# date 11011130
Mon Nov 1 11:30:00 IST 2004
[root@Linux1 root]# date 11021130
Tue Nov 2 11:30:00 IST 2004
// backup process
drop database test;
use mysql show databases;
create database test;
use test
source /home/anands/test_mysql.sql;
mysqld-opt -u root
mysql -u bugs -h localhost test -p // for linux
mysqld-max-nt --console --standalone
\mysql\bin\mysqld --install
\mysql\bin\mysqladmin -u root shutdown
./mysqladmin -u root -h 192.168.0.201 shutdown -p
mysql\bin\mysqld --remove
mysql -h localhost -u root -p // connect to the database
mysql:
from '/usr/local/mysql/bin'
./safe_mysqld -O max_allowed_packet=1M &
/usr/local/mysql/bin/safe_mysqld -O max_allowed_packet=1M &
mysql -u bugs -p
// To run sip server on local machine
sipp -sn uas -i 192.168.0.20 -p 5063
// To run sip client on linux server
./sipp -sn uac 192.168.0.20:5063 -i 192.168.0.201 -p 5060 -d 30000 -r 100 -rp 60000 -l 200 -s yus -m 1000
(server ip:port) -i local Ip, -p local port
sipp -sn uac 192.168.0.15 -i 192.168.0.20 -p 5063 -d 30000 -r100 -rp 60000 -l 200 -s yus -m 1000
h
sipp -sn uac 192.168.0.15 -i 192.168.0.20 -p 5070 -d 100 -r 10 -trace_msg -l 1 -s anands
sipp -sn uac 192.168.0.15 -i 192.168.0.20 -p 5060 -d 10000 -r 1 -trace_msg -l 1 -s anands
./sipp -sn uac 192.168.0.15 -i 192.168.0.201 -p 5060 -d 10000 -r 1 -trace_msg -l 1 -s sjain
// Running sip phones
sipomatic -u sip:sjain@192.168.0.201
Message:Found /dev/dsp.
| INFO1 |
| INFO1 |
Message:Starting using url sip:sjain@192.168.0.201
///////////////////////////////
// tells about the content of libraby
ar t libabc.a
nm -s libabc.a
////////////////////////////////
Bugzill commands
Start and stop apache
linux : from root
cd /opt/apache/bin/
apachectl -f /opt/apapche/conf/httpd.conf
Stop
cd /opt/apache/bin/
apachectl -k stop
/etc/init.d/named restart
/etc/init.d/xinetd restart
/etc/init.d/sendmail restart
////////////////// regular commands for mpe /////////////////////
Add default in route
/sbin/route add default gw 192.168.0.1
/sbin/route del default gw 192.168.0.1
set filec
set history=600
setenv $path /usr/local/lib
find . | grep "libACE.so"
ls -l | grep "libACE.so"
apache related
to start
linux : from root
cd /opt/apache/bin/
apachectl -f /opt/apapche/conf/httpd.conf
Stop
cd /opt/apache/bin/
apachectl -k stop
Sun Solaris : from root
cd /usr/apache/bin/
./apachectl start
Stop
cd /opt/apache/bin/ ndnd
./apachectl stop
location of erroe_log is /var/apache/log/error_log
Reboot sun
1. shutdown -i6
Reboot Linux
/sbin/shutdown -r 1
2. sync;sync;sync
sync reboot
grep -l "opf" *
grep -n -C 3
grep include *.h
22 gzip -d ACE-5.2.2-lib.tar.gz
24 tar -xvf ACE-5.2.2-lib.tar
28 rm *.tar
29 clear
30 ls
31 cd ACE_wrappers
32 cd ace
33 ls
34 ls config*
35 ln -s config-sunos5.8.h config.h
36 cd ..
37 cd include/makeinclude
38 clear
39 l
40 s
41 ls
42 ln -s platform_sunos5_g++.GNU platform_macros.GNU
43 ls -l platform_macros
44 ls -l platform_macros.GNU
45 cd
46 clear
47 ls
48 cd Agilis
49 ls -al
50 history
admintool
sync;sync;sync
sync reboot
redhat-config-users
copy command user
cp ~styagi/Agilis/lib/libACE.so .
to know the pid of any pocess, for example loop in this case
ps -o pid= -C loop
ps -eo pid,pcpu,args | sort +1n
ps -eo pid,vsz,args | sort +1n
crontab cron.txt
crontab - r // toremove your attached script
A few ftp commands
ftp: ftp session prompt
open {IP_Address} : login also give password
lcd . : Tells current directory in window machine
lcd /dir_name : will go to dir name if exists
mput * : will copy all contents to remote login
pwd : as per unix : current location of remote login
? : will display help
put filename : file is tranffered
cd : used to go to remote location
quit : closes the ftp session
some examples
get ipc.tar.gz
grep -l "test" * will tell the file in which the string text
is available.
e.g.
grep -l "CDR #16808" *
g++ -o 2Helix 2Helix.cpp // to run a g++ file
The mail location is normalle /var/mail/{filename = login-name} one can delete it
find the cdr file time by this command
ls -l *.cdr | tr -s " "| cut -f9 -d " " | cut -f3 -d "_" |cut -f1 -d "."
:1,$s/abc/xyz/g
using this u can replace abc with xyz in the whole file but if u want to do it only for a limited number of lines then u can give the from and to line numbers in place of 1 & $ respectively.
tar xvjf gdb-6.3.50.20050526.tar.bz2 // very imp command to unzip .bz2 format
gzip -d myname // will decompress a compressed file of file name 'myname'
gzip -d myname // will zip myname to myname.gz myname will be be lost
unzip MPE_08042004.zip
tar -cvf ipc.tar ipc
gzip ipc.tar
gunzip ACE-5.2.2-lib.tar.gz
gzip allsitestest allsitestest.gz // converts the file allsitestest to allsitestest.gz
// to compress a directory named FTP
tar -cvf FTP.tar FTP // converts FTP to FTP.tar
gzip FTP.tar
/sbin/ifconfig
/bin/netstat -s
46 10:58 netstat
47 10:58 netstat
48 11:00 netstat -route
49 11:00 netstat -route -r
50 11:01 netstat --route -r
51 11:01 netstat --r
52 11:01 netstat -r
53 11:01 netstat -route
54 11:01 netstat -g
55 11:01 netstat -i
56 11:02 netstat -M
57 11:02 netstat -s
58 11:02 netstat -v
59 11:02 netstat -rv
60 11:02 netstat -r -v
61 11:03 netstat -numeric-hosts
62 11:03 netstat --numeric-hosts
63 11:03 netstat --numeric-ports
64 11:03 netstat -protocol
65 11:04 netstat -c
66 11:04 netstat -e
67 11:04 netstat -o
68 11:05 netstat -p
// This to resolve the issur of connectivity
give the privilage to the user to connect the remote database using following commands
grant all privileges on *.* to 'root'@'%' identified by 'dragon1' with grant option;
or
grant all privileges on *.* to 'jsingh'@'%' identified by 'jonney' with grant option;
// flush the privilages now
flush privileges;
//check the table user again it should have the entry like this
+-----------+--------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+-------
--------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+-----
---------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdo
wn_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Exec
ute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections |
+-----------+--------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+-------
--------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+-----
---------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
| localhost | root | *1CC04EE0FF203AA8132212FAB09158A9FA6B99ED | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | | | | | 0 | 0 | 0 |
| % | root | *DACDE7F5744D3CB439B40D938673B8240B824853 | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | | | | | 0 | 0 | 0 |
| localhost | jsingh | *1CC04EE0FF203AA8132212FAB09158A9FA6B99ED | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | | | | | 0 | 0 | 0 |
| % | jsingh | *1CC04EE0FF203AA8132212FAB09158A9FA6B99ED | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
| Y | Y | | | | | 0 | 0 | 0 |
+-----------+--------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+-------
--------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+-----
---------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
// now you can connect the data base from any remote location
select count(*) from cdr_bayamon where calling_party_number=727534511
select * from CDR_BAYAMON where calling_party_number=7877033167
select * from cdr_bayamon where calling_party_number like '7877033%'
select * from cdr_bayamon order by cdr_no desc
select * from cdr_bayamon order by cdr_no asc
select cdr_no from cdr_bayamon
select cdr_no,call_disposition from cdr_bayamon
select distinct(release_cause_code) from cdr_bayamon
select * from cdr_tampa order by bill_duration desc
// deleting a row entry
DELETE FROM profiles where userid='5'; // delete from (syntex) profiles (tablename) where(syntex) userid='5' (constraint name)
create table testfile1 as select * from ny_liner11 where 1=2
create table testfile1 as select * from ny_liner11 where 1=2 // create a table
/// change a table contents
show tables; // observe all table present in the used database
show databases; // observe all databases accesabel by the user
update profiles // profile is table name
set cryptpassword = '1' // set column name to what you want
where cryptpassword = 'HUEK3c5gR3X'; // apply condition and end command using ';'
/// loginwith hostname
mysql -h localhost -u root -p
GRANT LOCK TABLES ON bugs.* TO bugs@localhost; // grant permossion
FLUSH PRIVILEGES; // flush the previlises
find / -name mysql.sock
You can replace "/" with any path, such as "." or "/usr".
rpm -Uvh sendmail-cf-8.12.10-1.1.1.i386.rpm --nodeps (may be required if ask for dependencies)
529 ls -l
530 rpm -Uvh sendmail-8.12.10-1.1.1.i386.rpm
531 rpm -Uvh sendmail-8.12.10-1.1.1.i386.rpm
532 rpm -Uvh m4-1.4.1-14.i386.rpm
533 chkconfig --level 35 sendmail on
534 /etc/init.d/sendmail start
535 /sbin/chkconfig --level 35 sendmail o
gnome-panel& // to see redhat gui linux
linux system can be rebooted by using simply reboot' command
rpm -Uvh bind-9.2.2P3-1.i386.rpm // latest installed packeage in Linux
/// to give user as admin rights
update profiles set groupset=0x7fffffffffffffff where login_name = "mansari@agilisinternational.com";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
///////////////// almost known and not frequenlty used
delete from AgtTable;
delete from TaskTable;
update JobTable set status=0;
insert into udr_20040901 values(844435262,11112222,'2004-09-01 00:00:01','2004-09-01 00:00:05','2004-09-01 00:00:20',100);
update AgtTable set SourceQueue=2;
update JobTable set Command='Select * from udr where Orig_date > "2004-09-01 00:00:00" And Orig_Date < "2004-09-03 00:00:00" Order By Orig_Date';
// create with btree index.
mysql> CREATE TABLE udr_20041029 (A_Num varchar(20),index using BTREE (A_Num),
B_Num varchar(20),index using BTREE (B_Num),
C_Num varchar(20),
Orig_Date DATETIME,index using BTREE (Orig_Date),
End_Date DATETIME,Call_Duration integer(10)) ENGINE = InnoDb;
// create table with primary key
CREATE TABLE tab (A_Num varchar(20),index using BTREE (A_Num),B_Num varchar(20),
index using BTREE (B_Num), Orig_Date DATETIME,index using BTREE (Orig_Date),
End_Date DATETIME, Ins_Date DATETIME, Call_Duration integer(10),
PRIMARY KEY(A_Num,B_Num,Orig_Date)) ENGINE = InnoDb;
Posted by anandss2004
at 2:12 PM KDT