This blog contains experience gained over the years of implementing (and de-implementing) large scale IT applications/software.

Cleaning Up /tmp for SAP On SLES On Azure

In an Azure SLES 12 Linux VM the default installation image mounts the /tmp file system as a regular file system off the root (/). Historically, for many Unix/Linux environments, this is not “normal”.

In this post I will discuss what the impact is for this irregular setup of /tmp and what you can do to work around it, ensuring SAP continues to work as usual.

What is “Normal”?

In traditional Linux installations the /tmp file system is usually mounted as a temporary file system (tmpfs), which means it would be cleaned on O/S reboot.
This has been the case for many years. There’s a recent post here that highlights 1994 for Solaris.
Plus, you can find a detailed explanation of tmpfs here:

With the default SLES setup, any files placed into /tmp will not be automatically be cleaned up on reboot and as per the previous links, there can be performance reasons to use a tmpfs.

From memory, there are differing standards on what /tmp should be used for (again see here), and it is possible that the traditional setup is no longer following a newly agreed standard. I really am not certain why SLES does not mount /tmp as tmpfs.
All I know from over 20 years of working with different Unix/Linux products, is that it is generally accepted that /tmp is a dumping ground, that gets cleaned on reboot and from what I can see, SAP think the same.

What is the Impact of /tmp Not Being tmpfs?

When you have /tmp and it is not cleaned on reboot and is not a tmpfs, then it can cause issues when using software that expects some form of clean up to be performed.
When I look at some of the SAP systems in Azure on SLES 12, I see a build up of files in the /tmp directory, which results in the need for a scripted job to clean them up on a periodic cycle.

If some of the more prolific files are not cleaned up regularly, then they can build up into many thousands of files. While this shouldn’t impact the day-to-day running of the SAP system, it can impact some ad-hoc operations such as patching the SAP system or the database.
The reason is that sometimes the patching tools write out files to the /tmp area, then crudely perform a “ls” to list files or find files in that location. If there are many thousands of files, then those listing operations can fail or be delayed.
A perfect example if the patching of the SAP ASE database, which can be affected by thousands of files in the /tmp location.

Finally, with the /tmp directory mounted off the root disk, any filling of /tmp will fill your root disk and this will bring your VM to a halt pretty quickly! Be careful!

What Sort of Files Exists in /tmp ?

In the list below, I am looking specifically at SAP related files and some files that are culprits for building up in the /tmp directory.

File Name PatternDescription
.saphostagent_nnnnnSAP Host Agent run files.
.sapicmnnnSAP ICM run file.
.sapstartsrv##_sapstartsrv.logSAP Instance Agent run file.
.sapstreamnnnnSAP IPC files.
.theagentlives.tmpOwned by Sybase O/S user, is related to SAP ASE instance. Maybe JS Agent.
ctisql_*Temporary iSQL executions using sybctrl.
SAP JVM execution.
sapinst_instdirFrom an execution of SWPM (contains sapinst).
saplg*Owned by sapadm and are part of the SAP Instance Agent logon ticket generated from the Hostagent.
sb*From an ASE installation.
tmp*Owned by root, lots and lots, possibly Azure agent related as they contain the text “Windows Azure CRP Certificate Generator” when passed through a base64 decoder.
tmp.*Lots and lots, seem to be Kerberos related.

How Can We Clean Up these Files?

The most common way is to use a script.
Within the script will be a “find” statement, which finds the specific files and removes each one.
It needs to be done this way, because if there are too many files, then trying to do “rm /tmp/tmp*” will exceed the number of lines in the shell space for globbing and it will either error or produce no output at all and no files will be removed.

The script will need to be executed as root frequently (maybe weekly or even daily) to ensure that the file quantities are kept consistently low. This can be achieved using an enterprise scheduler or a crontab on each server.

Here’s an example of how to clean up the /tmp/tmp* files with a very specific criteria. The files are removed if they are:

  • located in the /tmp directory
  • with a name length of at least 7 chars beginning with ‘tmp’ followed by A-z or 0-9 at least 4 times.
  • last modified more than 7 days ago.
  • owned by root, with a group of root.
find /tmp -type 'f' -regextype posix-awk -regex '/tmp/tmp[A-z0-9]{4,} -mtime +7 -user root -group root -delete -print

The above will remove the files due to the “-delete”. To test it, just remove the “-delete”.

In summary, you should check how /tmp is setup in your VMs, and then check the files that are created in /tmp.

Blog Readership, Almost 7,000

Since December 2013, my blog readership has really taken off.
It’s nearly at 7,000 page views per month:


Which is the most popular post of all time, well it’s still my multi-post guide to basic performance tuning a SAP system (published in 2011), but very closely followed by my recent HANA installation into a VM post.
You will also notice that a lot of readers are looking for the FICO authorisation objects F_REGU_BUK and F_REGU_KOA:


We can see that the US is very dominant in the stats, secondly India and then Germany.  The UK is in 4th place:


It’s a close call between IE and Chrome in the browsers used.
Good job I’ve written my free extension for searching SAP notes, in Chrome!


Thanks for reading everyone.
I hope I’ve provided you with the solutions you’ve sought.


Fuci Fuci insect Italia

Whilst in Puglia in the south of Italy, I’ve come across the locally named Fuci Fuci insect (in dialeto) which is Puliese dialect for “run run”.
A quick search of the internet doesn’t tell you what this insect is actually called, based on the dialect name, not surprising.
It’s a member of the centipede family and is known as the House Centipede.  It is documented here:
It’s harmless and is probably on the hunt for spiders!
Still, it creeps me out that something can run 0.5 meters in 1 second!

Broken 2,000 page views per month!

Just a quick note to say thanks to all readers who have recommended this site, my posts and articles, commented or just browsed.  I’m glad that it has served so many people and I’ve really enjoyed seeing the reader count increase over the past months.

I’ve finally made it past the 2,000 page views per month target after only 18 months of being an active blogger.  I’m now hoping to hit 5,000 in the next 6 months…

If you have found this site helpful, then help others find it by clicking the Google +1 link on posts, or linking on your own blog site or Linkedin or Facebook.

Many thanks,


Downtime & Language Barriers

Whilst I took some time out on holiday, I was able to get away from the almost non-existent UK summer and off to a much warmer climate.
It got me thinking about the language of IT and the difficulties that other non-native English speakers may be exposed too when trying to decipher Oracle docs or SAP notes, or any other form of documentation.

In my experience, I’ve often had difficulty reading SAP notes that have been translated to English from German and Oracle docs that have been written in English from the off, but badly worded.
I think the Plain English Campaign would have a field day with some of the material I’ve had to put up with.

If you’re working with a mission critical system and you can’t be 100% sure on what the documentation is asking you to do, could it reflect badly on you as a professional?  Possibly.

I guess Google Translate is probably the most preferred tool for translating notes and docutentation, unless the reader is confident enough in what they already know.
So would this mean those that perform IT as a profession, in a non-English speaking country, must know the products more in-depth and rely less on the documentation?  Maybe.