Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Saturday, 23 November 2019

Open a port in RHEL Linux

How open port in RHEL linux firewall?
Below is the command to open the port 9444 firewall port in RHEL linux


For RHEl5 :
iptables -I INPUT -p tcp -m tcp --dport 9444 -j ACCEPT
service iptables save

Thursday, 22 June 2017

mount cifs -bash: !,uid=,gid=: event not found

Error:
While mounting cifs windows shared file system with RHEL getting below error

mount -t cifs -o username=admin,password=admin,uid=1010,gid=1011 //1.1.1.1/SHARE /mnt/SHARE
-bash: !,uid=54322,gid=54324: event not found


Solution:

The order of the value is wrong try with below.

mount -t cifs -o uid=1010,gid=1011,username=admin,password=admin //1.1.1.1/SHARE /mnt/SHARE

Tuesday, 30 May 2017

Putty login takes time after entering username

When we try to login to the server using putty ,After entering username the password prompt is taking time.
This is due to DNS setting in the server,
Please check /etc/resolv.conf from the login server and

Update the value from the properly by referring other working server or with proper setting.


12c client application load - /bin/ld: cannot find -lcurses collect2: error: ld returned 1 exit status

Error:
While loading application software using oracle client getting below error

Entry points defined in module: /u01/app/oracle/product/12.1.0/client_1/precomp/lib/cobsqlintf.o
Entry points defined in module: /u01/app/oracle/product/12.1.0/client_1/lib/scorept.o
Entry points defined in module: /u01/app/oracle/product/12.1.0/client_1/lib/sscoreed.o
/bin/ld: cannot find -lcurses
collect2: error: ld returned 1 exit status


Solution:

Install below rpm's
glibc-devel and 
glibc-statics

Friday, 31 March 2017

Unix rpm -qa command hangs

Issue:

While executing rpm -qa the command hangs for long time

Solution:


Remove the below file from the server and retry the command.

rm -rf /var/lib/rpm/ __db.*
 


Starting httpd Address already in use make_sock

Error while starting httpd

[root@]# service httpd status
httpd is stopped
[root@]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:8362
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8362
no listening sockets available, shutting down
Unable to open logs


Solution:

++ Check if the port was used by some on
netstat -anp | grep :8362 | grep LISTEN


++ If some one using kill all the process
ps -ef|grep httpd
kill -p all the output of above 


++ Again check:
netstat -anp | grep :8362 | grep LISTEN
if still the process are there then stop the application and try to kill
then check and then start the httpd service

 
[root@]# service httpd start


Wednesday, 3 June 2015

Linux Send mail fails sendmail 354 enter mail end with . on a line by itself

To we are not getting any Oracle alert mail from the monitoring script
so when i run the script manually we are getting below error from Linux.

Error like below:

sendmail 354 enter mail end with . on a line by itself

and when /var/log/maillog
stat=Deferred: 452 4.3.1 Insufficient system resources

Solution:

Check the exchange server setting for the account and clear the space for the account then recheck.

Tuesday, 24 February 2015

Linux - /etc/mail/sendmail.cf is changed and mails are not received.

ISSUE:

We had issues in send mail from Linux for Oracle centralized Alert.

Cause:

Exchage server setting was changed.

Diag:

Check the /etc/mail/sendmail.cf for relay server IP.

Try to ping and telnet the port.

ping excl-prod-01 ==> it worked
telnet excl-prod-01 25 ==> it failed

telnet: Unable to connect to remote host: Connection refused

Solution:

Check with windows team for correct exchange server host name,IP and check the DNS server for host name IP address is set correctly.

Then updated /etc/mail/sendmail.cf line below with new exchange relay server.
"# "Smart" relay host (may be null)"

then restarted 
#/etc/init.d/sendmail stop
#/etc/init.d/sendmail start

Monday, 17 November 2014

ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O

ERROR:
Errors in file /u01/app/oracle/diag/rdbms/mzfcdbu/MZFCDBU2/trace/MZFCDBU2_p012_29056.trc:
ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 3
Additional information: 128
Additional information: 2092329984
Errors in file /u01/app/oracle/diag/rdbms/mzfcdbu/MZFCDBU2/trace/MZFCDBU2_p006_29032.trc:
ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 3
Additional information: 128
Additional information: 2092327744


Solution:

Increase the value of /proc/sys/fs/aio-nr of fs.aio-max-nr in /etc/sysctl.conf

fs.aio-max-nr increase the value
/sbin/sysctl -p

Ref:ID 579108.1

Thursday, 17 July 2014

Oracle Alert log monitoring shell script and alerting through mail

#!/bin/bash

# This script is to send mail for alerting ALERT LOG Monitoring
# Assumption smtb confirgured,created DIR's
# Note : you have to have SSH connectivity between monitoring server and the db server,Enter the ALERT log details in alertfile_detail.txt:
as format "+ASM1 10.95.10.101 oracle /u01/app/oracle/diag/asm/+asm/+ASM1/trace/alert_+ASM1.log"


WORK_DIR=/u01/app/oracle/util/scripts
LOG_DIR=/u01/app/oracle/util/log
log_file=/u01/app/oracle/util/scripts/alertfile_detail.txt
file_header=$WORK_DIR/alert_header.log
temp_file=$WORK_DIR/alert_report_temp.log
final_report=$WORK_DIR/alertlog_full_report.html
export PATH=$PATH:/usr/sbin
CURR_DATE=`date '+%m/%d/%y_%H:%M'`

if [ -e $temp_file ]
  then
    `rm   $temp_file `
fi
if [ -e $final_report ]
  then
    `rm $final_report `
fi
if [ -e $file_header ]
  then
    `rm   $file_header `
fi

touch $file_header
echo $CURR_DATE

html_head="Subject: Alert log  report  for ${CURR_DATE}
\nMIME-Version: 1.0 \nContent-Type: text/html \nContent-Disposition: inline \n
<html>
<head>
<meta http-equiv=\"Content-Type\" content=text/html;

Oracle Database Lock details status monitoring shell script and alerting through mail


#!/bin/bash
####  Script for sending mail when lock in the database #####
### For adding new database tnsname.ora should be updated and add SID value for the database

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export PATH=/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:$PATH
export SCRIPT_DIR=/u01/app/oracle/util/scripts
export LOG_DIR=/u01/app/oracle/util/log
export TNS_ADMIN=/u01/app/oracle/util/scripts
CURR_DATE=`date '+%m/%d/%y_%H:%M'`

if [ -e ${LOG_DIR}/lock_status.txt ]
  then
    `rm   ${LOG_DIR}/lock_status.txt `
fi
if [ -e ${LOG_DIR}/lock_output.log ]
  then
    `rm ${LOG_DIR}/lock_output.log `
fi

html_head="Subject: All DB LOCK Report for ${CURR_DATE}
\nMIME-Version: 1.0 \nContent-Type: text/html \nContent-Disposition: inline \n
<html>
<head>

Oracle ASM Disk Group free space/used space monitoring shell script and alerting through mail

#!/bin/bash
# This script is to send mail for alerting ASM Disk Group free space and used space status.
# Assumption smtb confirgured,created DIR's
# Note : you have to have SSH connectivity between monitoring server and the ASM server,Enter the server details in asm_serv.txt:as format "+ASM1 10.95.10.101 oracle"


WORK_DIR=/u01/app/oracle/util/scripts
LOG_DIR=/u01/app/oracle/util/log
Server_details=$WORK_DIR/asm_serv.txt
temp_file=$WORK_DIR/asm_report_temp.log
final_report=$WORK_DIR/asm_full_report.html
export PATH=$PATH:/usr/sbin
CURR_DATE=`date '+%m/%d/%y_%H:%M'`

if [ -e $temp_file ]
  then
    `rm   $temp_file `
fi
if [ -e $final_report ]
  then
    `rm $final_report `
fi


html_head="Subject: ASM Alert REPORT for ${CURR_DATE}
\nMIME-Version: 1.0 \nContent-Type: text/html \nContent-Disposition: inline \n

Oracle Data guard log gap status monitoring shell script and alerting through mail



#!/bin/bash
# This script is to send mail for alerting Data gaurd DR sync status of given database.
# Assumption smtb confirgured,TNS entry of db in tnsname.ora,created DIR's

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export PATH=/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:$PATH
export SCRIPT_DIR=/u01/app/oracle/util/scripts
export LOG_DIR=/u01/app/oracle/util/log
export TNS_ADMIN=/u01/app/oracle/util/scripts

CURR_DATE=`date '+%m/%d/%y_%H:%M'`

if [ -e ${LOG_DIR}/DR_Sync_status.txt ]
  then
    `rm   ${LOG_DIR}/DR_Sync_status.txt `
fi
if [ -e ${LOG_DIR}/DR_Sync_output.log ]
  then
    `rm ${LOG_DIR}/DR_Sync_output.log `
fi

html_head="Subject: DR SYNC REPORT for ${CURR_DATE}
\nMIME-Version: 1.0 \nContent-Type: text/html \nContent-Disposition: inline \n
<html>
<head>
<meta http-equiv=\"Content-Type\" content=text/html;

Tuesday, 15 July 2014

Tablespace Monitoring and altering through mail when reaches 90%


#!/bin/bash
# This script is to send mail for alerting tablespace.
# Assumption smtb confirgured,TNS entry of db in tnsname.ora,created DIR's

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export PATH=/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:$PATH
export SCRIPT_DIR=/u01/app/oracle/util/scripts
export LOG_DIR=/u01/app/oracle/util/log
export TNS_ADMIN=/u01/app/oracle/util/scripts
CURR_DATE=`date '+%m/%d/%y_%H:%M'`

if [ -e ${LOG_DIR}/tbsp_max_status.txt ]
  then
    `rm   ${LOG_DIR}/tbsp_max_status.txt `
fi
if [ -e ${LOG_DIR}/tbsp_max_output.log ]
  then
    `rm ${LOG_DIR}/tbsp_max_output.log `
fi

html_head="Subject: High Tablespace Alert for all DB on ${CURR_DATE}
\nMIME-Version: 1.0\nContent-Type: text/html\nContent-Disposition: inline\n
<html>

Friday, 4 July 2014

SUN Solaris performance basic check commands


SUN Solaris performance basic check commands:
--------------------------------------------
1. How to find what Solaris release am I running on my system?
Use: cat /etc/release

2. How can I know which Solaris/hardware do I have - 32 or 64 bit?

Use: isainfo -kv

3. How to check physical memory on solaris?
Use: /usr/sbin/prtconf | grep Memory



4. What process or processes are using the most resources? To see the top processes using CPU and memory resources, use:

Use: ps -eo pid,pcpu,args | sort +1n                %cpu


Use: ps -eo pid,vsz,args | sort +1n                 kilobytes of virtual memory


Use: /usr/ucb/ps aux |more                          Output is sorted with highest users (processes) of CPU and memory at the top