البرامج النصية المفيدة لإدارة WebSphere Application Server

يوجد أكثر من 125 ملف برامج نصية shell مضمنة في IBM WebSphere Application Server (WAS) عند تركيبه.

ليست جميعها مفيدة ، وإذا كنت متعلمًا ، فقد لا تكون على دراية ببعض البرامج النصية القوية لاستخدامها في العمل اليومي.

لقد قمت بإدراج بعض البرامج النصية الأكثر فائدة لتسهيل حياتك كمسؤول WebSphere.

تم اختبار البرامج النصية التالية في بيئة IBM WAS ND 8.5.5 ولا ترى أي سبب لعدم عملها في أي بيئة أخرى.

إيقاف وبدء مدير النشر ووكيل العقدة و JVM

stopManager.sh

يمكنك إيقاف مدير النشر باستخدام الأمر أعلاه.

[[email protected] bin]# ./stopManager.sh
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/stopServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server dmgr stop completed.
[[email protected] bin]#

ملاحظة: يجب تنفيذ هذا في مسار ملف تعريف DMGR.

startManager.sh

يمكنك بدء Deployment Manager باستخدام الأمر أعلاه.

[[email protected] bin]# ./startManager.sh
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/startServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server dmgr open for e-business; process id is 9183
[[email protected] bin]#

ملاحظة: يجب تنفيذ هذا في مسار ملف تعريف DMGR.

startServer.sh

لبدء JVM ، يمكنك استخدام startServer.sh باسم الخادم كما هو موضح أدناه.

[[email protected] bin]# ./startServer.sh server1
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: server1
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server server1 open for e-business; process id is 10633
[[email protected] bin]#

ملاحظة: يجب بدء وكيل العقدة قبل بدء JVM.

stopServer.sh

يمكنك إيقاف تشغيل JVM بتنفيذ الأمر أعلاه مع اسم JVM.

[[email protected] bin]# ./stopServer.sh server1
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/stopServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: server1
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server server1 stop completed. 
[[email protected] bin]#

stopNode.sh

لإيقاف وكيل العقدة المعني ، يجب عليك الانتقال إلى ملف التعريف هذا وتنفيذ stopNode.sh لإيقاف وكيل العقدة.

[[email protected] bin]# ./stopNode.sh
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/nodeagent/stopServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: nodeagent
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server nodeagent stop completed. 
[[email protected] bin]#

startNode.sh

انتقل إلى ملف التعريف المعني وقم بتنفيذ startNode.sh لبدء وكيل العقدة.

[[email protected] bin]# ./startNode.sh
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/nodeagent/startServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: nodeagent
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server nodeagent open for e-business; process id is 11363
[[email protected] bin]#

serverStatus.sh

لمعرفة حالة JVM ، يمكنك استخدام هذا البرنامج النصي مع الوسيطة –all.

  كيفية إنشاء مزامنة الملفات السحابية الخاصة بك مع Nextcloud

يجب أن يتم تنفيذ هذا في مستوى الملف الشخصي المعني. إذا قمت بتنفيذ هذا في مستوى ملف تعريف DMGR ، فسيظهر فقط حالة DMGR.

[[email protected] bin]# ./serverStatus.sh -all
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/serverStatus.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU0503I: Retrieving server status for all servers
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU0506I: Server name: server1
ADMU0508I: The Node Agent "nodeagent" is STARTED
ADMU0508I: The Application Server "server1" is STARTED
[[email protected] bin]#

اسنرجاع البيانات

backupConfig.sh

من أول الأشياء التي يجب تعلمها أثناء العمل في دعم الإنتاج كيفية أخذ نسخة احتياطية. عندما لا يعمل شيء – يساعد النسخ الاحتياطي.

يمكنك استخدام هذا البرنامج النصي لأخذ نسخة احتياطية من توصيف بيئة WebSphere الخاص بك. كإحدى أفضل الممارسات ، يمكنك استخدام وسيطة “–nostop” ، لذا فهي تأخذ نسخة احتياطية دون إيقاف Deployment Manager.

[[email protected] bin]# ./backupConfig.sh -nostop
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/backupConfig.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU5001I: Backing up config directory
          /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config to file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/WebSphereConfig_2015-04-12.zip
....................................................................................................................................................................................................................................................................
ADMU5002I: 933 files successfully backed up
[[email protected] bin]#

RecoveryConfig.sh

إذا قمت بتغيير التكوين ولم تكن الأمور كما هو متوقع وهناك وقت لاستعادة التكوين الخاص بك. حسنًا ، يمكنك استخدام ملف النسخ الاحتياطي لاستعادة التكوين.

[[email protected] bin]# ./restoreConfig.sh WebSphereConfig_2015-04-12.zip -nostop
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/restoreConfig.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU5502I: The directory /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config
           already exists; renaming to
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config.old
ADMU5504I: Restore location successfully renamed
ADMU5505I: Restoring file WebSphereConfig_2015-04-12.zip to location
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config
.........................................................................................................................................................................
ADMU5506I: 933 files successfully restored
ADMU6001I: Begin App Preparation -
ADMU6009I: Processing complete.
ADMU6002I: Begin Asset Preparation -
ADMU6009I: Processing complete.
[[email protected] bin]#

هل ترغب في ذلك حتى الآن؟ قم بالتمرير لأسفل لمزيد من المتعة!

  كيفية دمج LibreOffice مع Nextcloud

الحصول على معلومات الإصدار وإصلاح الحزمة

versionInfo.sh

لمعرفة إصدار WAS ، ومستوى البناء ، والحزمة ، والهندسة المعمارية ، والميزات المثبتة على الخادم الخاص بك.

[[email protected] bin]# ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12 
--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
-------------------------------------------------------------------------------- 
Report at date and time April 12, 2015 3:18:41 AM PDT 
Installation
--------------------------------------------------------------------------------
Product Directory       /opt/IBM/WebSphere/AppServer
Version Directory       /opt/IBM/WebSphere/AppServer/properties/version
DTD Directory           /opt/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory           /var/ibm/InstallationManager/logs 
Product List
--------------------------------------------------------------------------------
NDTRIAL                 installed
Installed Product
--------------------------------------------------------------------------------
Name                 IBM WebSphere Application Server Network Deployment
Version               8.5.5.0
ID                   NDTRIAL
Build Level           gm1319.01
Build Date           5/14/13
Package               com.ibm.websphere.NDTRIAL.v85_8.5.5000.20130514_1044
Architecture         x86-64 (64 bit)
Installed Features   IBM 64-bit WebSphere SDK for Java
                     WebSphere Application Server Full Profile
                     EJBDeploy tool for pre-EJB 3.0 modules
                     Embeddable EJB container
                     Stand-alone thin clients and resource adapters 
--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------
[[email protected] bin]#

ملاحظة: قد تكون مهتمًا باتباع الوسائط المدعومة.

  • -fixpacks: لعرض معلومات حزم الإصلاح
  • -طويلة: لعرض جميع حزم الإصلاح و ifixes
  • -ifixes: لعرض معلومات ifixes

getHistoryReport.sh

إذا كنت تقوم بالتدقيق أو ترغب فقط في سرد ​​المكونات والإصلاحات وتحديث الحزمة بالتواريخ ، فيمكنك تشغيل هذا الأمر ، والذي سينشئ historyReport.html في دليل العمل الحالي ، والذي يكون عادةً مجلد bin.

getVersionReport.sh

لعرض نسخة البناء وتاريخ الإنشاء لتركيب WebSphere. غالبًا ما يطلب من فريق دعم IBM التحقق مما إذا كانت هناك مشكلة مشبوهة في إصدار معين.

مسح ذاكرة التخزين المؤقت

قد تكون هناك أسباب مختلفة لمسح ذاكرة التخزين المؤقت التي سيكون أكثرها وضوحًا بعد الترقية. هناك نوعان من ذاكرات التخزين المؤقت التي يجب أن تفكر في مسحها 1) JVM 2) OSGi.

clearClassCache.sh

لمسح ذاكرة التخزين المؤقت لفئة JVM ، يمكنك تنفيذ البرنامج النصي أعلاه.

ملاحظة: يجب إيقاف JVM’s قبل مسح ذاكرة التخزين المؤقت للفصل.

  إصلاح رمز خطأ Xbox Live 80072EF3

osgiCfgInit.sh

قم بتنفيذ الأمر أعلاه لمسح ملف تعريف OSGi وذاكرة التخزين المؤقت للخادم.

[[email protected] bin]# ./osgiCfgInit.sh
OSGi profile cache successfully cleaned for /opt/IBM/WebSphere/AppServer/profiles/Dmgr01.
OSGi server cache successfully cleaned for /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/servers/dmgr.
[[email protected] bin]#

ملاحظة: لا تنس إيقاف العمليات الجارية قبل مسح ذاكرات التخزين المؤقت.

إدارة الملفات الشخصية

managesdk.sh

يمكنك تبديل الإصدار إذا قمت بتثبيت عدة SDK. يمكنك أيضًا استخدام هذا البرنامج النصي لمعرفة SDK المرتبط بملف التعريف الخاص بك. يظهر المثال أدناه قائمة SDK المتاحة.

[[email protected] bin]# ./managesdk.sh -listAvailable
CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.6_64
CWSDK1001I: Successfully performed the requested managesdk task.
[[email protected] bin]#

pmt.sh

يمكن استخدام PMT (أداة إدارة الملف الشخصي) لإنشاء ملفات تعريف WebSphere في صيغة GUI. يعد إنشاء ملفات التعريف باستخدام PMT أمرًا سهلاً للغاية – كل ما عليك فعله هو إنشاء المستوى المطلوب من ملف التعريف واتباع المعالج. عليك أن تجربها!

syncNode.sh

لسبب ما ، إذا لم تتمكن من تنفيذ Node Sync من خلال وحدة التحكم الإدارية ، فيمكنك استخدام syncNode.sh من مستوى الملف الشخصي. يجب إيقاف عامل العقدة قبل استخدام هذا البرنامج النصي.

يجب عليك تمرير وسيطة لمضيف DMGR ورقم منفذ SOAP.

[[email protected] bin]# ./syncNode.sh localhost 8879
ADMU0116I: Tool information is being logged in file
           /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/syncNode.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU0401I: Begin syncNode operation for node localhostNode01 with Deployment
           Manager localhost: 8879
ADMU0016I: Synchronizing configuration between node and cell.
ADMU0402I: The configuration for node localhostNode01 has been synchronized
           with Deployment Manager localhost: 8879
[[email protected] bin]#
  • localhost = اسم مضيف إدارة النشر
  • 8879 = رقم منفذ DMGR SOAP

آمل أن تكون النصوص الواردة أعلاه مفيدة لعملك اليومي. ارتق بحياتك المهنية إلى مستوى أعلى من خلال تعلم الحوسبة السحابية.