顯示具有 AS400 標籤的文章。 顯示所有文章

為i5/OS配置sshd PHP MySQL

為IBM i配置ssh連線
1.iOS需安裝5733SC1...等等
2.進qsh or call qp2term產生sshd的服務密鑰
  • ssh-keygen -t rsa1 -f /QOpenSys/QIBM/ProdData/SC1/OpenSSH/openssh-3.8.1p1/etc/ssh_host_key -N ""
  • ssh-keygen -t rsa1 -f /QOpenSys/QIBM/ProdData/SC1/OpenSSH/openssh-3.8.1p1/etc/ssh_host_rsa_key -N ""
  • ssh-keygen -t dsa1 -f /QOpenSys/QIBM/ProdData/SC1/OpenSSH/openssh-3.8.1p1/etc/ ssh_host_dsa_key -N ""
開啟sshd
/QOpenSys/usr/sbin/sshd

3.因為我個人喜好用bash,所以有許多步驟要執行,如下(不用bash的請略過)
ssh連線至IBM i PASE安裝RPM及gmake套件以安裝bash等.....RPM

mkdir -P /QOpenSys/compiler
cd /QOpenSys/compiler
安裝RPM
restore -xqf rpm.rte
mv /QOpenSys/compiler/usr/opt/freeware /opt
cd /opt/freeware/lib

cp librpmbuild.so.0.0.0 librpmbuild.so
cp libpopt.so.0.0.0 libpopt.so
cp librpm.so.0.0.0 librpm.so
ln -s /opt/freeware/bin/rpm /usr/bin/rpm
安裝gmake
rpm --ignoreos --ignorearch --noodeps -ivh make-xxxx.ppc.rpm
安裝bash rpm
rpm --ignoreos --ignorearch --noodeps -ivh bash-xx.ppc.rpm

安裝PHP (Zend Core for i5/OS)
download Zend Server for IBM i (PHP 5.3)解壓後點選setup安裝
安裝會以batch執行,以wrkactjob 確認該安裝已完成後執行
go zendsvr/zcmenu
安裝MySQL(Option,可用DB400),變更密碼後,將所有服務都start
為了安全記得變更MySQL root密碼,變更後才能用PhpMyAdmin
ps:PhpMyAdmin內建已安裝,對SQL不熟悉的人可以用此web管理DB

進Zend Server管理網頁確認PHP狀態
在網頁上變更time zone ,Server Setup->Directives->date (也可以直接改php.ini)
date.timezone台灣改 Etc/GMT-8


其它後記:

使用Zend 5250 Emulator and Zend 5250 Bridge Object Oriented API發生的問題WRKACTJOB JOB(QQF*)查Webfacing的log發現有error,QQFTEMP 不存在
crtlib QQFTEMPQUSER *ALLCHGOBJOWN OBJ(QQFTEMP) OBJTYPE(*LIB) NEWOWN(QSYS)WebFacing Troubleshooting Tipshttp://www-01.ibm.com/support/docview.wss?uid=swg27005905
2012年8月17日 星期五
Posted by 紹斌
Tag :

System i - SQL COALESCE function in views has a deficiency

I was upgrade V5R3 --> V6R1 in last month,
我們踩到 IBM SQE 的 Bug, 開PMR弄了一個月,才由公司同事找到問題.



There isn't a problem specifically with the COALESCE function,
 But use COALESCE on columns in Views  then used to join to a table in a query, will cause SQL performance proble.

This SQE  deficiency should be fixed,
rewritting those views can resolve the performance problem . 

Query the SYSVIEWS table to determine if they have other views which use COALESCE,
i.e.:

select system_view_schema,
system_view_name , view_definition
from qsys2/sysviews
where upper(view_definition) like '%COALESCE%'

2012年5月4日 星期五
Posted by 紹斌
Tag :

Nagios Check_as400 PlugIn

Last edited by Shao-Pin, Cheng Taipei, Taiwan 
-----------------------------------------------------------

Check_as400 was  created for Nagios to monitor IBM System i.

Easy monitoring of all key indicators.


Nagios Exchange - Check_AS400

The following I have completed the development of options:
      AJ = Number of active jobs in system.
      CJ = Check to see if job is in the system.
      CJS [status ] [noperm]
            = Check to see if job is existing in Subsystem and has this status.
                          Job checking can be controlled by :
                          status       = any other status goes to critical
                          noperm                = don't go to critical if job is not in the system
                          NOTE: if JobStatus is set, it has highest Priority
      JOBS = Number of jobs in system.
      CJM = Check the temporary storage used of job.
      JOBQ = Number of jobs in JOBQ.
      CPU = CPU load.
      CPUC = CPU load, Consider Current processing capacity. (CPU used * VP nums / cpuBase).
                          NOTE: Specify , EX: You want use 3 CPU only, but VP use more than 3.
      CPUT = Top CPU used job. The total processing unit time used by the job
                          Specify job name, ex: *ALL or QZ* or QZDASOINIT
      US = Percent free storage
      ASP = Check ASP used
      DISK = Check DISK Status.
      DB = DB utilization. (Not available after V6R1)
      DBFault = Pool DB/Non-DB Fault
      LOGIN = Check if login completes.
      MSG = Check for any unanswered messages on msg queue
                          Any unanswered messages causes warning status.
      OUTQ  = Check outq files, writer and status. No writer, or
                          status of 'HLD' causes warning status. This default
                          behavior can be modified with the following options:
                             nw   = Don't go critical when no writer
                             ns    = Don't warn if status is 'HLD'
                             nf    = Ignore number of files in queue
                          NOTE: threshold values are used on number of files
      SBS = Check if the subsystem is running.
                          NOTE: specify as library/subsystem
      PRB = Check if the problem was identified.
      ---------- VISION MIMIX ----------
      MIMIX = Check MIMIX Data Group Unprocessed Entry Count, Transfer definition, RJ link state.
      ---------- Rocket iCluster ----------
      ICNODE = Check for any Inactive or Failed Node status.
      ICGROUP = Check for any Inactive or Indoubt Group status.
      ICSWTCHRDY = Check for multiple conditions for switch readiness.

-SSL
  Use SSL connection.
-d
   Be verbose (debug)
       NOTE: Needs to be one of the first arguments to work
-D
   Be verbose and dump screen outputs (debug)
      NOTES: Needs to be one of the first arguments to work
             When things are not working, use this flag, redirect the output to a file and send it to me!

Notes:
 -CPU, DB and US threshold's are decimal, JOBS, JOBQ and OUTQ are integers.

======================================================================
Install Note 
======================================================================
* Modify your $NAGIOS_PATH/.as400 with the correct user and password.
* Modify chech_as400 with the correct java path. 
* Set NAGIOS user profile Display sign-on information *NO 
- CHGUSRPRF USRPRF(NAGIOS) DSPSGNINF(*NO) 
Initial program to call  . . . .   *NONE
Initial menu . . . . . . . . . .   MAIN
* Nagios user may need to use IBM default sign-on display file
   Or change nagiso user to other subsystem description to use system default display file
  a.Use the Change Subsystem Description (CHGSBSD) command.
  b.Specify the display file on the SGNDSPF parameter. System default is QSYS/QDSIGNON
  c.ADDWSE SBSD(SBSLIB/SBSD) WRKSTN(QPADEVxx*) AT(*SIGNON)

* Avoid the massive entries log
CHGJOBD JOBD(NAGIOSJOBD) LOG(4 00 *MSG)

* Use SSL connection 
 Must add CE to JAVA, for EX:
keytool -import -trustcacerts -keystore /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre/lib/security/cacerts -storepass changeit -noprompt -alias xxxx_ce -file /xx/xxx/XXXX.cer

If you upgrade cum-package, then plugin stop working
Releases affected, V6R1M0 and M1, V7.1 and V7.2 (with different ptfs)
Release 610 : MF58587                                           
Release 611 : MF58588                                           
Release 710 : MF58589                                           
Release 720 : MF58590 


There is a PTF to resolve plugin stop working
* RECOMMENDATION: Apply LIC PTF MF59537 for i 6.1              * 
*                 Apply LIC PTF MF59538 for i 6.1.1            * 
*                 Apply LIC PTF MF59539 for i 7.1              * 
*                 Apply LIC PTF MF59540 for i 7.2              *

======================================================================
Help check_as400 - Click Sponsored Ads
======================================================================
This donation will help me provide everyone with greater content


======================================================================
For different language 
======================================================================
(optional 1 - Support EN/FR/DE/IT)
1.If your system is running on another language than english, follow the steps below
# cd /usr/local/nagios/libexec/check_as400/Lang Source
2.Then copy the java class file of your language (EX:substitute french with your language)
# cp check_as400_lang_french.java ../check_as400_lang.java
3.Then compile it
# javac check_as400_lang.java

(optional 2 - Change Nagios user profile to EN)
The NAGIOS user profile has INLPGM parameter set to a CLP (MAINGBCL)
This is the MAINGBCL:
/*********************************************************************/
/* SERVER PROFILE FOR NAGIOS !!!!!!!!!                                                               */
/*********************************************************************/
PGM                                                                                                                                  
              CHGSYSLIBL LIB(QSYS2924)                                                                        
              RCLRSC                                                                                                              
ENDPGM 
                                                                                                                          


This CLP change the language in English.

======================================================================
Troubleshooting
======================================================================
Use -D (debug) option,
.For example
check_as400  -D  -H x.x.x.x -v DISK > debug.log

======================================================================
Change log
======================================================================
Check_as400 Version: 1.5.1 <2019> 
* Fixed WRKSYSSTS check problem on V7R3 


Check_as400 Version: 1.4.4 <2017> 
* Fixed CPUT problem on OS V7R2. 
* Added check job temporary storage used. (Thanks, BIANCHI Xavier) 


Check_as400 Version: 1.4.2_1 (2016/04/29)
* Added ITALIAN language. (Thanks to Riccardo Morandotti)

Check_as400 Version: 1.4.2 <2015 style="font-family: verdana, tahoma, sans-serif; font-size: 12px; line-height: 20.4px;"> (2015/06/29)
* Added SSL connection option. 
* Fixed username display in Login ERROR message. 
* Fixed Log in failure on 10 character username. 

Check_as400 Version: 1.3.0 : (2015/03/10)
Modified check CJ for duplicate jobs, can specify job number for CRITICAL and WARNING value.

Check_as400 Version: 1.2.9 :  
* Fixed check MSG for LANG FR/GE string index out of range error. 
(Thanks to Frederic MOURAGUES) 

Check_as400 Version: 1.2.8 :
* Added check for Number of file members. 
(Thanks to Tim Vandegrift) 

Check_as400 Version: 1.2.7 : ( 2013.08.29 ) 
* Added check for work with problems. 
* Added check for top CPU used job. 
The total processing unit time used by the job. 

Check_as400 Version: 1.2.5 :
* Added check for Rocket iCluster. Node Status, Group Status, Switch Readines. 

Check_as400 Version: 1.2.4 : 
* Added French language definitions 
* Fixed check CJ command && parse error. 
* Fixed check OUTQ error with V6R1/V7R1. And can specify the library now. 
2011年11月18日 星期五
Posted by 紹斌

Translate

關於我

我的相片
台北市, Taiwan
主要工作領域於Linux、IBM System i/ P 的系統管理維護, (認證:CISA、RHCE)

Donate Check_AS400

OR - Click Sponsored advertising

Labels

ShaoPin網誌. 技術提供:Blogger.

- Copyright © Shao Pin Cheng (Bruce) - Powered by Blogger