2013-08-06

ITM Agent change hostname

在TEP上,遇到Agent端的hostname有重複的時候,TEP管理的介面上會一直出現更新的訊息(圖1)。因此需要在Agent端做一些調整,方能解決問題。
(圖1)

On Linux/UNIX agent systems, these parameters can be added to the xx.ini file, where xx is the product code of the agent.

Example: edit the xx.ini file and add the following lines, where <your hostname> = the name you chose
to have displayed in the TEP navigator tree.
CTIRA_HOSTNAME=<your hostname>
CTIRA_SYSTEM_NAME=<your hostname>

After making the changes to the file and saving it, a restart of the agent is required.


For the Windows agents, you need to perform the following steps:

1) Stop the agent
2) In the TEP Managed System Status workspace, clear the offline entry for the agent
3) Ensure the corresponding navigator item has been removed
4) In the Manage Tivoli Enterprise Monitoring Services (MTEMS) GUI, right-click on the agent and select Advanced->Edit Variables...
5) Click on Add
6) For CTIRA_HOSTNAME, choose the variable from the list of selected variables
7) For the value, replace "%computername%" with the desired hostname, making sure to leave the remaining part of the value (typically .TYPE=REG_EXPAND_SZ) unchanged
8) For CTIRA_SYSTEM_NAME, type in the variable name and also the desired value
9) Select OK and start the Windows OS agent.

Alternative method: The following may be used to manually change the hostname on the Windows system:

1) Stop the agent
2) Clear the offline entry from Managed System Status workspace
3) Ensure the corresponding navigator item has been removed
4) Edit the <ITMHOME>\TMAITM6\kxxcma.ini file to include:
[Override Local Settings]
CTIRA_HOSTNAME=<hostname> .TYPE=REG_EXPAND_SZ
CTIRA_SYSTEM_NAME=<hostname>
where xx is the product code and <hostname> is the desired name to appear in the TEP
5) Reconfigure the agent through the MTEMS
6) Start the agent

Note that all agents running on a system must use the same values for both the CTIRA_HOSTNAME and CTIRA_SYSTEM_NAME parameters. If this construct is not followed, unpredictable results can occur. This applies to agents on all operating systems.

2013-08-01

AIX上壓縮檔處理方式

在AIX上最常見的壓縮檔就是.tar檔了順手整理了一些常見的壓縮檔格式:

.tar.Z file format
   壓縮
      # compress filename.tar
   解壓
      # zcat filename.tar.Z | tar -xvf -

.tar.gz file format
   壓縮
      # tar cvf - folder | gzip > filename.tar.gz
   解壓
      # gunzip -c filename.tar.gz | tar -xvf -

.gz file format (註1)
   解壓
      # gzip -d filename.gz
   壓縮
      # gzip -v filename

.tgz file format
   解壓
      # gzip -d filename.tgz | tar -xvf -

.zip file format (註2)
   解壓
      # unzip filename.zip


註1 : gzip 在壓縮完後,會建立一個 .gz 的檔,並清除原始未壓縮的檔。反之,解壓縮的時候,則是把 .gz 檔清除,只留解開後的檔。

註2 : 請注意,AIX預設並沒有裝unzip的程式。