Thanks goes out to following for all their help. Patri Kallberg Mike Salehi Simon-Bernard Drolet Carl-Johan Schenstrom Alan Orndorff John Hallman My goal was to get Solaris to produce core files with names something like core.<processname>.<hostname> This feature was added in 2.8 and higher. Also if your using 2.7, coreadm is included with patch 106541(ver 6 or higher). However, the man page isn't included in 2.7 w/ patch... I am using 2.6 so I didn't get to test out how this works, but it sounds like just what I was looking for. For good detailed info just check out the man page on coreadm.(since its not include in Solaris 7 I've pasted it in below...) Maintenance Commands coreadm(1M) the super-user. OPTIONS The following options are supported: -g pattern Set the global core file name pattern to pattern. The pattern must start with a / and can contain any of the special % variables described in the DESCRIPTION. Only super-users can use this option. -i pattern Set the per-process core file name pattern for init(1M) to pattern. This is the same as coreadm -p pattern 1 except that the setting will be per- sistent across reboot. Only super-users can use this option. -e option... Enable the specified core file option. Specify option as one of the following: global Allow core dumps using global core pattern process Allow core dumps using per-process core pattern global-setid Allow set-id core dumps using global core pattern proc-setid Allow set-id core dumps using per-process core pattern log Generate a syslog(3C) message when genera- tion of a global core file is attempted. Multiple -e and -d options can be specified on the com- mand line. Only super-users can use this option. -d option... Disable the specified core file option. See the -e option for descriptions of possible options. Multiple -e and -d options can be specified on the command line. Only super-users can use this SunOS 5.8 Last change: 11 Nov 1999 3 Maintenance Commands coreadm(1M) option. -p pattern Set the per-process core file name pattern to pattern for each of the specified process-IDs. The pattern can contain any of the special % variables described in the DESCRIPTION and need not begin with /. If it does not begin with /, it will be evaluated relative to the current direc- tory in effect when the process generates a core file. A non-privileged user can apply the -p option only to processes owned by that user. The super- user can apply it to any process. The per- process core file name pattern will be inherited by future child processes of the affected processes. See fork(2). -u Update system-wide core file options from the contents of the configuration file /etc/coreadm.conf. If the configuration file is missing or contains invalid values, default values are substituted. Following the update, the configuration file is resynchronized with the system core file configuration. Only super-users can use this option. OPERANDS The following operands are supported: pid process-ID EXIT STATUS The following exit values are returned: 0 Successful completion. 1 A fatal error occurred while either obtaining or modifying the system core file configuration. 2 Invalid command line options were specified. EXAMPLES Example 1: Setting the core file name pattern When executed from a user's $HOME/.profile or $HOME/.login, the following command sets the core file name pattern for all processes run during the login session: SunOS 5.8 Last change: 11 Nov 1999 4 Maintenance Commands coreadm(1M) example$ coreadm -p core.%f.%p $$ $$ is the process-id of the currently running shell. The per-process core file name pattern is inherited by all child processes. Example 2: Dumping user's files into a subdirectory The following command dumps all of the user's core dumps into the corefiles subdirectory of the home directory, discriminated by the system node name. This is useful for users who use many different machines but have a shared home directory. example$ coreadm -p $HOME/corefiles/%n.%f.%p $$ FILES /etc/init.d/coreadm /etc/coreadm.conf ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWcsu | |_____________________________|_____________________________| SEE ALSO gcore(1), init(1M), exec(2), fork(2), setuid(2), time(2), syslog(3C), core(4), attributes(5) --Original Message--- We are trying to track down a rather nasty problem that started today with some of software but our core files keep getting messed up because we are having a number of things coring all at once. I remember in Digital UNIX we could enable "enhanced core file naming" which would name the core files like "core.program_name.host_name.numeric_tag" Is there anyway to do this in Solaris? Running the apps from separate directories right now isn't an option... I can work around this a number of ways, but I am really looking for a way to doing something like the enhanced naming feature Tru64 has. --------------------------------------------------------------------------- Grant Schoep, grant@storm.com Software Developer L3 Com - Storm Control System Basingstoke, UKReceived on Mon Jun 4 10:09:41 2001
This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:56 EDT