Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to redirect core files from the root file system?

Status
Not open for further replies.

eskolnik

Technical User
Sep 4, 2002
117
US
Is there a way to redirect core files from the root file system? It says that cores go to the working directoty, but we have a process that starts in the rc scripts. It does a cd xxxxx thaen starts a deamon. The cores still go to root (/), how come?

ed

Ed Skolnik
 
you mean rc running in booting phase ?
the usr is root and (normally) his home is /
this script cores in all probability before
doing the cd
OR
works perfectly AND the next rc produce it.
file core will say the causing exec.
 
you mean rc running in booting phase ?
Yes

and no the script does'nt core before the "cd" the actual deamon cores..............

Just a thought

cd xxx
/opt/sometimething/runme.exec


if I do

(cd xxx; /opt/sometimething/runme.exec)


won't it run as as the same shell and thed new home would be xxx??????


ed

(cd

Ed Skolnik
 
What's that????


when you run a shell command wrapped in ( ) it't run's all of it in the same shell

Ed Skolnik
 
i mean:
(cd xxx; /opt/sometimething/runme.exec)
this is perfect, and what's in /opt/sometimething/runme.exec
maybe a cd OR a su OR a setuid prog
OR what-you-want....i don't know what's in it
you do not analyze the probl
 
That's bull....

The deamon cores and I want the core to go to something other than root (/)... forget this whole line of ???? , I 'll just call HP support................ Thanks for trying anyway...

ed

Ed Skolnik
 
Workaround - set up a cron job to periodically look for core files in / and if found, move them to wherever you like, renaming them as necessary.
 
the daemon may be stubborn, it may be chdir'ing into / though you started it somewhere else. run it under chroot if you want the core file. if you dont want the core files just make a directory there named 'core'. i am not sure of this, but cant you set ulimit for that shell (ulimit -c 0)? i guess ulimit works on a per shell basis.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top