找出 CPU loading 的方法
[root@opsview libexec]# snmpwalk -v2c -c voicevmware 172.30.1.63  .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad.1 = INTEGER: 5
HOST-RESOURCES-MIB::hrProcessorLoad.2 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.4 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.5 = INTEGER: 1
HOST-RESOURCES-MIB::hrProcessorLoad.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.7 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.8 = INTEGER: 0
 
找出 Disk usage 的方法

[root@opsview libexec]# snmpwalk -v2c -c voicevmware 172.30.1.63 .1.3.6.1.2.1.25.2

HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 16775112 KBytes

HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 1

HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2

HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3

HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4

HOST-RESOURCES-MIB::hrStorageType.1 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk

HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageCompactDisc

HOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory

HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrStorageRam

HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: C:\ Label:  Serial Number 16e0854

HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: D:\

HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual Memory

HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: Physical Memory

HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 4096 Bytes

HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 0 Bytes

HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 65536 Bytes

HOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 65536 Bytes

HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 35834383  >> 總空間

HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 0

HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 524192

HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 262111

HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 12722541 >> 已使用空間

HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 0

HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 228676

HOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 216444

HOST-RESOURCES-MIB::hrStorageAllocationFailures.1 = Counter32: 0

HOST-RESOURCES-MIB::hrStorageAllocationFailures.2 = Counter32: 0

HOST-RESOURCES-MIB::hrStorageAllocationFailures.3 = Counter32: 0

HOST-RESOURCES-MIB::hrStorageAllocationFailures.4 = Counter32: 0

 


35834383 * 4096 / 1024 (K) / 1024 (M) / 1024 (G) = 136.697 (G)

12721658 * 4096 / 1024 (K) / 1024 (M) / 1024 (G) = 48.529   (G)
 
 
找出特定程式的方法
[root@opsview libexec]# snmpwalk -v2c -c voicevmware 172.30.1.63 HOST-RESOURCES-MIB::hrSWRunName | grep snmp

HOST-RESOURCES-MIB::hrSWRunName.1764 = STRING: "snmp.exe"

HOST-RESOURCES-MIB::hrSWRunName.5144 = STRING: "snmptrap.exe"

johnchen6927 發表在 痞客邦 留言(0) 人氣()


 

expdp system/xxxx SCHEMAS=john DIRECTORY=test_expdp DUMPFILE=expjohn.dmp job_name=john_expdp parallel=4


 


impdp system/xxxx SCHEMAS=john DIRECTORY=test_expdp DUMPFILE=expjohn.dmp;


johnchen6927 發表在 痞客邦 留言(0) 人氣()


 

expdp system/xxxx SCHEMAS=john DIRECTORY=test_expdp DUMPFILE=expjohn.dmp job_name=john_expdp parallel=4


 


impdp system/xxxx SCHEMAS=john DIRECTORY=test_expdp DUMPFILE=expjohn.dmp;


johnchen6927 發表在 痞客邦 留言(0) 人氣()


 

exp system/xxxx owner=john file=export_john.dmp log=john_exp.log


 


imp system/xxxx fromuser=john touser=john file=john.dmp log=john_imp.log


johnchen6927 發表在 痞客邦 留言(0) 人氣()


 

匯出 voip 的 schema


exp \'/ as sysdba\' owner=VOIP file=VOIP.dmp rows=n statistics=none log=exp_VOIP.log


 


匯入 voip 的 schema


imp \'/ as sysdba\' fromuser=VOIP touser=VOIP file=VOIP.dmp ignore=y log=Imp_VOIP.log


johnchen6927 發表在 痞客邦 留言(0) 人氣()


1. 安裝 OS rpm
 

yum -y install binutils "compat-libstdc++" elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++ make "pdksh" sysstat unixODBC unixODBC-devel compat-libstdc++-33 ksh libio.i686 glibc.i686 compat-libstdc++-33.i686 libaio-devel.i686 libgcc.i686 libstdc++.i686 unixODBC.i686 unixODBC-devel.i686


 


2. 建立 oracle 帳號


groupadd oinstall


groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle


 


3. 更改 /etc/sysctl.conf


vi /etc/sysctl.conf


在 /etc/sysctl.conf 後面增加如下参數


 


fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
#kernel.shmmax = 2147483648
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500 
net.core.rmem_default=262144 
net.core.rmem_max=4194304 
net.core.wmem_default=262144 
net.core.wmem_max=1048586


 


輸入  /sbin/sysctl -p  確認更改


 


4. 更改 oracle 帳號的 shell 限制


vi /etc/security/limits.conf
在 /etc/security/limits.conf 後面增加如下行



oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


 


在 /etc/pam.d/login 後面增加如下行  



session    required    pam_limits.so


 


5. 更改 /etc/profile 


 


vi /etc/profile


在 /etc/profile 後面增加如下行


 


if [ $USER = "oracle" ]; then 
        if [ $SHELL = "/bin/ksh" ]; then 
                ulimit -p 16384 
                ulimit -n 65536 
        else 
                ulimit -u 16384 -n 65536 
        fi 
fi


 


6. 建立 Oracle 安裝目錄  


 


mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01


 


7. 更改 oracle 帳號的 profile


umask 022


export ORACLE_BASH ORACLE_SID
#unset ORACLE_HOME
#unset TNS_ADMIN


ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE


ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID


#ORACLE_TERM=xterm;


#export ORACLE_TERM


PATH=$ORACLE_HOME/bin:$PATH;
export PATH


 


8. 安裝 oracle 軟體


unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
cd database/
./runInstaller


johnchen6927 發表在 痞客邦 留言(0) 人氣()

undefined

在意別人與和別人比較,是不同的事情。
在意別人是以溫和,體貼的心去關注他人;但是和別人比較時,是存著嫉妒的心,並以對方的不幸為喜悅。

johnchen6927 發表在 痞客邦 留言(0) 人氣()


在工作上遇到有 image 需要透過 Docker Hub 來 auto build image
但遇到了舊版本保存的問題

johnchen6927 發表在 痞客邦 留言(0) 人氣()

[root@voipdb2 ~]# blkid
 

johnchen6927 發表在 痞客邦 留言(0) 人氣()

先建立 bond0
 

johnchen6927 發表在 痞客邦 留言(0) 人氣()

大檔案系統的問題
 

johnchen6927 發表在 痞客邦 留言(0) 人氣()

Step 1. 安裝gdm 桌面系統。
[root@localhost ~]# yum -y install gdm

johnchen6927 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。