当前位置: 技术问答>linux和unix
大家好,帮我看下,下面是什么原因导致的。
来源: 互联网 发布时间:2016-09-01
本文导语: 我运行一个程序,运行几天后程序的内存就消耗完了,最后程序就跑不动了,我用lsof -p 进程id 查看,发现 20353 audit_app 23r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb不断增多,就...
我运行一个程序,运行几天后程序的内存就消耗完了,最后程序就跑不动了,我用lsof -p 进程id 查看,发现 20353 audit_app 23r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb不断增多,就是打开的文件数不断增多,没有释放,最终导致内存耗尽,请问那位大侠是否知道是什么原因吗?
$ lsof -p 20353
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
log_app 20353 audit_app cwd DIR 8,2 4096 18956504 /home/audit_app/logsys2.0/logsys/auditlogcs/bin
log_app 20353 audit_app rtd DIR 8,2 4096 2 /
log_app 20353 audit_app txt REG 8,2 3736506 18956545 /home/audit_app/logsys2.0/logsys/auditlogcs/bin/log_app
log_app 20353 audit_app mem REG 8,2 51924 524325 /lib/libnss_files-2.3.2.so
log_app 20353 audit_app mem REG 8,2 7886 9896060 /opt/ora9/product/9.2/lib/libwtc9.so
log_app 20353 audit_app mem REG 8,2 1563240 14106626 /lib/tls/libc-2.3.2.so
log_app 20353 audit_app mem REG 8,2 707856 1212522 /usr/lib/libstdc++.so.5.0.3
log_app 20353 audit_app mem REG 8,2 30420 524408 /lib/libgcc_s-3.4.6-20060404.so.1
log_app 20353 audit_app mem REG 8,2 212852 14106628 /lib/tls/libm-2.3.2.so
log_app 20353 audit_app mem REG 8,2 91368 524309 /lib/libnsl-2.3.2.so
log_app 20353 audit_app mem REG 8,2 97644 14106630 /lib/tls/libpthread-0.60.so
log_app 20353 audit_app mem REG 8,2 14728 524305 /lib/libdl-2.3.2.so
log_app 20353 audit_app mem REG 8,2 10247869 9896080 /opt/ora9/product/9.2/lib/libclntsh.so.9.0
log_app 20353 audit_app mem REG 8,2 2784 524407 /lib/libcwait.so
log_app 20353 audit_app mem REG 8,2 106532 524292 /lib/ld-2.3.2.so
log_app 20353 audit_app 0u CHR 136,0 2 /dev/pts/0
log_app 20353 audit_app 1u CHR 136,0 2 /dev/pts/0
log_app 20353 audit_app 2u CHR 136,0 2 /dev/pts/0
log_app 20353 audit_app 3r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 4w REG 8,2 186765 18694387 /home/audit_app/logsys2.0/logsys/auditlogcs/log/ap.log
log_app 20353 audit_app 5u REG 8,2 0 18956542 /home/audit_app/logsys2.0/logsys/auditlogcs/ap/lockfile
log_app 20353 audit_app 6w REG 8,2 186765 18694387 /home/audit_app/logsys2.0/logsys/auditlogcs/log/ap.log
log_app 20353 audit_app 7r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 8r REG 8,2 6656 25034839 /opt/ora9/product/9.2/precomp/mesg/sqlus.msb
log_app 20353 audit_app 9r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 10u IPv4 20779922 TCP 10.36.16.246:33811->10.36.65.232:3666 (ESTABLISHED)
log_app 20353 audit_app 11u IPv4 20779932 TCP 10.36.16.246:33813->10.36.65.232:3667 (ESTABLISHED)
log_app 20353 audit_app 12r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 13r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 14r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 15r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 16u unix 0xe6264d00 20782396 socket
log_app 20353 audit_app 17u unix 0xf04c4200 20782397 socket
log_app 20353 audit_app 18r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 19r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 20r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 21r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 22r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 23r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 24r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 25r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 26r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 27r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 28r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 29r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 30r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 31r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 32r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 33r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 34r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 35r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 36r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 37r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 38r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 39r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 40r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 41r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 42r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 43r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 44r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 45r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 46r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 47r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 48r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 49r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 50r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 51r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 52r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 53r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 54r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 55r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 56r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 57r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 58r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 59r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 60r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 61r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 62r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 63r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 64r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 65r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 66r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 67r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 68r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 69r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
$ lsof -p 20353
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
log_app 20353 audit_app cwd DIR 8,2 4096 18956504 /home/audit_app/logsys2.0/logsys/auditlogcs/bin
log_app 20353 audit_app rtd DIR 8,2 4096 2 /
log_app 20353 audit_app txt REG 8,2 3736506 18956545 /home/audit_app/logsys2.0/logsys/auditlogcs/bin/log_app
log_app 20353 audit_app mem REG 8,2 51924 524325 /lib/libnss_files-2.3.2.so
log_app 20353 audit_app mem REG 8,2 7886 9896060 /opt/ora9/product/9.2/lib/libwtc9.so
log_app 20353 audit_app mem REG 8,2 1563240 14106626 /lib/tls/libc-2.3.2.so
log_app 20353 audit_app mem REG 8,2 707856 1212522 /usr/lib/libstdc++.so.5.0.3
log_app 20353 audit_app mem REG 8,2 30420 524408 /lib/libgcc_s-3.4.6-20060404.so.1
log_app 20353 audit_app mem REG 8,2 212852 14106628 /lib/tls/libm-2.3.2.so
log_app 20353 audit_app mem REG 8,2 91368 524309 /lib/libnsl-2.3.2.so
log_app 20353 audit_app mem REG 8,2 97644 14106630 /lib/tls/libpthread-0.60.so
log_app 20353 audit_app mem REG 8,2 14728 524305 /lib/libdl-2.3.2.so
log_app 20353 audit_app mem REG 8,2 10247869 9896080 /opt/ora9/product/9.2/lib/libclntsh.so.9.0
log_app 20353 audit_app mem REG 8,2 2784 524407 /lib/libcwait.so
log_app 20353 audit_app mem REG 8,2 106532 524292 /lib/ld-2.3.2.so
log_app 20353 audit_app 0u CHR 136,0 2 /dev/pts/0
log_app 20353 audit_app 1u CHR 136,0 2 /dev/pts/0
log_app 20353 audit_app 2u CHR 136,0 2 /dev/pts/0
log_app 20353 audit_app 3r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 4w REG 8,2 186765 18694387 /home/audit_app/logsys2.0/logsys/auditlogcs/log/ap.log
log_app 20353 audit_app 5u REG 8,2 0 18956542 /home/audit_app/logsys2.0/logsys/auditlogcs/ap/lockfile
log_app 20353 audit_app 6w REG 8,2 186765 18694387 /home/audit_app/logsys2.0/logsys/auditlogcs/log/ap.log
log_app 20353 audit_app 7r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 8r REG 8,2 6656 25034839 /opt/ora9/product/9.2/precomp/mesg/sqlus.msb
log_app 20353 audit_app 9r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 10u IPv4 20779922 TCP 10.36.16.246:33811->10.36.65.232:3666 (ESTABLISHED)
log_app 20353 audit_app 11u IPv4 20779932 TCP 10.36.16.246:33813->10.36.65.232:3667 (ESTABLISHED)
log_app 20353 audit_app 12r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 13r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 14r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 15r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 16u unix 0xe6264d00 20782396 socket
log_app 20353 audit_app 17u unix 0xf04c4200 20782397 socket
log_app 20353 audit_app 18r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 19r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 20r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 21r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 22r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 23r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 24r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 25r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 26r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 27r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 28r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 29r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 30r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 31r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 32r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 33r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 34r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 35r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 36r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 37r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 38r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 39r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 40r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 41r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 42r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 43r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 44r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 45r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 46r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 47r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 48r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 49r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 50r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 51r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 52r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 53r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 54r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 55r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 56r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 57r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 58r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 59r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 60r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 61r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 62r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 63r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 64r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 65r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 66r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 67r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 68r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
log_app 20353 audit_app 69r REG 8,2 15872 10600539 /opt/ora9/product/9.2/rdbms/mesg/ocius.msb
|
在程序退出之前执行一下EXEC SQL COMMIT RELEASE