2017-08-16 61 views
0
已經運行的進程

我明白,我可以做下面的條目在/ etc啓用新工藝核心轉儲/ profile文件 ulimit -c unlimited >/dev/null 2>&1啓用核心轉儲在紅帽

是它無論如何可以啓用核心轉儲已經運行進程?

回答

1

this post說,

(在CentOS /紅帽)如果你有一個內核2.6.32+,您可以手動更改如下:

cd /proc/7671/ 
[[email protected] 7671]# cat limits | grep nice 
Max nice priority   0     0 
[[email protected] 7671]# echo -n "Max nice priority=5:6" > limits 
[[email protected] 7671]# cat limits | grep nice 
Max nice priority   5     6 

否則,您可以使用prlimit工具(與UTIL-Linux的2.21介紹),如下:

[[email protected] 986]# prlimit --core=1000000 --pid 23578 
[[email protected] 986]# prlimit --pid 23578 | grep CORE 
CORE  max core file size     1000000 1000000 bytes 

希望它可以幫助