Thứ Ba, 22 tháng 2, 2022

Quản lý tiến trình (Process) trong hệ điều hành IBM AIX

Mục đích: Hướng dẫn quản lý tiến trình (Process) trong hệ điều hành IBM AIX

Process chiếm nhiều RAM

câu lệnh nmon --> chọn t -> chọn 4

 


 nmon --> chọn t -> chọn 4

Thông tin chi tiết process

# ps auxwwwe 11600078  -- thông tin chi tiết về process

 


Xác định process từ port

1. netstat -Aan | grep <port number>

- This shows if the specified <port number> is being used. The hex number in the first column is the address of protocol control block (PCB)

# netstat -Aan | grep LISTEN | grep 8888

f1000e0013382bb0 tcp4       0  0  10.50.9.115.8888   *.*                LISTEN

 

 

2. rmsock <addr of PCB> tcpcb

- This shows the process who is holding the socket. Note: This command must be run as root.

 

# rmsock f1000e0013382bb0 tcpcb

The socket 0x13382808 is being held by proccess 8388610 (java).

Blade03:/u01/setup/CRM_WEBSERVICE/bin# ps -ef|grep 8388610

weblogic  8388610 14352394   0 16:25:20  -  0:17 /usr/java6_64/jre/bin/java -Dtangosol.coherence.member=coherence115 -Dtangosol.coherence.clusterport=7777 -Dtangosol.coherence.clusteraddress=231.1.1.1 -Dtangosol.coherence.localport=8888 -Dtangosol.coherence.localhost=10.50.9.115 -Djava.class.path=/u01/oracle/app/fmw/10.3.6/coherence_3.7/lib/coherence.jar:/u01/oracle/app/fmw/10.3.6/coherence_3.7/lib/coherence-web.jar:/u01/oracle/app/fmw/10.3.6/modules/features/weblogic.server.modules.coherence.server_10.3.5.0.jar -Dtangosol.coherence.cacheconfig=session-cache-config.xml -Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.session.localstorage=true -Xms512m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dtangosol.coherence.cluster=CoherenceCluster -Dweblogic.RootDirectory=/u01/oracle/app/fmw/10.3.6/user_projects/domains/145_Domain weblogic.nodemanager.server.provider.WeblogicCacheServer

    root 24379636 19791958   0 18:38:08  pts/5  0:00 grep 8388610

 

 

3.  ps auxwwwe PID

Day la tim process theo port

Chi tiết 1 process sử dụng resource

/usr/bin/svmon -P  <PID>

 

#!/usr/bin/ksh

print "Port            PID              Process"

netstat -Aan | grep LISTEN | awk '{print $1 " " $5}' | while read pcb port; do

out=`rmsock $pcb tcpcb`

  if echo "$out" | grep "Kernel Extension" > /dev/null; then

     printf "%-15s Kernel Extension\n" "$port"

  else

  pid=`echo "$out" | sed -n 's/.*pro[c]*ess \([0-9][0-9]*\) .*/\1/p'`

  if [ -n "$pid" ]; then

     proc=`ps -p $pid | tail -n 1 | awk '{print $4}'`

     printf "%-15s %-16s $proc\n" "$port" $pid

   else

   echo "Error, Line not recognized \"$out\" for Port $port"

   fi

fi

done


kill

Code:

ps -ef | grep admin | awk '{ print $2 }' | xargs kill -9

or

 

Code:

kill -9 $( ps -ef | grep admin | awk '{ print $2 }' )

 

From <https://www.unix.com/aix/177466-how-find-out-kill-all-processes-user.html>

 

USER=name_of_your_ser

ps -ef |grep $USER|while read n1 n2 n3; do kill -9 $n2; done

 

From <https://www.unix.com/aix/177466-how-find-out-kill-all-processes-user.html>

 

# kill -9 `ps -fu admin |awk '{ print $2 }'|grep -v PID`

 

From <https://www.unix.com/aix/177466-how-find-out-kill-all-processes-user.html>


Hy vọng hữu ích cho bạn.
=============================
* KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE trực tiếp từ tôi giúp bạn bước đầu trở thành những chuyên gia DBA, đủ kinh nghiệm đi thi chứng chỉ OA/OCP, đặc biệt là rất nhiều kinh nghiệm, bí kíp thực chiến trên các hệ thống Core tại VN chỉ sau 1 khoá học.
* CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
* Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile: 0902912888
⚡️ Skype: tranbinh48ca
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: http://bit.ly/ytb_binhoraclemaster
👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhoracle
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,khóa học pl/sql, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle weblogic, middleware, hoc solaris, hoc linux, hoc aix, unix, oracle oca, oracle ocp, oracle ocm

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master