LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Core files on /tmp folder (https://www.linuxquestions.org/questions/linux-server-73/core-files-on-tmp-folder-4175414923/)

oscargim 07-04-2012 04:13 PM

Core files on /tmp folder
 
Hi, Im having a lot of files on my /tmp and they are generated almost every second, and they are filling my hard disk.

I dont know what can be causing this

This is a bit of the ls


core.levelagency.com-2012-07-04T18:06:03-0300
core.levelagency.com-2012-07-04T18:06:07-0300
core.levelagency.com-2012-07-04T18:06:12-0300
core.levelagency.com-2012-07-04T18:06:16-0300
core.levelagency.com-2012-07-04T18:06:20-0300
core.levelagency.com-2012-07-04T18:06:24-0300
core.levelagency.com-2012-07-04T18:06:28-0300
core.levelagency.com-2012-07-04T18:06:32-0300
core.levelagency.com-2012-07-04T18:06:37-0300
core.levelagency.com-2012-07-04T18:06:41-0300
core.levelagency.com-2012-07-04T18:06:45-0300
core.levelagency.com-2012-07-04T18:06:49-0300
core.levelagency.com-2012-07-04T18:06:53-0300
core.levelagency.com-2012-07-04T18:06:57-0300
core.levelagency.com-2012-07-04T18:07:02-0300
core.levelagency.com-2012-07-04T18:07:06-0300
core.levelagency.com-2012-07-04T18:07:10-0300


and it keeps creating files every second


I hace a centOS 5.8 32bits


Thanks

es0teric 07-04-2012 04:19 PM

Kind of hackish, but you could do 'lsof' in a loop and grep for '/tmp' to see which process opens it. Unless a process core dumping is handled by the kernel - not sure.

Code:

while :; do lsof | grep '/tmp'; done

chrism01 07-05-2012 12:00 AM

If you use
Code:

ls -l core.levelagency.com
(lowercase L there) that should show you which user acct is doing this.

oscargim 07-06-2012 02:07 AM

[root@levelagency tmp]# ls -l core.levelagency.com
ls: core.levelagency.com: No such file or directory
[root@levelagency tmp]#

oscargim 07-06-2012 02:21 AM

Quote:

Originally Posted by es0teric (Post 4719381)
Kind of hackish, but you could do 'lsof' in a loop and grep for '/tmp' to see which process opens it. Unless a process core dumping is handled by the kernel - not sure.

Code:

while :; do lsof | grep '/tmp'; done



when I run that code get this,I cut this piece cause it never stops until I press break on kayboard


mysqld 14526 mysql 11u REG 3,67 0 29556757 /tmp/ibYy9ScN (deleted)
httpd 14984 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15019 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15024 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15050 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15056 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15088 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15105 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15108 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 25103 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 25591 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 29564 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 29567 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 29568 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 1685 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
java 2324 root mem REG 3,67 32768 4981029 /tmp/hsperfdata_root/2324
httpd 2352 root 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
safe_aste 2396 root cwd DIR 3,67 2740224 15740 /tmp
xfs 2434 xfs 3u unix 0xf6f0b3c0 0t0 6334 /tmp/.font-unix/fs7100
sc_serv 3493 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
sc_serv 3553 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
sc_serv 3585 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 3665 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
bash 4444 root cwd DIR 3,67 2740224 15740 /tmp
sleep 9649 root cwd DIR 3,67 2740224 15740 /tmp
lsof 9650 root cwd DIR 3,67 2740224 15740 /tmp
grep 9651 root cwd DIR 3,67 2740224 15740 /tmp
lsof 9652 root cwd DIR 3,67 2740224 15740 /tmp
httpd 10684 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 11607 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 11681 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 12604 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 12606 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
mysqld 14526 mysql 4u REG 3,67 0 29556752 /tmp/ibpYyHjZ (deleted)
mysqld 14526 mysql 5u REG 3,67 0 29556753 /tmp/ibGocNMq (deleted)
mysqld 14526 mysql 6u REG 3,67 0 29556754 /tmp/ibTP9SfS (deleted)
mysqld 14526 mysql 7u REG 3,67 0 29556755 /tmp/ib4sxCNj (deleted)
mysqld 14526 mysql 11u REG 3,67 0 29556757 /tmp/ibYy9ScN (deleted)
httpd 14984 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15019 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15024 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15050 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15056 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15088 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15105 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 15108 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 25103 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 25591 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 29564 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 29567 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 29568 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
httpd 1685 apache 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
java 2324 root mem REG 3,67 32768 4981029 /tmp/hsperfdata_root/2324
httpd 2352 root 72u REG 3,67 0 21233738 /tmp/ZCUDqQa0Ma (deleted)
safe_aste 2396 root cwd DIR 3,67 2740224 15740 /tmp
xfs 2434 xfs 3u unix 0xf6f0b3c0 0t0 6334 /tmp/.font-unix/fs7100


It never stops listing.. I just captured that piece of the list

oscargim 07-07-2012 03:39 PM

I take a look to the core files with gdb command

#gdb

#core-file your core file name


and I see the dumps was generated by my asterisk server, so I stoped it to check config on it

I still cant find what wrong on asterisk but at least there are not more core files stoping asterisk.



Thanks!

chrism01 07-08-2012 08:55 PM

Ok, maybe I could have been a tad clearer; what I meant(!) was pick ONE file and run that cmd on it to find out who is creating it eg
Code:

ls -l core.levelagency.com-2012-07-04T18:06:03-0300

oscargim 08-14-2012 10:50 AM

I take a look at error files with gdb and it was asterisk generating it.. reinstalled asterisk problem solved.. thanks!


All times are GMT -5. The time now is 08:47 PM.