Thursday, 15 August 2013

Tricky C questions

Tricky C questions
By admin | May 10, 2006

    How do you write a program which produces its own source code as its output?
    How can I find the day of the week given the date?
    Why doesn’t C have nested functions?
    What is the most efficient way to count the number of bits which are set in a value?
    How can I convert integers to binary or hexadecimal?
    How can I call a function, given its name as a string?
    How do I access command-line arguments?
    How can I return multiple values from a function?
    How can I invoke another program from within a C program?
    How can I access memory located at a certain address?
    How can I allocate arrays or structures bigger than 64K?
    How can I find out how much memory is available?
    How can I read a directory in a C program?
    How can I increase the allowable number of simultaneously open files?
    What’s wrong with the call fopen(”c:\newdir\file.dat”, “r”)?

what are storage-class specifier , auto/extern/static
How can you swap two integer variables without using a temporary?
1.12: What is sizeof('A') ?



A: The same as sizeof(int).  Character constants have type

 int in C.  (This is one area in which C++ differs.)

what is the return type of malloc.... it is void*
we need to typecast it to appropriate object.

char *p = malloc(n * sizeof(char));


How would you implement the va_arg() macro in

 <stdarg.h>?


1.24: State the declaration for a pointer to a function

 returning a pointer to char.



A: char *(*f)();

1.23: What do these declarations mean?



     int **a();

     int (*b)();

     int (*c[3])();

     int (*d)[10];



A: declare a as function returning pointer to pointer to int

 declare b as pointer to function returning int

 declare c as array of 3 pointers to functions returning int

 declare d as pointer to array of 10 ints



 The way to read these is "inside out," remembering that

 [] and () bind more tightly than *, unless overridden by

 explicit parentheses.


1.28: Consider these definitions:



     #define Push(val) (*stackp++ = (val))

     #define Pop() (*--stackp)



     int stack[100];

     int *stackp = stack;



 Now consider the expression



     Push(Pop() + Pop())



 1. What is the expression trying to do?  In what sort of

 program might such an expression be found?



 2. What are some deficiencies of this implementation?

 Under what circumstances might it fail?



A: The expression is apparently intended to pop two values

 from a stack, add them, and push the result.  This code

 might be found in a calculator program, or in the

 evaluation loop of the engine for a stack-based language.



 The implementation has at least four problems, however.

 The Push macro does not check for stack overflow; if more

 than 100 values are pushed, the results will be

 unpredictable.  Similarly, the the Pop macro does not

 check for stack underflow; an attempt to pop a value when

 the stack is empty will likewise result in undefined

 behavior.



 On a stylistic note, the stackp variable is global as far

 as the Push and Pop macros are concerned.  If it is

 certain that, in a particular program, only one stack

 will be used, this assumption may be a reasonable one,

 as it allows considerably more succinct invocations.

 If multiple stacks are a possibility, however, it might

 be preferable to pass the stack pointer as an argument

 to the Push and Pop macros.



 Finally, the most serious problem is that the "add"

 operation as shown above is *not* guaranteed to work!

 After macro expansion, it becomes



     (*stackp++ = ((*--stackp) + (*--stackp)))



 This expression modifies a single object more than once

 between sequence points; specifically, it modifies stackp

 three times.  It is not guaranteed to work; moreover,

 there are popular compilers (one is gcc) under which it

 *will* *not* work as expected.  (The extra parentheses

 do nothing to affect the evaluation order; in particular,

 they do not make it any more defined.)


how does printf works. what is the output of printf{"%d"'}


char *x = "abc";
char arr[] = {a,b,c};

sizeof(x) and sizeof(arr)

1.52: How can a header file be protected against being

 included multiple times (perhaps due to nested

 #include directives)?



A: The standard trick is to place lines like



     #ifndef headerfilename_H

     #define headerfilename_H



 at the beginning of the file, and an extra #endif at the

 end.


what is difference in header file and library
what is the return type of sizeof ... unsigned int or unsigned long int
what is memory leak...
malloc realloc... offset pointers


#define square(x) x*x
main()
{
int i;
i = 64/square(4);
printf("%d",i);
}

Answer:
64

Explanation:
the macro call square(4) will substituted by 4*4 so the expression becomes i = 64/4*4 . Since / and * has equal priority the expression will be evaluated as (64/4)*4 i.e. 16*4 = 64


Predict the output or error(s) for the following:

main()
{
int i;
printf("%d",scanf("%d",&i)); // value 10 is given as input here
}

Answer:
1

Explanation:
Scanf returns number of items successfully read and not 1/0. Here 10 is given as input which should have been scanned successfully. So number of items read is 1.

Configuring Disks for ASM

Configuring Disks for ASM

To configure disks for use with ASM on AIX, follow these steps:

    If necessary, install the shared disks that you intend to use for the ASM disk group and restart the system.

    To make sure that the disks are available, enter the following command on every node:

    # /usr/sbin/lsdev -Cc disk


    The output from this command is similar to the following:

    hdisk0 Available 1A-09-00-8,0  16 Bit LVD SCSI Disk Drive
    hdisk1 Available 1A-09-00-9,0  16 Bit LVD SCSI Disk Drive
    hdisk2 Available 17-08-L       SSA Logical Disk Drive


    If a disk is not listed as available on any node, enter the following command to configure the new disks:

    # /usr/sbin/cfgmgr


    Enter the following command on any node to identify the device names for the physical disks that you want to use:

    # /usr/sbin/lspv | grep -i none


    This command displays information similar to the following for each disk that is not configured in a volume group:

    hdisk2     0000078752249812   None


    In this example, hdisk2 is the device name of the disk and 0000078752249812 is the physical volume ID (PVID). The disks that you want to use might have a PVID, but they must not belong to a volume group.

    If a disk that you want to use for the disk group does not have a PVID, enter a command similar to the following to assign one to it:

    # /usr/sbin/chdev -l hdiskn -a pv=yes


    On each of the other nodes, enter a command similar to the following to identify the device name associated with each PVID on that node:

    # /usr/sbin/lspv | grep -i 0000078752249812


    Depending on how each node is configured, the device names might differ between nodes.

    To enable simultaneous access to a disk device from multiple nodes, you must set the appropriate Object Data Manager (ODM) attribute listed in the following table to the value shown, depending on the disk type:
    Disk Type     Attribute     Value
    SSA or FAStT disks     reserve_lock     no
    ESS, EMC, HDS, CLARiiON, or MPIO-capable disks     reserve_policy     no_reserve

    To determine whether the attribute has the correct value, enter a command similar to the following on all cluster nodes for each disk device that you want to use:

    # /usr/sbin/lsattr -E -l hdiskn

    If the required attribute is not set to the correct value on any node, enter a command similar to one of the following on that node:

        SSA and FAStT devices:

        # /usr/sbin/chdev -l hdiskn  -a reserve_lock=no


        ESS, EMC, HDS, CLARiiON, and MPIO-capable devices:

        # /usr/sbin/chdev -l hdiskn  -a reserve_policy=no_reserve


    Enter commands similar to the following on any node to clear the PVID from each disk device that you want to use:

    # /usr/sbin/chdev -l hdiskn -a pv=clear


    Enter commands similar to the following on every node to change the owner, group, and permissions on the character raw device file for each disk that you want to add to the disk group:

    # chown oracle:dba /dev/rhdiskn
    # chmod 660 /dev/rhdiskn


    Note:
    If you are using a multi-pathing disk driver with ASM, make sure that you set the permissions only on the correct logical device name for the disk.

    The device name associated with a disk might be different on other nodes. Make sure that you specify the correct device name on each node.

    If you also want to use raw devices for storage, refer to the "Configure Raw Devices" section.

    Otherwise, refer to the "Verify the Cluster Software Configuration" section.

ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_1" ORA-29280: invalid directory path ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS", line 2436 ORA-06512: at line 1

Errors in file $ORA_BASE/diag/rdbms/oastdb/oastdb1/trace/oastdb1_j001_22085770.trc:
ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_1"
ORA-29280: invalid directory path
ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS", line 2436
ORA-06512: at line 1
Tue May 22 22:15:12 2012


Following errors in the alert.log file:

ORA-12012: error on auto execute of job “ORACLE_OCM”.”MGMT_CONFIG_JOB_2_1?
ORA-29280: invalid directory path

This messages happen because of the OCM collection database job is unable to access the directory location where the OCM data is written .

you do not use OCM delete the OCM configuration from the database:

Log in to your database as user SYS and drop-cascade user ORACLE_OCM:
SQL> DROP USER ORACLE_OCM CASCADE;

If you using OCM to upload collection to My Oracle Support  please refer to note [ID 1378564.1 to re instrument your database


Ora-12012: Error On Auto Execute Of Job "Oracle_ocm"."Mgmt_config_job_2_1" [ID 1378564.1]
      Modified 13-DEC-2011     Type PROBLEM     Status PUBLISHED    

In this Document
  Symptoms
  Cause
  Solution

Applies to:
Oracle Configuration Manager - Version: 10.0.0 and later   [Release: and later ]
Information in this document applies to any platform.
Symptoms

Following errors in the alert.log file:

ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_1"
ORA-29283: invalid file operation
Cause

The CM database job is out of sync with the OCM



Solution

This messages happen because of the OCM collection database job is unable to access the directory location where the OCM data is written .


If you using OCM to upload collection to My Oracle Support please re instrument the database:

1. export ORACLE_HOME=<path to the database home>
    export ORACLE_SID=<Database SID>

2.  Please remove the OCM configuration in the database:

     cd $ORACLE_HOME/ccr/bin
     ./configCCR -r

3. Please configure the OCM configuration in the database:

    ./configCCR -a <CSI> <MyOracleSupport ID>

4.  Instrument the Database:

     cd /ccr/admin/scripts
     ./installCCRSQL.sh collectconfig -s <SID> -r SYS

5.  Run a manual collection:

    cd $ORACLE_HOME/ccr/bin
    ./emCCR collect

If you do not use OCM delete the OCM configuration from the database:

Log in to your database as user SYS and drop-cascade user ORACLE_OCM:
SQL> DROP USER ORACLE_OCM CASCADE;

Error to start dbconsole in Oracle 10gR2 on AIX

Error to start dbconsole. Getting Following error while running dbca

Could not complete the Enterprise Manager configuration.
Enterprise manager configuration failed due to the following error -
Error starting Database Control

Metalink note suggests it is due to CS certificate expired, Need to apply Patch 8350262

redo log file move SQL commands.txt

ALTER DATABASE RENAME FILE '/gfsredo1/OASTDB/onlinelog/t1_mf_3_7yzxyt3y_.log' TO '/gfsdb/OASTDB/onlinelog/o1_mf_3_7yzxyt3y_.log';
ALTER DATABASE ADD LOGFILE MEMBER '/gfsredo1/OASTDB/onlinelog/redo1.log' TO GROUP 2;

Migrate VOTE and OCR ASM disk in Oracle

Migrate VOTE and OCR ASM disk in Oracle

To migrate OCR

ocrconfig add +OCR
ocrconfig delete +DATA
ocrcheck

To migrate Votedisk

crsctl replace css votedisk +VOTE
crsctl css query votedisk



Move Redo log file to other ASM Diskgroup.txt

alter system set db_create_online_log_dest_1='+REDODG1' scope=spfile;

select l.group# , l.bytes , l.status , lf.member from v$logfile lf , v$log l where lf.group# = l.group#;
show parameter db_create_file_dest;

select name,group_number from v$asm_diskgroup;

show parameter db_create_online_log_dest_1;
alter system set db_create_online_log_dest_1='+REDODG1' scope=spfile;


alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
alter database drop logfile group 4;
alter database drop logfile group 5;
alter database drop logfile group 6;
alter database drop logfile group 7;
alter database drop logfile group 8;

alter database add logfile group 1 size 1073741824;
alter database add logfile group 2 size 1073741824;
alter database add logfile group 3 size 1073741824;
alter database add logfile group 4 size 1073741824;
alter database add logfile group 5 size 1073741824;
alter database add logfile group 6 size 1073741824;
alter database add logfile group 7 size 1073741824;
alter database add logfile group 8 size 1073741824;

alter system switch logfile;


CRS-5008: Invalid attribute value: en1 for the network interface

Cluster Verification check "CRS Integrity" succeeded on nodes: rac11,rac12.
This test checks the integrity of Oracle Clusterware stack across the cluster nodes.
PRVF-4555 : Node application "ora.xxxx.vip" does not exist on node "rac12"PRVF-4557 : Node application "ora.net1.network" is offline on node "rac12"
PRVF-4557 : Node application "ora.xxxx.vip" is offline on node "rac11"PRVF-4557 : Node application "ora.net1.network" is offline on node "xxxx"
Cluster Verification check failed on nodes: xxx,yyy.
This test checks the existence of Node Applications on the system.
Cluster Verification check "Time zone consistency" succeeded on nodes: xxx,yyy.
This task checks for the consistency of time zones across systems.

Unique database identifier check passed.
Validation of server pool succeeded.
Scan listener is not running from Grid Infrastructure home.
Default Listener "LISTENER" is not configured in the Grid Infrastructure home.

/gfsdb/ is  shared across the cluster nodes.
/gfsdb/ has enough space. Required space is 1749 MB , available space is 40759 MB.
File Validations Successful.



2013-08-02 09:17:49.740: [ora.net1.network][2340] {1:40226:380} [start] subnetnumber=192.xx.xx.0
2013-08-02 09:17:49.740: [   AGENT][2340] {1:40226:380} UserErrorException: Locale is
2013-08-02 09:17:49.741: [ora.net1.network][2340] {1:40226:380} [start] Agent::commonStart Exception UserErrorException
2013-08-02 09:17:49.741: [   AGENT][2340] {1:40226:380} UserErrorException: Locale is AMERICAN_AMERICA.US7ASCII
2013-08-02 09:17:49.741: [   AGENT][2340] {1:40226:380} UserErrorException: Locale is
2013-08-02 09:17:49.741: [   AGENT][2340] {1:40226:380} UserErrorException: Locale is AMERICAN_AMERICA.US7ASCII
2013-08-02 09:17:49.742: [ora.net1.network][2340] {1:40226:380} [start] clsnUtils::error Exception type=2 string=
CRS-5017: The resource action "ora.net1.network start" encountered the following error:
CRS-5008: Invalid attribute value: en1 for the network interface


Reason
Mismatch in OCR and OS SUBNETMASK or SUBNETNUMBER

Solution
Check the subnet registered on OCR

/grid/bin/crsctl status resource ora.net1.network -p


confirm with the interface on OS
ifconfig <interface_name>

Change the value at OCR by following commands

/grid/bin/srvctl config nodeapps -a
oracle@rac11:/home/oracle/abhishek/bin > /grid/bin/srvctl config nodeapps -a
Network 1 exists
Subnet IPv4: 192.xxx.xxx.0/255.255.255.0/en1, dhcp
Subnet IPv6:
VIP exists: network number 1, hosting node rac11
VIP IPv4 Address: -/rac11-vip/192.xxx.xxx.xxx
VIP IPv6 Address:
root@rac11:/home/oracle/abhishek/bin > /grid/bin/srvctl modify nodeapps -n rac11 -A 192.xxx.xxx.xxx/255.255.252.0/en1
root@rac11:/home/oracle/abhishek/bin > /grid/bin/srvctl modify nodeapps -n rac12 -A 192.xxx.xxx.xxx/255.255.252.0/en1

Confirm with command

/grid/bin/crsctl status resource ora.net1.network -p

Monday, 15 April 2013

Error While Synchronizing Image bundle with Oracle Software bundle....

Error While Synchronizing Image bundle with Oracle Software bundle....


[2013-04-13 04:35:55:894 CDT] 00000036 IconAssetServ E com.ibm.cloud.icn.repository.IconAssetService copyAssetArtifact Failed to copy asset - could not open
inputStream: sanvolume://00000200A021975A/@/600507680280865D680000000000008D -> sanvolume://00000200A021975A/@/600507680280865D680000000000008D

Saturday, 13 April 2013

Error in Installing IBM Image Construction and Composition Tool (ICCT) on IBM AIX 7.1

Error in Installing IBM Image Construction and Composition Tool (ICCT) on IBM AIX 7.1


While installing ICCT Tool on IBM AIX 7.1 you can encounter following error

> /opt/IBM/InstallationManager/eclipse/tools/imcl input /tmp/icct/icon/icon_silent_install_response_file.xml -acceptLicense -sVP

Preparing Image Construction and Composition Tool.
(100% of < 1 MB at 48 KB/sec; 0 seconds remain)
(100% of < 1 MB at 614 KB/sec; 0 seconds remain)
(100% of < 1 MB at 107 KB/sec; 0 seconds remain)
(100% of < 1 MB at 244 KB/sec; 0 seconds remain)
(100% of < 1 MB at 819 KB/sec; 0 seconds remain)
Initialize for eclipse
Pre-configuring com.ibm.cloud.icon.installer.license
Pre-configuring com.ibm.cloud.icon.installer.panels
Pre-configuring com.ibm.cloud.icon.installer.validators
Pre-configuring com.ibm.cloud.icon.installer.prereq.drouter
Pre-configuring com.ibm.cic.check.agent13.update
Pre-install for eclipse
Installing com.ibm.cloud.icon.installer.license
Installing com.ibm.cloud.icon.installer.panels
Installing com.ibm.cloud.icon.installer.validators
Installing com.ibm.cloud.icon.installer.prereq.drouter
Installing com.ibm.cic.check.agent13.update
Post-install for eclipse
Configuring com.ibm.cloud.icon.installer.license
Configuring com.ibm.cloud.icon.installer.panels
Configuring com.ibm.cloud.icon.installer.validators
Configuring com.ibm.cloud.icon.installer.prereq.drouter
Configuring com.ibm.cic.check.agent13.update
Complete for eclipse
Resolving the references in "Image Construction and Composition Tool".
Getting file names from com.ibm.cloud.icon_1.2.2.28.offering.
Processing com.ibm.cloud.icon.main_asm_1.2.2.28.assembly.
Processing com.ibm.cloud.icon.core_1.2.0.28.su.
Processing com.ibm.cloud.icon.installContext_1.2.0.28.su.
Processing com.ibm.cloud.icon.licenseagreements_1.2.0.28.su.
Processing com.ibm.cloud.icon.jre_1.2.0.28.su.
Getting file names from com.ibm.cloud.icon_1.2.2.28.offering.
Computing feature dependencies of Image Construction and Composition Tool.
Image Construction and Composition Tool Application
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool.  (100% of < 1 MB at 244 KB/sec; 0 seconds remain)
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool.  (100% of < 1 MB at 819 KB/sec; 0 seconds remain)
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool.  (100% of < 1 MB at 53 KB/sec; 0 seconds remain)
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool.  (100% of < 1 MB at 244 KB/sec; 0 seconds remain)
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool.  (100% of < 1 MB at 819 KB/sec; 0 seconds remain)
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Initialize for eclipse
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Pre-configuring com.ibm.cloud.icon.installer.license
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Pre-configuring com.ibm.cloud.icon.installer.panels
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Pre-configuring com.ibm.cloud.icon.installer.validators
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Pre-configuring com.ibm.cloud.icon.installer.prereq.drouter
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Pre-configuring com.ibm.cic.check.agent13.update
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Pre-install for eclipse
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Installing com.ibm.cloud.icon.installer.license
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Installing com.ibm.cloud.icon.installer.panels
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Installing com.ibm.cloud.icon.installer.validators
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Installing com.ibm.cloud.icon.installer.prereq.drouter
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Installing com.ibm.cic.check.agent13.update
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Post-install for eclipse
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Configuring com.ibm.cloud.icon.installer.license
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Configuring com.ibm.cloud.icon.installer.panels
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Configuring com.ibm.cloud.icon.installer.validators
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Configuring com.ibm.cloud.icon.installer.prereq.drouter
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Configuring com.ibm.cic.check.agent13.update
Preparing Image Construction and Composition Tool.
Preparing Image Construction and Composition Tool. Complete for eclipse
Preparing Image Construction and Composition Tool.
Analyzing Image Construction and Composition Tool
Processing com.ibm.cloud.icon.main_asm
Processing com.ibm.cloud.icon.installContext
Processing com.ibm.cloud.icon.jre
Processing com.ibm.cloud.icon.core
Processing com.ibm.cloud.icon.licenseagreements
Calculating requirements and dependencies.
Computing prerequisite plan
Calculating requirements and dependencies.
Computing prerequisite plan
Installing.
Processing com.ibm.cloud.icon.main_asm
Processing com.ibm.cloud.icon.installContext
Processing com.ibm.cloud.icon.jre
Processing com.ibm.cloud.icon.core
Processing com.ibm.cloud.icon.licenseagreements
Calculating requirements and dependencies.
Computing prerequisite plan
Calculating requirements and dependencies.
Computing prerequisite plan
Extracting metadata replacements.
Preparing metadata replacements.
Performing metadata replacements.
(100% of < 1 MB at 53 KB/sec; 0 seconds remain)
(100% of < 1 MB at 107 KB/sec; 0 seconds remain)
Collecting: /tmp/icct/icon
(100% of < 1 MB at 251 KB/sec; 0 seconds remain)
(100% of < 1 MB at 568 KB/sec; 0 seconds remain)
Collecting: /tmp/icct/icon
(100% of < 1 MB at 313 KB/sec; 0 seconds remain)
Collecting: /tmp/icct/icon
Retrieving files. 0 KB of 343 MB (1%) completed.
Retrieving files. 77 MB of 343 MB (23%) completed.
Retrieving files. 211 MB of 343 MB (62%) completed.
Retrieving files. 341 MB of 343 MB (99%) completed.
.
Verifying.
Saving package metadata.
(100% of < 1 MB at 264 KB/sec; 0 seconds remain)
(100% of < 1 MB at 671 KB/sec; 0 seconds remain)
(100% of < 1 MB at 626 KB/sec; 0 seconds remain)
Initialize for ant
Initialize for native
Initialize for nativeAix
Pre-configuring install.jre.aix.ppc64
Pre-configuring install.icon.licenseagreeement
Pre-configuring install.icon.core
Pre-install for ant
Pre-install for native
Pre-install for nativeAix
Installing install.jre.aix.ppc64
Extracting zip com.ibm.java.aix.ppc64.jre 6.0.9.2 (0% of 77 MB)
Extracting zip com.ibm.java.aix.ppc64.jre 6.0.9.2 (42% of 77 MB at 33819 KB/sec; 1 seconds remain)
Extracting zip com.ibm.java.aix.ppc64.jre 6.0.9.2 (64% of 77 MB at 25536 KB/sec; 1 seconds remain)
Extracting zip com.ibm.java.aix.ppc64.jre 6.0.9.2 (94% of 77 MB at 24951 KB/sec; 0 seconds remain)
Extracting zip com.ibm.java.aix.ppc64.jre 6.0.9.2 (99% of 77 MB at 25124 KB/sec; 0 seconds remain)
Installing install.icon.licenseagreeement
Extracting zip com.ibm.cloud.icon.licenseagreements 1.2.0.28 (0% of 2 MB)
Extracting zip com.ibm.cloud.icon.licenseagreements 1.2.0.28 (99% of 2 MB at 7385 KB/sec; 0 seconds remain)
Installing install.icon.core
Extracting zip icn.app.x86.linux 1.2.0.28 (0% of 264 MB)
Extracting zip icn.app.x86.linux 1.2.0.28 (21% of 264 MB at 57212 KB/sec; 3 seconds remain)
Extracting zip icn.app.x86.linux 1.2.0.28 (43% of 264 MB at 58972 KB/sec; 2 seconds remain)
Extracting zip icn.app.x86.linux 1.2.0.28 (64% of 264 MB at 58144 KB/sec; 1 seconds remain)
Extracting zip icn.app.x86.linux 1.2.0.28 (96% of 264 MB at 65442 KB/sec; 0 seconds remain)
Extracting zip icn.app.x86.linux 1.2.0.28 (99% of 264 MB at 64737 KB/sec; 0 seconds remain)
Extracting zip icn.scripts 1.2.0.28
Extracting zip icn.scripts 1.2.0.28 (93% of < 1 MB at 230 KB/sec; 0 seconds remain)
.
Cleaning up saved files.
Cleaning up saved files. Cleaning up saved files.
Cleaning up saved files.
Cleaning up saved files.  (100% of < 1 MB at 264 KB/sec; 0 seconds remain)
Cleaning up saved files.
Cleaning up saved files.  (100% of < 1 MB at 1007 KB/sec; 0 seconds remain)
Cleaning up saved files.
Cleaning up saved files.  (100% of < 1 MB at 626 KB/sec; 0 seconds remain)
Cleaning up saved files.
Cleaning up saved files. Deleting zip com.ibm.java.aix.ppc64.jre 6.0.9.2.
Cleaning up saved files.
Cleaning up saved files. Deleting zip icn.scripts 1.2.0.28.
Cleaning up saved files.
Cleaning up saved files. Deleting zip com.ibm.cloud.icon.licenseagreements 1.2.0.28.
Cleaning up saved files.
Cleaning up saved files. Deleting zip icn.app.x86.linux 1.2.0.28.
Cleaning up saved files.
Cleaning up saved files. Deleting xml file com.ibm.cloud.icon.core.install_1.2.0.28.
Cleaning up saved files.
Cleaning up saved files.  (100% of < 1 MB at 1007 KB/sec; 0 seconds remain)
Cleaning up saved files.
Cleaning up saved files.  (100% of < 1 MB at 626 KB/sec; 0 seconds remain)
Cleaning up saved files.
ERROR: Error during "install" phase:
  ERROR: exec returned: 1
    exec returned: 1

--------------------------------------------------------------------------------------------------------

Unfortunately, Verbose output of the installation doesnot tell you anything about the exact problem...

So, to handle this error we need to check the ANT log files under following directory

/var/ibm/InstallationManager/logs/ant/

Excerpt of the log file.....
----------------------------------------------------------------------------------------------------------------------
 [exec] CWPZT0854E: An I/O problem has occurred, please check the exception to determine the problem.
     [exec] java.io.IOException: There is not enough space in the file system.
----------------------------------------------------------------------------------------------------------------------

So now you know the problem. Simply increase the file system (mostly it would be /var as that is the place where ICCT will get installed). I increased it by 2GB and after that everything went fine......