UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 18th, 2004, 02:58 PM
Vilo Vilo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 6 Vilo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 26 sec
Reputation Power: 0
Name of core dump file

How can I change default name of core dump file "core", before it will be created ? ( on HP-UX )
Thanks. Vilo

Reply With Quote
  #2  
Old November 18th, 2004, 03:56 PM
Perderabo Perderabo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 121 Perderabo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 54 sec
Reputation Power: 5
I don't think you can do that with HP-UX.

Reply With Quote
  #3  
Old November 19th, 2004, 03:53 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,083 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 44 m 45 sec
Reputation Power: 9
no way, core is hard coded.
why do you want change it?

Reply With Quote
  #4  
Old November 22nd, 2004, 08:00 AM
Vilo Vilo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 6 Vilo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 26 sec
Reputation Power: 0
Name of Core dump file

Quote:
Originally Posted by guggach
no way, core is hard coded.
why do you want change it?

We have all executables in one directory. During development
of our system 2 different processes sometimes crashed down. When it happens during night or weekend - first core is overwritten by second (of another process) - we loose 1. core for analyse.
On True64 UNIX there is a System Parameter for core name
f.e. Procesname of exec and something.
It means we will have to start second process from another directory.

Reply With Quote
  #5  
Old November 22nd, 2004, 10:44 AM
Perderabo Perderabo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 121 Perderabo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 54 sec
Reputation Power: 5
Recent versions of SunOS also has a way to address this. But not HP-UX.

A cron job could run every five minutes to look for cores and rename them. If both process crash too close together that won't help.

Starting each process in a separate directory will work.

A core is generated as the default action of one of several signals. If you have the source for the processes, they can catch all of these signals, chdir to another directory, remove the signal handler, and signal themselves with the original signal. If the process is dying due to stack overflow, there will be no stack left to run the signal handler. You can use sigstack() to provide an alternate stack to avoid that problem.

I don't know of any other solutions for HP-UX.

Reply With Quote
  #6  
Old November 24th, 2004, 05:08 PM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,083 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 44 m 45 sec
Reputation Power: 9
i propose, as long you are devlopping and testing:

core are generate in the `pwd` dir of the user starting the proc,
so create different user with own home-dirs
check permissions and start your progrs using an absolute path
sure you need a script to set env vars

never do that in production env.:
if your progs need a dedicated user (this could be a probl) chmod them
setuid (that user) on exec.

NOTA: i am quite sure, accurate setting of usr-id && grp-id && PATH
will also do the job.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Name of core dump file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway