This website is not affiliated with, sponsored by, or approved by SAP AG.

stderr files

Basis (Basis Technology Modules: Basis Component/System Administration, GUIs)

Moderators: Snowy, thx4allthefish

stderr files

Postby Luniz » Thu May 15, 2014 8:00 am

I did a search, and couldn't find anything related to what I want to ask, which an extremely quick question (and answer, if known).

Does anyone know if it is possible to empty an stderr file while a SAP system is up and running (for example, using cat /dev/null > stderrfile ) ?

Are there any implications of doing this, or is it simply not possible etc?
Luniz
 
Posts: 4
Joined: Thu May 15, 2014 7:57 am

Re: stderr files

Postby blueteeth » Thu May 15, 2014 11:10 am

Yes, it is possible and okay to delete stderr files while SAP is up and running.

But please ensure, you are deleting only stderr files. On curiosity, a strange way to
delete using /dev/null. Why not use your trusted rm?

BT
blueteeth
 
Posts: 499
Joined: Sat Apr 05, 2008 12:22 pm

Re: stderr files

Postby Luniz » Fri May 16, 2014 4:30 am

I was wary about simply deleting it in case it was in use by the system. Clearing it should leave it still available to use for the application. It seems that I can't do this either though :(

The command seems to work, as in it returns to the command prompt, but the file is unaltered. I guess the system is hanging on to it for dear life. I have even tried creating a blank file and ftp'ing (with overwrite) to the server, and still no joy. Ah well, I guess a restart is the only option, sadly.
Luniz
 
Posts: 4
Joined: Thu May 15, 2014 7:57 am

Re: stderr files

Postby blueteeth » Fri May 16, 2014 1:06 pm

I'd have a worry. Why is stderr growing so big you may want to empty/delete it?

Perhaps your kernel needs upgrading.

I now release, it cannot be removed by rm.

Please use

> filename

or

cat /dev/null >/pathtofilename/filename

Best
BT
blueteeth
 
Posts: 499
Joined: Sat Apr 05, 2008 12:22 pm

Re: stderr files

Postby Snowy » Sun May 18, 2014 12:30 pm

deleting this file will not work. Why? Because SAP will still write to the @deleted@ file becasue it knows its inode.

the best trick is the last from blueteeth:

cat /dev/null >/pathtofilename/filename

This will keep the inode of the file but really empty it.
SapFans Moderator

Search: http://www.sapfans.com/forums/search.php
Notes: http://service.sap.com/notes
Help: http://help.sap.com
Rules: http://www.sapfans.com/forums/viewtopic.php?t=344127
Snowy
 
Posts: 28767
Joined: Mon Oct 21, 2002 2:33 pm
Location: 3.1415926535

Re: stderr files

Postby Luniz » Tue May 20, 2014 2:49 am

blueteeth wrote:I'd have a worry. Why is stderr growing so big you may want to empty/delete it?

Perhaps your kernel needs upgrading.


It is a result of our latest kernel upgrade, and SAP replied to say that the messages being generated are related to the IGS Watchdog. The solution they have given is to download the latest IGS, which does in fact resolve the issue. Unfortunately, since last posting, the issue has been resolved on both the development and test environments, which leaves only the production system with a problem. So in terms of the solution you provided (many thanks by the way) I'm a bit reluctant to try it live on production. Although, I'm not sure how that is different to what I've already tried? I was within the work directory and using "cat /dev/null > stderr1". The only difference I see with your suggestion is that it's specifying the full filesystem path?
Luniz
 
Posts: 4
Joined: Thu May 15, 2014 7:57 am

Re: stderr files

Postby blueteeth » Tue May 20, 2014 1:19 pm

Luniz,

It is not about my way or your way or the Unix way. Please do whatever it takes.

I firmly believe that SAP BASIS Administrator or Unix Administrator should be nonchalant by nature. Address the root cause and be done with it. In this case, I think, your kernel patch needs a remedy.

Best,
BT
blueteeth
 
Posts: 499
Joined: Sat Apr 05, 2008 12:22 pm

Re: stderr files

Postby Luniz » Thu May 22, 2014 5:54 am

blueteeth wrote:Luniz,

It is not about my way or your way or the Unix way. Please do whatever it takes.

I firmly believe that SAP BASIS Administrator or Unix Administrator should be nonchalant by nature. Address the root cause and be done with it. In this case, I think, your kernel patch needs a remedy.

Best,
BT


My apologies. I wasn't suggesting that either way was better at all. I was just trying to understand how it would be different. I absolutely appreciate the replies and assistance. If we still had the issue on development or QA I would be happy to try it, but production is a little more sensitive. As it is, we have planned a shutdown on Saturday to update the kernel, so all should be resolved after that anyway.

Many thanks for the support, very much appreciated.
Luniz
 
Posts: 4
Joined: Thu May 15, 2014 7:57 am


Return to Basis

Who is online

Users browsing this forum: No registered users and 8 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.