spool index_scripts.lst
set long 2000000000
set head off
set pagesize 10000
select ctx_report.create_index_script ('username.text_index_name') from dual;
select ctx_report.describe_index('username.text_index_name') FROM DUAL;
spool off
Search This Blog
Total Pageviews
Friday, 25 February 2011
netstat linux
apt-lnxtst-01:/etc/init.d # netstat -planet
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:8192 0.0.0.0:* LISTEN 0 9282 -
tcp 0 0 0.0.0.0:8193 0.0.0.0:* LISTEN 0 9271 -
tcp 0 0 0.0.0.0:8194 0.0.0.0:* LISTEN 0 9272 -
tcp 0 0 0.0.0.0:38115 0.0.0.0:* LISTEN 0 9574 -
tcp 0 0 1.1.1.1:389 0.0.0.0:* LISTEN 0 9421 -
tcp 0 0 192.168.2.232:389 0.0.0.0:* LISTEN 0 9420 -
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 7005 26955 -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
apt-lnxtst-01:/etc/init.d # netstat -t –s
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 apt-lnxtst-01.apt:38115 apt-lnxtst-01.apt:11927 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 192.168.2.106:4791 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:40562 192.168.2.106:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 apt-lnxtst-01.apt:63080 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:11927 apt-lnxtst-01.apt:38115 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:63080 apt-lnxtst-01.aptu:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh apt-amd-02.tus.:52499 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh amd64-05.tus.co:58674 ESTABLISHED
netstat -nat | awk '{ print $5}' | cut -d: -f1 | sed -e '/^$/d' | uniq
apt-lnxtst-01:/etc/init.d # netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
1 192.168.2.253
2 192.168.2.106
2 192.168.2.251
4 192.168.2.232
5 192.168.2.240
14
31 0.0.0.0
apt-lnxtst-01:/etc/init.d # netstat -anp | grep 80
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN -
tcp 0 0 192.168.2.232:8194 192.168.2.232:63080 ESTABLISHED -
tcp 0 0 192.168.2.232:63080 192.168.2.232:8194 ESTABLISHED -
tcp 0 0 :::7780 :::* LISTEN -
tcp 0 0 :::80 :::* LISTEN -
tcp 1 0 192.168.2.232:143 192.168.2.240:58038 CLOSE_WAIT -
unix 2 [ ACC ] STREAM LISTENING 8041 - /var/run/nscd/socket
unix 3 [ ] STREAM CONNECTED 188180 -
unix 3 [ ] STREAM CONNECTED 9280 -
unix 2 [ ] DGRAM 8055 -
unix 2 [ ] DGRAM 8040 -
unix 2 [ ] DGRAM 8039 -
unix 3 [ ] STREAM CONNECTED 6806 -
-a, --all, --listening display all sockets (default: connected)
-n, --numeric don't resolve names
-p, --programs display PID/Program name for sockets
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:8192 0.0.0.0:* LISTEN 0 9282 -
tcp 0 0 0.0.0.0:8193 0.0.0.0:* LISTEN 0 9271 -
tcp 0 0 0.0.0.0:8194 0.0.0.0:* LISTEN 0 9272 -
tcp 0 0 0.0.0.0:38115 0.0.0.0:* LISTEN 0 9574 -
tcp 0 0 1.1.1.1:389 0.0.0.0:* LISTEN 0 9421 -
tcp 0 0 192.168.2.232:389 0.0.0.0:* LISTEN 0 9420 -
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 7005 26955 -
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
apt-lnxtst-01:/etc/init.d # netstat -t –s
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 apt-lnxtst-01.apt:38115 apt-lnxtst-01.apt:11927 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 192.168.2.106:4791 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:40562 192.168.2.106:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.aptu:8194 apt-lnxtst-01.apt:63080 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:11927 apt-lnxtst-01.apt:38115 ESTABLISHED
tcp 0 0 apt-lnxtst-01.apt:63080 apt-lnxtst-01.aptu:8194 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh apt-amd-02.tus.:52499 ESTABLISHED
tcp 0 0 apt-lnxtst-01.tus:ssh amd64-05.tus.co:58674 ESTABLISHED
netstat -nat | awk '{ print $5}' | cut -d: -f1 | sed -e '/^$/d' | uniq
apt-lnxtst-01:/etc/init.d # netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
1 192.168.2.253
2 192.168.2.106
2 192.168.2.251
4 192.168.2.232
5 192.168.2.240
14
31 0.0.0.0
apt-lnxtst-01:/etc/init.d # netstat -anp | grep 80
tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN -
tcp 0 0 192.168.2.232:8194 192.168.2.232:63080 ESTABLISHED -
tcp 0 0 192.168.2.232:63080 192.168.2.232:8194 ESTABLISHED -
tcp 0 0 :::7780 :::* LISTEN -
tcp 0 0 :::80 :::* LISTEN -
tcp 1 0 192.168.2.232:143 192.168.2.240:58038 CLOSE_WAIT -
unix 2 [ ACC ] STREAM LISTENING 8041 - /var/run/nscd/socket
unix 3 [ ] STREAM CONNECTED 188180 -
unix 3 [ ] STREAM CONNECTED 9280 -
unix 2 [ ] DGRAM 8055 -
unix 2 [ ] DGRAM 8040 -
unix 2 [ ] DGRAM 8039 -
unix 3 [ ] STREAM CONNECTED 6806 -
-a, --all, --listening display all sockets (default: connected)
-n, --numeric don't resolve names
-p, --programs display PID/Program name for sockets
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Mysql database error
apt-lnxtst-01:/etc/init.d # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
check any other mysql database is running on port 3306 or not ?????????
(3306 is the default port for mysql)
lnxtst:/etc/init.d # netstat -planet|grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
lnxtst:/etc/init.d # su - mysql
mysql@apt-lnxtst-01:~> /etc/init.d/mysql start
Starting service MySQL
apt-lnxtst-01:/etc/init.d # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
check any other mysql database is running on port 3306 or not ?????????
(3306 is the default port for mysql)
lnxtst:/etc/init.d # netstat -planet|grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 60 93548 -
lnxtst:/etc/init.d # su - mysql
mysql@apt-lnxtst-01:~> /etc/init.d/mysql start
Starting service MySQL
Subscribe to:
Posts (Atom)
Oracle DBA
anuj blog Archive
- ▼ 2011 (362)