搜尋此網誌

星期二, 3月 26, 2019

Oracle Listener on specific ip or all interface


Oracle listener port listen on which ip address?



Once you start Oracle listener service, you may not know which ip the listener will receive a connection. 

if you configure HOSTNAME as host address, the listener will listener on all interface.











if you want to listen on a specific ip address, you need to replace the hostname to an ip address. 






星期三, 3月 20, 2019

Linux找出使用交換空間(swap space) 的進程( process)

最近資料庫有大量使用cpu / swap的現象,為了查找是否除了 Oracle 資料庫外,還有別的程序使用SWAP,因此在網路上找到這篇文章


 https://www.cyberciti.biz/faq/linux-which-process-is-using-swap/


 這篇文章有介紹幾個指令 文後有一段小的Schell Script,可以用來快速找出佔用SWAP的前幾名


 ## Get swap space in Linux using bash for loop ##

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less


等下次再發生時,可以再抓取相關資訊