开发者

coreadm solaris command equvalent in linux?

开发者 https://www.devze.com 2023-01-10 07:08 出处:网络
what is the equivalent of coreadm开发者_开发问答 solaris command in linuxcoreadm allows you to configure various aspects of core file generation (naming patterns, logging, ...) on Solaris systems. Lin

what is the equivalent of coreadm开发者_开发问答 solaris command in linux


coreadm allows you to configure various aspects of core file generation (naming patterns, logging, ...) on Solaris systems. Linux isn't as feature rich here and only allows you to customize the name of the core files. This can be done by writing a format string into /proc/sys/kernel/core_pattern.

See man 5 core for the details.


Using the method discussed here (see man -s5 core, under Piping core dumps to a program ), you could do something along these lines (with root permissions of course):

 ~ cat /proc/sys/kernel/core_pattern
|/path/to/a/script some arguments

... and put together a script that reads the coredump on stdin and writes it out to a file whose path is dictated in some other fashion.

From a security standpoint, this seems like a very scary thing to do though. There's a lot of potential gotchas.

As mentioned on the sigquit blog, it looks like changes to /proc/sys/kernel/core_pattern are impermanent and you'd need to make changes to /etc/sysctl.conf by editing it directly, or using sysctl.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号