Question & Answer
Question
How can I determine what is causing my command to fail?
Answer
- Permissions
- Environment variables
- Missing files
- The truss is run for userA's login shell.
- userA can be any user, including root.
1) Start "Terminal Session A" (Log in as userA)
-----------------------------------------------------------------------
Get current shell.
| $ echo $$ --> 7143448 (Example) |
|
$ tty
--> /dev/pts/3 $ ps -ef | grep "pts/3" | grep "$$" | grep ksh | grep -v grep
-->> userA 7143448 4063484 0 17:54:23 pts/3 0:00 -ksh |
2) Start "Terminal Session B" (Log in as root)
-----------------------------------------------------------------------
Start a truss of the userA login shell
| # truss -t\!lseek,\!_sigaction,\!kioctl -r all -w all -feado /tmp/TSnnnnnnnnn.truss.out -p <PID from #1> |
3) Return to "Terminal Session A" (Still logged in as userA)
-----------------------------------------------------------------------
Invoke the failing command.
| $ <normal command syntax> $ exit $ .....Connection to <hostname> closed |
4) Return to "Terminal Session B (Still logged in as root)
-----------------------------------------------------------------------
The truss exited when the userA ksh process ended.
| 8192252: 11599891: 3.0512: execve("/tmp/testsh", 0x0000000110063F70, 0x0000000110045150) Err#8 ENOEXEC |
| 8192252: 11599891: 3.4349: kopen("/tmp/profile", O_RDONLY) Err#13 EACCES |
|
7864392: 12189719: envp: ODMDIR=/etc/objrepos LANG=JA_JP
7995548: 15007961: 2.5649: kopen("/tmp/profileA", O_RDONLY) = 3
7995548: e x p o r t L A N G = J a _ J P\n
|
| SUPPORT |
|---|
|
If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract. 1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue. 2. Capture any logs or data relevant to the situation. 3. Contact IBM to open a case: -For electronic support, see the IBM Support Community: 4. Provide a clear, concise description of the issue. - For guidance, see: Working with IBM AIX Support: Describing the problem. 5. If the system is accessible, collect a system snap, and upload all of the details and data for your case. - For guidance, see: Working with IBM AIX Support: Collecting snap data |
Related Information
Was this topic helpful?
Document Information
Modified date:
28 February 2022
UID
ibm16560128