Sunday, March 20, 2022
How to check the MAC address from the ILOM.
From ipmitool:
# ipmitool sunoem cli "show /SYS/MB/NET0 fru_macaddress" << do this for NET1,NET2,NET3
From ILOM cmd:
-> show /System/Networking/Ethernet_NICs/Ethernet_NIC_0 mac_addresses << do this for NIC_1, NIC_2, NIC_3
Monday, January 17, 2022
How to spilt the Mellnox 100 G port to 4 * 25 GB QSFP
Wednesday, October 6, 2021
How to reset the Mellanox switch to Factory default
Monday, August 30, 2021
How to reboot the nodes in OCI using ansible.
- hosts: node list
become: yes
tasks:
- name: Check the uptime
shell: uptime
register: UPTIME_PRE_REBOOT
- debug: msg={{UPTIME_PRE_REBOOT.stdout}}
- name: Check the kernel info before the reboot
shell: uname -a
register: Kernel_PRE_REBOOT
- debug: msg={{Kernel_PRE_REBOOT.stdout}}
- name: Unconditionally reboot the machine with all defaults
reboot:
reboot_timeout: 600
- name: Check the uptime after reboot
shell: uptime
register: UPTIME_POST_REBOOT
- debug: msg={{UPTIME_POST_REBOOT.stdout}}
- name: Check the kernel info after the reboot
shell: uptrack-uname -a
register: Kernel_POST_REBOOT
- debug: msg={{Kernel_POST_REBOOT.stdout}}
Friday, August 13, 2021
How to Preserv /etc/resolv.conf file after the reboot.
- hosts: all
become: yes
tasks:
- name: To preserve the /etc/resolv.conf entry
command : chattr +i /etc/resolv.conf
Thursday, July 22, 2021
How to create a multiple files using loop.
Sunday, July 18, 2021
Sunday, July 11, 2021
Useful CRSCTL commands
CRSCTL Utility is used to managed oracle clusterware resources and components.
1. STOP & START CRS: ( run from root user)
$GRID_HOME/bin/crsctl stop crs $GRID_HOME/bin/crsctl start crs
2. Enable/Disable auto restart of CRS.
$GRID_HOME/bin/crsctl disable crs $GRID_HOME/bin/crsctl enable crs
3. Find the cluster name
$GRID_HOME/bin/cemutlo -n or $GRID_HOME/bin/olsnodes -c
4. Find grid version:
SYNATX – $GRID_HOME/bin/crsctl query crs softwareversion <hostname)
$GRID_HOME/bin/crsctl query crs softwareversion host-dbaclass1
5. check cluster component status
$GRID_HOME/bin/crsctl stat res -t $GRID_HOME/bin/crsctl check crs $GRID_HOME/bin/crsctl check cssd $GRID_HOME/bin/crsctl check crsd $GRID_HOME/bin/crsctl check evmd
6. Find voting disk location
$GRID_HOME/bin/crsctl query css votedisk
7. Find OCR location:
$GRID_HOME/bin/ocrcheck
8. Find cluster interconnect details
$GRID_HOME/bin/oifcfg getif app-ipmp0 172.21.39.128 global public loypredbib0 172.16.3.192 global cluster_interconnect loypredbib1 172.16.4.0 global cluster_interconnect select NAME,IP_ADDRESS from v$cluster_interconnects; NAME IP_ADDRESS --------------- ---------------- loypredbib0 172.16.3.193 loypredbib1 172.16.4.1
9. Check CRS status of local node
crsctl check crs CRS-4638: Oracle High Availability Services is online CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online
10. Check status of all crs resourcs
$GRID_HOME/bin/crsctl stat res -t $GRID_HOME/bin/crsctl stat res -t -init
10. Check active version of cluster
crsctl query crs activeversion Oracle Clusterware active version on the cluster is [12.1.0.2.0]
11. Stop and start high availability service ( HAS)
crsctl stop has crsctl start has
12. Check CRS status of remote nodes
crsctl check cluster crsctl check cluster -all
13. Disk timeout from node to voting disk(disktimeout)
crsctl get css disktimeout CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.
14. Network latency in the node interconnect (Misscount)
crsctl get css misscount CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.
15. Move voting disk to another diskgroup:
crsctl replace votedisk +OCRVD Successful addition of voting disk 2e4ded6cee504fc8bf078b080fb7be6f. Successful addition of voting disk 8e87826024e24fffbf5add65c011fc66. Successful addition of voting disk e1ba56dedff84fa8bf5605e0302fc81e. Successful deletion of voting disk 2b7ce864c44d4fecbf60885a188290af. Successfully replaced voting disk group with +OCRVD. CRS-4266: Voting file(s) successfully replaced
16. Add another voting disk:
crsctl add css votedisk
17. Delete voting disk:
crsctl delete css votedisk
18 . Get ocr disk backup details
ocrconfig -showbackup
19 . Check whether standard or flex ASM
crsctl get cluster mode status Cluster is running in "standard" mode
20 . Check CRS configuation
crsctl config crs
21. crsctl has commands for standalone grid infrastrcuture
crsctl check has crsctl config has crsctl disable has crsctl enable has crsctl query has releaseversion crsctl query has softwareversion crsctl start has crsctl stop has
Note: Taken from the net dbaclass.com
Saturday, July 10, 2021
How to Clear the sssd cache and restart the same
Sunday, June 27, 2021
How to fill the disks and remove the same. (Do not try on the production)
To Fill the disk
cat /dev/zero > /var/log/application.log
recover the disk space
truncate -s 0 /var/log/application.log
Note: Taken from the net.
Saturday, June 26, 2021
Good LVM notes
https://wiki.learnlinux.tv/index.php/Linux_Logical_Volume_Manager_(LVM)_Deep_Dive_Tutorial
https://www.thegeekdiary.com/redhat-centos-a-beginners-guide-to-lvm-logical-volume-manager/
Friday, June 25, 2021
How to update the Kernal in OEL 7.X with out rebooting the node.
vi /etc/yum.repos.d/uek-ol7.repo
[ol7_UEKR6]
name=Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR6/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
vi /etc/uptrack/uptrack.conf
https_proxy=http:// update your proxy here.
uptrack-upgrade -v -n;uptrack-show --available;yum erase oracle-cloud-agent-0.0.18-18.el7.x86_64 -y;yum --disablerepo=* --enablerepo=ol7_latest --enablerepo=ol7_UEKR6 --enablerepo=ol7_optional_latest update -y;uptrack-upgrade -y;uptrack-uname -a;systemctl status sssd
Sunday, April 11, 2021
SQL Commands
Saturday, March 20, 2021
How to fix Caused by: java.sql.SQLException: ORA-01109: database not open
sudo su - oracle
sqlplus / as sysdba
SYS@sukhoi> show pdbs;
When DB is unable to connect () login to the Db and check the same:
ALTER PLUGGABLE DATABASE <PDB_SEED_32K open read only;
SYS@sukhoi> show pdbs;
Monday, February 8, 2021
Good Materisls.
1. MIT https://lnkd.in/e46-T-T
2. IIT https://lnkd.in/esscG7A
3. cp-algorithms.com
Machine Learning:
1. Harvard https://lnkd.in/ebgnvvS
2. Caltech https://lnkd.in/eBV_qPW
3. By Ali Ghodsi https://lnkd.in/e3rQD6U
4. fast.ai
Statistics:
1. Harvard https://lnkd.in/e3t5nQY
Practice:
1. https://leetcode.com/
2. https://lnkd.in/em_fBTP
3. https://lnkd.in/eeic39K
C++:
1. learncpp.com
2. https://www.cplusplus.com/
Thursday, January 21, 2021
Richard Feynman's Lectures on Physics.
Volume 2: https://feynmanlectures.caltech.edu/II_toc.html
Volume 3: https://feynmanlectures.caltech.edu/III_toc.html
Wednesday, January 6, 2021
How to Update the Opatch in weblogic.
Download the both the patches
p28186730_139424_Generic.zip
1.0) change the permission
1.1) chown -R oracle:oinstall p28186730_139424_Generic.zip
2) Command to install the Opatch,Login as oracle
2.1) unzip p28186730_139424_Generic.zip
2.2) /opt/sfw/oracle/middleware/OPatch/opatch version
2.3) /opt/sfw/java-8u261/bin/java -jar /tmp/6880880/opatch_generic.jar -silent oracle_home=/opt/sfw/oracle/middleware
3.0) To Verify the Os Patch Version
3.1) /opt/sfw/oracle/middleware/OPatch/opatch version
3.2) OPatch Version: 13.9.4.2.4
OPatch succeeded.
Regards
Gurudatta N.R
Tuesday, January 5, 2021
How to update the latest patch to JMS version (12.2.1.3.0)
1) Download the patch p31961038_122130_Generic.zip
2) login as oracle
3) create a folder PATCH_TOP
4) unzip -d PATCH_TOP p31961038_122130_Generic.zip
5) /opt/sfw/oracle/middleware/OPatch/opatch version
6) /opt/sfw/oracle/middleware/OPatch/opatch lsinventory
Note: Issue the following command, If there is any error kindly stop.
[oracle@sukhoi tmp]$ /opt/sfw/oracle/middleware/OPatch/opatch apply /tmp/PATCH_TOP/31961038
Patching component oracle.java.jaxws, 12.2.1.3.0...
Patch 31961038 successfully applied.
Sub-set patch [31535411] has become inactive due to the application of a super-set patch [31961038].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /opt/sfw/oracle/middleware/cfgtoollogs/opatch/opatch2021-01-05_06-58-39AM_1.log
OPatch succeeded.
Note: Ensure you have latest OPatch Version: 13.9.4.2.4
Wednesday, December 30, 2020
Good Scripts
How to fix the oracle patching issue in 10.3.6.
cp p31641257_1036_Generic.zip /opt/sfw/oracle/middleware/utils/bsu/cache_dir
cd /opt/sfw/oracle/middleware/utils/bsu/cache_dir
cd /opt/sfw/oracle/middleware/utils/bsu
========================================================================
vi bsu.sh
========================================================================
#!/bin/sh
JAVA_HOME="/opt/sfw/oracle/middleware/Oracle_BI/jdk"
MEM_ARGS="-Xms1024m -Xmx4096m"
==========================================================================
[oracle@sukhoi bsu]$ ./bsu.sh -view -status=applied -prod_dir=/opt/sfw/oracle/middleware/wlserver_10.3 -verbose
ProductName: WebLogic Server
ProductVersion: 10.3 MP6
Components: WebLogic Server/Core Application Server,WebLogic Server/Admi
nistration Console,WebLogic Server/Configuration Wizard and
Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
ic Server/Evaluation Database,WebLogic Server/Workshop Code
Completion Support
BEAHome: /opt/sfw/oracle/middleware
ProductHome: /opt/sfw/oracle/middleware/wlserver_10.3
PatchSystemDir: /opt/sfw/oracle/middleware/utils/bsu
PatchDir: /opt/sfw/oracle/middleware/patch_wls1036
Profile: Default
DownloadDir: /opt/sfw/oracle/middleware/utils/bsu/cache_dir
JavaVersion: 1.6.0_29
JavaVendor: Sun
Patch ID: FMJJ
PatchContainer: FMJJ.jar
Checksum: 591477727
Severity: optional
Category: General
CR/BUG: 26519424
Restart: true
Description: WLS PATCH SET UPDATE 10.3.6.0.171017
WLS PATCH SET UPDATE 10
.3.6.0.171017
======================================================
login as oracle:
======================================================
/etc/init.d/wlsadmin stop
/etc/init.d/wlsbip stop
======================================================
Login as root
======================================================
/etc/init.d/puppet3 stop
puppet3 agent --disable
======================================================
Error we get the same in FMJJ Patch.
======================================================
[oracle@sukhoi bsu]$ ./bsu.sh -remove -patchlist=FMJJ -prod_dir=/opt/sfw/oracle/middleware/wlserver_10.3/
Checking for conflicts..............
No conflict(s) detected
Removing Patch ID: FMJJ.
Result: Failure
java.io.IOException: Unable to backup file /opt/sfw/oracle/middleware/wlserver_10.3/bugsfixed/WLS-PSU-bugsfixed.txt to /opt/sfw/oracle/middleware/wlserver_10.3/bugsfixed/WLS-PSU-bugsfixed.txt32684.bak
Result: Failure
java.io.IOException: Unable to backup file /opt/sfw/oracle/middleware/wlserver_10.3/bugsfixed/WLS-PSU-bugsfixed.txt to /opt/sfw/oracle/middleware/wlserver_10.3/bugsfixed/WLS-PSU-bugsfixed.txt32684.bak
[oracle@sukhoi wlserver_10.3]$ ls -ltr
total 0
drwxr-x--- 3 oracle oinstall 20 Nov 25 21:12 sip
drwxr-x--- 2 oracle oinstall 6 Nov 25 21:12 L10N
drwxr-x--- 11 oracle oinstall 117 Nov 25 21:12 server
drwxr-x--- 11 oracle oinstall 147 Nov 25 21:12 common
drwxr-x--- 3 oracle oinstall 25 Nov 25 21:12 inventory
drwxr-x--- 2 oracle oinstall 51 Nov 25 21:12 uninstall
drwxr-xr-x 2 root root 123 Nov 30 16:45 bugsfixed
======================================================
Work around:
============================================================================================================
change the owner to oracle:oinstall bugsfixed
============================================================================================================
Work around:
[oracle@sukhoi bsu]$ ./bsu.sh -remove -patchlist=FMJJ -prod_dir=/opt/sfw/oracle/middleware/wlserver_10.3/
Checking for conflicts..............
No conflict(s) detected
Removing Patch ID: FMJJ..
Result: Failure
java.io.FileNotFoundException: /opt/sfw/oracle/middleware/patch_wls1036/backup/backup.jar8008.bak (Permission denied)
Result: Failure
java.io.FileNotFoundException: /opt/sfw/oracle/middleware/patch_wls1036/backup/backup.jar8008.bak (Permission denied)
[oracle@sukhoi patch_wls1036]$ ls -ltr
total 4
drwxr-xr-x 3 oracle oinstall 21 Nov 30 04:21 profiles
drwxr-xr-x 2 oracle oinstall 4096 Nov 30 16:45 patch_jars
drwxr-xr-x 2 root root 56 Nov 30 16:45 registry
drwxr-xr-x 2 root root 24 Nov 30 16:45 backup
Work around: change the owner to oracle:oinstall registry backup
============================================================================================================
[oracle@sukhoi bsu]$ ./bsu.sh -remove -patchlist=FMJJ -prod_dir=/opt/sfw/oracle/middleware/wlserver_10.3/
Checking for conflicts..............
No conflict(s) detected
Removing Patch ID: FMJJ..
Result: Failure
java.io.FileNotFoundException: /opt/sfw/oracle/middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar16854.bak (Permission denied)
Result: Failure
java.io.FileNotFoundException: /opt/sfw/oracle/middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar16854.bak (Permission denied)
============================================================================================================
Work around: change the owner to oracle:oinstall sys_manifest_classpath
============================================================================================================
[oracle@sukhoi bsu]$ ./bsu.sh -remove -patchlist=FMJJ -prod_dir=/opt/sfw/oracle/middleware/wlserver_10.3/
Checking for conflicts..............
No conflict(s) detected
Removing Patch ID: FMJJ..
Result: Success
============================================================================================================
[oracle@sukhoi bsu]$ ./bsu.sh -install -patch_download_dir=/opt/sfw/oracle/middleware/utils/bsu/cache_dir/ -patchlist=NA7A -prod_dir=/opt/sfw/oracle/middleware/wlserver_10.3/
Checking for conflicts..............
No conflict(s) detected
Installing Patch ID: NA7A..
Result: Success
