Network problem determination: AIX tools for a system administrator: Part 1, The basics of network troubleshooting:
Monitoring a Slow system
very good site for aix admin
Tuning AIX Network Performance
This Blog is first of all memos for me!! From time to time I get exposed to new and cool stuff for developers and architects ,most of the time its a solution for a problem or tips or tricks, so, I would like to track my memos and share it with you, it can save your time and nervous, I hope you will enjoy it - by Yaniv Tzanany.
Search This Blog
Showing posts with label AIX. Show all posts
Showing posts with label AIX. Show all posts
Tuesday, July 19, 2016
Monday, February 24, 2014
CCache - speed C++ compiler output
ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.
to make it work on aix with xlC_r compiler , i used the next steps:
i download the sources and compile them on aix via g++ compiler
i copied the output ccache program into my build machine.
i set the next environment to make support xlC_r compiler:
export CCACHE_EXTENSION=i (this tell the compiler to generate preprocessor file with i extension)
helper settings FYI:
export CCACHE_DISABLE=1 (to avoid using ccache)
export CCACHE_LOGFILE=/yaniv/ccachelog.log (to see ccache log)
enjoy
Yaniv Tzanany
to make it work on aix with xlC_r compiler , i used the next steps:
i download the sources and compile them on aix via g++ compiler
i copied the output ccache program into my build machine.
i set the next environment to make support xlC_r compiler:
export CCACHE_EXTENSION=i (this tell the compiler to generate preprocessor file with i extension)
helper settings FYI:
export CCACHE_DISABLE=1 (to avoid using ccache)
export CCACHE_LOGFILE=/yaniv/ccachelog.log (to see ccache log)
enjoy
Yaniv Tzanany
Monday, November 4, 2013
Using the GNU C/C++ compiler on AIX
very good article to people who want to port their C++ code that compiled under XLC compiler to work and compile via gcc/g++.
Using the GNU C/C++ compiler on AIX:
from internal test ...( not scientific tests)- its seems like the test program i used for my performence testing run faster when compile with g++ !!!!
FYI
Yaniv Tzanany
Using the GNU C/C++ compiler on AIX:
from internal test ...( not scientific tests)- its seems like the test program i used for my performence testing run faster when compile with g++ !!!!
FYI
Yaniv Tzanany
Thursday, August 16, 2012
How to Debug C++ program running on AIX from Windows
great and easy way to debug your running c++ program on aic from windows.
here is the complete video guide.
http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.compileraix/compileraix/10.1/Quick_Start_Guide/Launching_a_Debug_Session/player.html
the PDF doc could be found here http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/topic/com.ibm.iea.compileraix/compileraix/10.1/Quick_Start_Guide/Launching_a_Debug_Session.pdf
Enjoy
Yaniv Tzanany
here is the complete video guide.
http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.compileraix/compileraix/10.1/Quick_Start_Guide/Launching_a_Debug_Session/player.html
the PDF doc could be found here http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/topic/com.ibm.iea.compileraix/compileraix/10.1/Quick_Start_Guide/Launching_a_Debug_Session.pdf
- The IBM Debugger for AIX is Eclipse-based. It is based on the Client/Server architecture. The client, or the User Interface is what you interact with. It is based on Eclipse and all platforms of IBM Debugger products have a similar-looking UI. However, they talk to a different engine. The Debug Engine controls the user’s application. With the help of expression evaluator, it can debug C, C++, Cobol , and PL/I programs. On ZSeries, the engine can also debug high level assembly. The UI calls the engine by establishing a TCP/IP connection to the debugger engine. Users can debug on I-series, TPF mainframe, Z-series, AIX and on Windows®. But before you attempt to launch a debug session, make sure your program is compiled with –g option. Otherwise, no source is displayed. This presentation illustrates how to launch a debug session on Windows.
- There are other options that affect debugging. -qfullpath will affect the ability of the debugger to find source files. -qlinedebug suppresses information on variables. -qtbtable can be used to suppress traceback tables. This can affect the ability of the debugger to build stack traces. -O should not be used. Debugging optimized code is possible, but the results can be misleading. Consult the your compiler documentation for more information.
- This presentation illustrates how to launch a debug session on Windows. On Windows, from Start->All Programs->IBM->IBM Debugger for AIX->IBM Debugger for AIX, you can launch the UI. You can also set a shortcut to the UI program and place it on your desktop and double click the icon. Once the UI is launched, there are several steps to follow in order to launch a debug session.
- Step 1: Select a profile location. Once the debugger is launched, you are prompted for a profile location. This is a place for breakpoint setting, view setting, and any other customization that you have done to the user interface. You can select the check box “Use this as the default and do not ask again” to bypass this dialogue in the future.
- Step 2: Check the Debugger Daemon. By default, the debugger daemon is set to port 8001, you will need to know the number when launching the debug engine. In the UI, under the debugger daemon, circled in red, there are controls that let you: stop listening, change port, and obtain workstation IP. Information provided from these controls is necessary for step 3.
- Step 3: Launching the debugger engine From a telnet/ssh session to the AIX machine where the debugger engine resides, the irmtdbgc –qhost=workstation:port a.out command line will launch the debugger engine. You can also attach to a running process by using the –a flag. Note that if you use the default 8001 port, it is not necessary to specify the port. In the examples here, you are launching the debugger engine to connect to the host sunshine, default port 8001, to debug a program a.out, core file and attach to a process.
- You can also specify the default host and port with the DER_DBG_ADDR environment parameter. For example, you can put the export statement in your profile export DER_DBG_ADDR=host:port And then launch the debugger engine in a simpler way. irmtdbgc a.out will then launch the debugger engine to connect to host sunshine, port 8001 to debug program a.out
Enjoy
Yaniv Tzanany
Tuesday, November 3, 2009
Max Application memory size under AIX
First i like to mention a very good article that describe in more details this issue , 64-Bit Addressing for Technical Applications .
In general 32bit application under aix 5.X can use maximum 256M of memory - that not too match, to increase the memory you can use the next parameter while compile your application -bmaxdata.
The default value of maxdata (-bmaxdata:0 or not included in the load command) for 32-bit applications is 256 MB. The maximum allowed for 32-bit applications is 2 GB. For 64-bit applications, the maxdata default value is unlimited. A maximum can be imposed if restrictions are necessary, but a large limit doesn't penalize job or system performance.
These recommendations are applicable to most applications:
32-bit applications: -bmaxdata: 0x80000000 (eight 256 Mbyte segments)
64-bit applications: don't use -bmaxdata; the default is unlimited .
On later versions of AIX 5L (5.1 maintenance release 2 or higher), a new allocation scheme called dsa is available for 32-bit applications. It's specified by:
-bmaxdata:0x80000000/dsa
The difference between the 2 options is as follows:
Large address space model:
-bmaxdata:0x80000000 allows to use 8 segments (2GB) of data.
Very Large Address space model:
-bmaxdata:0xD0000000/dsa
Same as above but dsa = Dynamic Segment Allocation:
Segments are not saved for data area, but are obtained dynamically.
With dsa a program can have maximum 13 segments (3.25GB)
So if you don't need more than 2GB, you don't need dsa option.
read more about Large Program Support.
Now i hope you understand why you are getting yours segmentation fault.
Yaniv T
In general 32bit application under aix 5.X can use maximum 256M of memory - that not too match, to increase the memory you can use the next parameter while compile your application -bmaxdata.
The default value of maxdata (-bmaxdata:0 or not included in the load command) for 32-bit applications is 256 MB. The maximum allowed for 32-bit applications is 2 GB. For 64-bit applications, the maxdata default value is unlimited. A maximum can be imposed if restrictions are necessary, but a large limit doesn't penalize job or system performance.
These recommendations are applicable to most applications:
32-bit applications: -bmaxdata: 0x80000000 (eight 256 Mbyte segments)
64-bit applications: don't use -bmaxdata; the default is unlimited .
On later versions of AIX 5L (5.1 maintenance release 2 or higher), a new allocation scheme called dsa is available for 32-bit applications. It's specified by:
-bmaxdata:0x80000000/dsa
The difference between the 2 options is as follows:
Large address space model:
-bmaxdata:0x80000000 allows to use 8 segments (2GB) of data.
Very Large Address space model:
-bmaxdata:0xD0000000/dsa
Same as above but dsa = Dynamic Segment Allocation:
Segments are not saved for data area, but are obtained dynamically.
With dsa a program can have maximum 13 segments (3.25GB)
So if you don't need more than 2GB, you don't need dsa option.
read more about Large Program Support.
Now i hope you understand why you are getting yours segmentation fault.
Yaniv T
Monday, September 21, 2009
Show directory size in UNIX
the next line works perfectly under AIX.
du -gs /var/* | sort
the results will be the directory size sorted under the /var directory.
YanivT
du -gs /var/* | sort
the results will be the directory size sorted under the /var directory.
YanivT
Tuesday, November 25, 2008
job's memory/process usage under UNIX
To see all processes memory usage and more run the next command in your console.
ps -e -o "%z %C %U %p %t %c" |sort -n
%z ought to show the virtual size of each process in KB , and we sort the output from min usage to max.
very good tips about Managing processes on AIX Systems
ps -e -o "%z %C %U %p %t %c" |sort -n
%z ought to show the virtual size of each process in KB , and we sort the output from min usage to max.
very good tips about Managing processes on AIX Systems
Subscribe to:
Posts (Atom)