1833555 Members
3008 Online
110061 Solutions
New Discussion

Stderr problem

 
Steve Lee_7
Occasional Advisor

Stderr problem

Currently, we are running oracle & SAP
There is directory /usr/sap/NA1 that create stderr log for SAP application

The problem is stderr2 log is growing more than capacity of this file system

Only solution is reboot the server
Right now we made null copy stderr log

please check the following logs and give me solution


-rw-rw-rw- 1 na1adm sapsys 160 Jun 20 15:10 stderr1
-rw-r--r-- 1 root sys 0 Jun 22 05:59 stderr2
-rw-rw-rw- 1 na1adm sapsys 8177662481 Jun 22 11:02 stderr2.old
-rwxrwxrwx 1 na1adm sapsys 174 Jun 20 15:10 stderr3
-rwxrwxrwx 1 na1adm sapsys 174 Jun 20 15:10 stderr4
-rwxrwxrwx 1 na1adm sapsys 0 Jun 20 15:10 stdout1
-rwxrwxrwx 1 na1adm sapsys 0 Jun 20 15:10 stdout2
-rwxrwxrwx 1 na1adm sapsys 0 Jun 20 15:10 stdout3
-rwxrwxrwx 1 na1adm sapsys 0 Jun 20 15:10 stdout4
seauxsp1:/usr/sap/NA1/DVEBMGS00/work>du -sk
81372 .
seauxsp1:/usr/sap/NA1/DVEBMGS00/work>du -sk stderr2.old
5 stderr2.old
seauxsp1:/usr/sap/NA1/DVEBMGS00/work>bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg07/lvol11 6144000 587819 5210018 10% /usr/sap/NA1
seauxsp1:/usr/sap/NA1/DVEBMGS00/work>
3 REPLIES 3
John Kittel
Trusted Contributor

Re: Stderr problem

the information you provide regarding the sizes, protections, etc. of the log files does not appear to me to be relevant to solving your problem. If the log is too big for the filesystem you potential solutions are things like, a) decrease logging; b) increase filesystem space; c) truncate and or move the logfiles more frequently; etc...

or perhaps I am misunderstanding the question or situation...
Victor Fridyev
Honored Contributor

Re: Stderr problem

Hi,

The best way with unnneded log files is to cofigure them as /dev/null in appropriate config files. If this is impossible, run the following cron job, if you don't need to store the files:

cd /usr/sap/NA1
ls -t stderr* | while read FNAME; do
echo > $FNAME
done

Run this script according to the files growing.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Sridhar Bhaskarla
Honored Contributor

Re: Stderr problem

Hi,

I would first find the process that is using this file. If it is constantly growing, then run 'fuser stderr2' and it should list out the processes that opened this file and fix them.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try