-1

I am debugging one application on embedded machine which doesn't have much space in it. We are running one application which is crashing and there is no sufficient space to save core file. Is there a way that can used to save this core file on any remote machine ? This machine is accessible on local network. Remotely connected server has huge space and can be used to save any file.

I tried to use command generate-core-file but that is trying to save coredump on local machine.

  • 1
    Mount a remote disk from the server on the embedded machine. – n. m. could be an AI May 29 '23 at 07:14
  • 1
    If you can mount a remote disk as @n.m. says, then it may be as simple as just cd'ing into the mounted directory before running the application. Otherwise, check out the core(5) man page and read about `/proc/sys/kernel/core_pattern`. You can use this to have the core file written to the location of your choice, or even to have it piped into an arbitrary program which could take care of copying it elsewhere. (Using something like scp may be tricky because it won't have terminal access to read a password, nor to your ssh-agent via the environment.) – Nate Eldredge May 29 '23 at 16:23

1 Answers1

0

We are running one application which is crashing and there is no sufficient space to save core file.

The usual way to deal with this situation is to run the crashing application under gdbserver.

Once the application crashes, you could either debug it right there and then, or use GDB generate-core-file command to save the core on the development machine.

I tried to use command generate-core-file but that is trying to save coredump on local machine.

Isn't that exactly what you want? After all, the embedded machine has no space, so the core would have to go somewhere else.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362