cancel
Showing results for 
Search instead for 
Did you mean: 

SAPMNT<sys> directory is nearly full

Former Member
0 Kudos

Hi SAP Gurus,

I would like to check if there's an automated way you use to cleanup a directory in sapmnt. Or if there a job that can be executed in a frequency that cleans up the directory so it won't be full.

Replies are appreciated. Feel free to recommend.

Regards,

Rod

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rod,

In my previous project we had implemented below mentioned solution to automate and proactively prevent such situation:

please create a script file including command to remove files older than a certain x number of days say 3 days.

Then execution of script file can be scheduled as OS job like cron tab in unix.

Please let me know if it helps you.

Regards,

Deepa.

Former Member
0 Kudos

Hi Deepa,

Can you share that script you used that can be executed automatically?

Regards,

Rod

former_member185954
Active Contributor
0 Kudos

Hello Rodel,

You must try and make your own script as you will be responsible for your own servers, it is dangerous to ask/use someone else's script without understanding it thoroughly.

Also, noticed that you are asking for scripts that cleanup on /sapmnt !

/sapmnt/ will store potentially only the global directory , for which there are cleanup jobs which some members have already pointed out.

Please take help from your OS Admins, they should be able to help you with this query.

Regards,

Siddhesh

Former Member
0 Kudos

Hi Rod,

In windows, please include below command in a bat file:

forfiles -p "c:\<file location>" -s -m *.* /D -<number of days> /C "cmd /c del @path"

Execution of file can be automated using task scheduler.

Similar approach can be used in other platforms.for example: In Linux, also put command to remove files in a file and then it can be scheduled for automatic execution using crontab.

Please let me know above mentioned steps are not clear.

Regards,

Deepa.

former_member182657
Active Contributor
0 Kudos

Hi Deepa,

Apologies here,i think we're going far away from the exact requirements.The script shared


forfiles -p "c:\<file location>" -s -m *.* /D -<number of days> /C "cmd /c del @path"

is completely related with OS file deletions after 'n ' number of days.Is m right ?

But @Rod is looking for directory /sapmnt and as per me this script is not suitable here,Hope you'll also agree here.

For clearing unwanted from /sapmnt... only standard SAP jobs are relevant & sufficient ( Best would be to refer 

Former Member
0 Kudos

Hello Gaurav,

Scripts can also be used.

In my previous projects, scripts were used to fulfill above requirement successfully.

Regards,

Deepa.

former_member182657
Active Contributor
0 Kudos

Hi Deepa,

I agrees for


Scripts can also be used.

Yes we can use scripts at OS level.

But not accepting


scripts were used to fulfill above requirement

Could you share which files you omitted from /sapmnt directory during your project.

Thanks,

Answers (4)

Answers (4)

Reagan
Advisor
Advisor
0 Kudos

File system /sapmnt holds job logs (/sapmnt/<SID>/global), kernel repository (/sapmnt/<SID>/exe) and also the system profiles (/sapmnt/<SID>/profile). If you want to cleanup the job logs from the the /sapmnt/<SID>/global directory then the standard housekeeping jobs should be scheduled. Scripts are used to delete the files from the OS level.

Brindavan_M
Contributor
0 Kudos

Hi,

Some of the log files will be there like which can be delete manually and automatically, standard jobs can only delete BG log, statics logs, dumps, spool etc.. but the real issue that some third party files might be make full in this filesystem. Better check with ABAP team Al11 or other team and run any UNIX or linux script to move those files.

Thank,

BM

Former Member
0 Kudos

Hi Brindavan,

Your response is much appreciated. The script would be very helpful for the automated cleanup of the directory. Any means to share with me that script you used?

Regards,

Rod

Sriram2009
Active Contributor
0 Kudos

Hi Rodel

Could you refer the SAP Note for USR folder getting full

16513 - File system full - what can you do?


BR

SS

Former Member
0 Kudos

Hi SS,

Thanks for sharing the Snote. Most of its contents are already included in the documentation provided by Guarav.

Regards,

Rod

former_member182657
Active Contributor
0 Kudos

Hi Rod,

If looking for scripts then you could refer SCN doc at

& SCN thread

Hope this will also help you.

Regards,

former_member182657
Active Contributor
0 Kudos

Hi Rodel,

SAPMNT<sys> directory is nearly full

Make sure SAP standard & reorganization jobs has already been scheduled in your system.You could refer SAP Note  16083 - Standard jobs, reorganization jobs.
You need to check for standard jobs by following the mentioned SAP note to resolve such type of issues.

Additionally you could refer SCN doc at

Hope this will help you.

Regards,

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Thanks for your reply. Yes, i have found that documentation yet most of the recommendations are done manually. I am looking for an automated way to do it as the standard cleanup jobs are already in place in our system.

Regards,

Rod