Solved

What is the equivalent command to 'truss' on AIX?

Posted on 2003-11-14
13
4,591 Views
Last Modified: 2013-12-06
Hi Experts,

I dint find any 'AIX' category in the Operating systems area, on this site, however, let me still put my Q :-

As you know that there a command 'truss' on Solaris to find details about an OS process.
Whats is couterpart on AIX?

Also,  if somebody can let me know where can I get a brief(but useful for a Oracle DBA) stuff on AIX(like, networking, CPU, RAM etc...whats the parameter to guage these thikngs etc etc.) that would be great ...

both the questions would deserve 200 points!!! if the answers are satisfactory.

thanks in advance,
:PD
0
Comment
Question by:pdthedba
  • 7
  • 4
  • 2
13 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 9745986
syscalls
man syscalls
0
 
LVL 38

Expert Comment

by:yuzh
ID: 9746008
For AIX Oracle stuff:

http://oldlook.experts-exchange.com/Operating_Systems/Unix/Q_20612044.html

PS: I think UNIX TA is the place to put this kind of questions.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 9746025
You might want to download some of the Oracle books:

http://otn.oracle.com/documentation/oracle9i.html
0
 
LVL 1

Author Comment

by:pdthedba
ID: 9746657
Thanks yuzh for your response ....why do you think I am getting this output while I try syscall? :-

[appfrh1@rs9edp]/usr/bin#>/usr/bin/syscall 79528
79528: syscall: 0402-142 System call is not supported by this command.

[appfrh1@rs9edp]/usr/bin#>su - orafrh1
orafrh1's Password:
[orafrh1@rs9edp]/u09/app/oracle#>/usr/bin/syscall 79528
79528: syscall: 0402-142 System call is not supported by this command.

[orafrh1@rs9edp]/u09/app/oracle#>

Even tried from root....but the same result.
Also, I dint find 'syscalls' in my system.
Please suggest.

Cheers,
:PD
0
 
LVL 51

Assisted Solution

by:Netman66
Netman66 earned 25 total points
ID: 9747389
From source: http://www.pugcentral.org/howto/truss.htm

Where can I find truss for my operating system ... ?

Sun Solaris and SunOS

The truss command is available in Solaris 2.X and later. "Truss" was called "trace" on SunOS 4.X (Solaris 1.X).

SVR4 UNIX

All SVR4 and SVR4-derived Unix systems included the truss command.

Hewlett-Packard's HP/UX

The HP-UX 11.0 equivalent command is tusc. For 10.20 & below, use trace-1.6. Both can be found at the HP-UX Porting and Archive Center at http://hpux.cae.wisc.edu/

IBM's AIX

The truss command and the /proc filesystem are available in AIX 5L.

Earlier AIX has a system-call tracing facility like truss, called trcrpt, but it's more difficult to use since it can't be directed at a single process -- turning on the tracing will cause the system to trace all calls made by all processes on the machine, and you can't tell which process made which call from the trace output. The relevant commands are trace, trcstop, and trcrpt; see the AIX documentation for usage information.

SCO Unixware

The truss command is avail on SCO Unixware 7.

Linux

On Linux systems, truss is called strace. Important notes at http://www.wi.leidenuniv.nl/~wichert/strace/

BSD

Under many BSD systems, truss is called ktrace. NetBSD, one of BSD derived systems, introduced "ktruss" command as well as ktrace command since their NetBSD-1.5 release. NetBSD's ktruss has almost same functionality with ktrace, but produces more similar output to SVR4's truss, compared to ktrace.

Microsoft Windows

There is a strace for Windows NT and Windows 2000 systems at http://razor.bindview.com/tools/desc/strace_readme.html
0
 
LVL 1

Author Comment

by:pdthedba
ID: 9749154
OK Guys!!!

I've found the answer of my Qs above now.....but have some more relevant Qs for you:-

yuzh - it seems u've thorough knowledge bout unix/links etc....can you suggest me some good links for Oracle database scripts as well pls(shudn't be a tough one for u!).

yuzh/netman66 - Since I am on AIX 5 so have got the truss already.....however, I am unable to use it for the processes of oracle (unix) id. Actually, whats happening is :-
my oracle user is enterd in 2 groups(/etc/group) and the process is initiated by the same user but groupid 'A' and(somehow) the /proc/<pid> is owned by same unix user(oracle) but different groupid, so the truss is saying...'cant control the process'
so whats the way out pls? to keep the oracle account in only one group? or something else as well?
Also, whats making the process start from different group...how can I change that(remember these are apps processes...Oracle Applications)?
And, finally, what can be the reasons our OS admin might have considered for putting this user in 2 groups please?

Thanks,
:PD

PS - now dont ask me to open another Q please.....becs without these Qs answered I'dn't really get thru....and then it wudn't deserve 200 points. thanks :-))
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 51

Expert Comment

by:Netman66
ID: 9749668
Hmm..

Sounds like this user is in two groups because of the Oracle App.  Meaning, he's in a normal group and one created for Oracle access.

Try this:

Remove the user from the "normal" group (the one that truss is try to enumerate).  Add the entire second group (the one I'm presuming to be for Oracle access) inside the normal group.

Can groups be nested in *nix??

If so, try again to enumerate - there should now be only one GroupID attached to the PID.

Advise.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 9761443

#1
For Oracle database script:

http://www.orafaq.com/scripts/index.htm

Oracle DBAs Pocket Reference
You can download the following scripts: (zip file)
http://examples.oreilly.com/unixoracledbapr/

If you have questions about scripting, just post them in:
http://oldlook.experts-exchange.com/Databases/Oracle/
or
http://oldlook.experts-exchange.com/Programming/Programming_Platforms/Unix_Programming/

#2
"Can groups be nested in *nix??" -- there is no nested groud in *nix !!!!!

#3
"my oracle user is enterd in 2 groups(/etc/group) and the process is initiated by the same user but groupid 'A' and(somehow) the /proc/<pid> is owned by same unix user(oracle) but different groupid, so the truss is saying...'cant control the process'
so whats the way out pls? to keep the oracle account in only one group? or something else as well?
Also, whats making the process start from different group...how can I change that(remember these are apps processes...Oracle Applications)?
And, finally, what can be the reasons our OS admin might have considered for putting this user in 2 groups please?"

    Option 1. make the oracle user belong to one group only (Oracle group only).
    Option 2. set "group set-ID" to your application program. man chmod to learn more
                    details. (set the yourapp own by the oracle group, use chown, then use
                    chmod to set-ID)
                   eg
                               chown oracle yourapp
                               chmod g+s yourapp
0
 
LVL 38

Expert Comment

by:yuzh
ID: 9761838
You can also find some good infor about Oracle:

http://searchoracle.techtarget.com/
0
 
LVL 1

Author Comment

by:pdthedba
ID: 9832236
will close the question in a few days(I am still alive).
I've sent the request to my unix team, I am just waiting for them, in case if they face any issues....will get back to you.

thanks,
:PD
0
 
LVL 1

Author Comment

by:pdthedba
ID: 9838477
Hi yuzh,

let me share with you that we are still having problems with running the truss
What our OS admin thought and did, he changed the primary group of the oracle user(group oaadm was the previous primary group  and the dba was the seconday, he made now the dba primary and the other one secondary.)
however, that theory dint work, we are still getting the same error!
now answering what u suggest :-
Option 1. make the oracle user belong to one group only (Oracle group only).
-- not possible. since the oracle user will have to be in both the groups, dba and oaadm(the application users group).
To be honest with you -  I am not sure why did they do it......but we cant revert back(will take a lot of effort).
Option 2. set "group set-ID" to your application program. man chmod to learn more
                    details. (set the yourapp own by the oracle group, use chown, then use
                    chmod to set-ID)
                   eg
                               chown oracle yourapp
                               chmod g+s yourapp
-- To be honest I couldn't understand properly what u meant here, can you please explain it a bit more?
our oracle process has these permissions :-
-rwsr-s--x   1 ora12    dba        68679944 Nov 22 20:51 /u12/app/oracle/product/9.2.0/bin/oracle

what should we do with it? Shall I try this :-
chmod o+s /u12/app/oracle/product/9.2.0/bin/oracle
I've tried this as well, but the permissions were same again(were not changed) :-
-rwsr-s--x   1 ora12    dba        68679944 Nov 22 20:51 /u12/app/oracle/product/9.2.0/bin/oracle
[ora12@rs12edp]/u12/app/oracle>chmod o+s /u12/app/oracle/product/9.2.0/bin/oracle
[ora12@rs12edp]/u12/app/oracle>ls -l /u12/app/oracle/product/9.2.0/bin/oracle
-rwsr-s--x   1 ora12    dba        68679944 Nov 22 20:51 /u12/app/oracle/product/9.2.0/bin/oracle

why? what I am doint wrong?

thanks,
:PD


0
 
LVL 38

Accepted Solution

by:
yuzh earned 175 total points
ID: 9864605
"what should we do with it? Shall I try this :-
chmod o+s /u12/app/oracle/product/9.2.0/bin/oracle
I've tried this as well, but the permissions were same again(were not changed) :-
-rwsr-s--x   1 ora12    dba        68679944 Nov 22 20:51 /u12/app/oracle/product/9.2.0/bin/oracle
[ora12@rs12edp]/u12/app/oracle>chmod o+s /u12/app/oracle/product/9.2.0/bin/oracle
[ora12@rs12edp]/u12/app/oracle>ls -l /u12/app/oracle/product/9.2.0/bin/oracle
-rwsr-s--x   1 ora12    dba        68679944 Nov 22 20:51 /u12/app/oracle/product/9.2.0/bin/oracle"

-rwsr-s--x   1 ora12    dba        68679944 Nov 22

From what I can see /bin/oracle 's permissions are already sticky enough --
already set "usr + group set-ID" both owner and group has "s" permission.

if you just run /bin/oracle from command line it should be ok.

How do you run the appication? do you use script or other program to call /bin/oracle ?

If your are using a script or wrapper program to call /bin/oracle, make sure you do:

                             
                              chgrp dba yourscript
                              chmod g+s yourscript

                             





0
 
LVL 38

Expert Comment

by:yuzh
ID: 9864615
You can also try to use "nmon" , have a look at the following page for
more details:

http://www-106.ibm.com/developerworks/eserver/articles/analyze_aix/
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now