|
|
| | Display system calls for a program on Unix
You can use truss to view system calls for a specific program, for example:
truss ls
execve("/usr/bin/ls", 0xFFBFFB1C, 0xFFBFFB24) argc = 1
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
resolvepath("/usr/bin/ls", "/usr/bin/ls", 1023) = 11
stat("/usr/bin/ls", 0xFFBFF8E0) = 0
open("/var/ld/ld.config", O_RDONLY) ... | | More... 02/26/10 | | | | |
|
| | See the environment variables for a process when it was started
pargs -e
Example:
ps -ef | grep tnslsnr
oracle 20083 11285 Dec 30 ? 17:22
/apps/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
pargs -e 20083
20083: /apps/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
envp[0]: _=/apps/oracle/product/10.2.0/db_1/bin/lsnrctl
envp[1]: MANPATH=/usr/share/man
envp[2]: SSH_TTY=/dev/pts/1
envp[3]:
PATH=/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/proc/bin:/usr/local/bin:/usr/bin/nsr:/opt/soe/local/bin:/apps/oracle/local/bin:/apps/oracle/product/10.2.0/db_1/bin
envp[4]: ORACLE_BASE=/apps/oracle
envp[5]: AWK=/usr/bin/nawk
envp[6]: ORACLE_PATH=.:/apps/oracle/local/bin
envp[7]: EDITOR=vi
envp[8]: LOGNAME=oracle
envp[9]: MAIL=/usr/mail/oracle
envp[11]: USER=oracle
envp[12]: TNS_ADMIN=/apps/oracle/net/admin
envp[13]: ORA_NLS10=/apps/oracle/product/10.2.0/db_1/nls/data
envp[15]: SHELL=/bin/ksh
envp[16]: ... | |  More... 01/04/10 | | | | |
|
|
| | Removing directories from the bottom up
Sometimes on Solaris (I only saw this problem happen on ZFS) rm -Rf doesn't work properly, it deletes all the files but doesn't remove the directories. The following error message is displayed:
rm: cannot determine if this is an ancestor of the current working directory
The way around this is:
find . -depth ... | |  More... 01/28/09 | | | | |
|
|
| | How to manually clean up shared memory / semaphors
This procedure may be useful for something like Oracle database, SAP or Peoplesoft when application was shutdown but shared memory hasn't been clened up for some reason.
Get the list of all semaphors for a user:
ipcs | grep [username]
Remove (clean up) semaphor:
ipcrm -s [semaphor id]
You can also use the command below ... | |  More... 04/26/07 | | | | |
|
| | Show system parameters on Solaris
The sysdef utility outputs the current system definition in tabular form. It lists all hardware devices, as well as pseudo devices, system devices, loadable modules, and the values of selected kernel tunable parameters.
$ /usr/sbin/sysdef
| | More... 02/06/06 | | | | |
|
| | Probe for devices and reconfigure
This command will probe for devices under /dev and /devices directories and update /etc/path_to_inst file. Have a look at the manual page for command line options.
devfsadm | | More... 12/12/05 | | | | |
|
Page 1 | 2 >> |