Operating System - HP-UX
1834197 Members
2641 Online
110065 Solutions
New Discussion

How to avoid /tmp/nmtaba* files?

 
SOLVED
Go to solution
Thomas Schler_1
Trusted Contributor

How to avoid /tmp/nmtaba* files?

Hi,

on /tmp of our servers (running HPUX 10.20), I see more than 1000 files named like e.g. nmtaba12510. "nmtaba" always is the leading string, and the appended 5 digit number seems to represent a process id (just my assumption). The number of these files is continously increasing filling up the filesystem slowly.

Does anybody know what process is creating these files? How can I avoid the creation of these files?
no users -- no problems
8 REPLIES 8
linuxfan
Honored Contributor

Re: How to avoid /tmp/nmtaba* files?

Hi Thomas,

Lots of times users create temporary files in /tmp filesystem but they never clean it up.
Do you have lot of old files or have they been created at the same time, in any case you could do something as simple as

fuser -u /tmp/nmtaba*

This would list if any process is still writing to a file, if not you will have see the owner(s) of that file(s) and find out why are they not cleaning up? And delete the files if not being used.

Further planning would have to be to setup cron to remove older files
find /tmp -name /tmp/nmtaba\* -mtime +7 -exec rm {} \;
(this would remove files /tmp/nmtaba older than 7 days )

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sanjay_6
Honored Contributor

Re: How to avoid /tmp/nmtaba* files?

Hi Thomas,

Like Ramesh said, lot of process create temporary files. They do this in either /tmp or /var/tmp. Some of these are created by the system too when we run some of the system commands, like ifconfig, lanscan, landiag, swcopy, sam and such commands.

You can setup a cron job as advised by Ramesh to clean the Old files from your /tmp. you can also Set the Flag in the rc boot script so that tmp gets cleaned during boot. You have to do some periodic maintainance to keep running out of space on tmp.

Hope this helps.

Thanks
Thomas Schler_1
Trusted Contributor

Re: How to avoid /tmp/nmtaba* files?

Ramesh:

Thanks for your hints. The ownership of the /tmp/nmtaba* files always is uid=root, gid=root. The content always is a list of mounted filesystems (local and NFS), as shown in /etc/mnttab. Therefore, I don't think of these files being created by any ordinary user process. These files must come from a root process, maybe EMS or so (I don't know).

Several files (0 to 20) are created each day (e.g. two days before, 17 files were created, yesterday, one file was created, today, no file was created, up til now). The newest file is not necessarily active or opened by a running process.

Sanjay:

Thank you for your hint on clean_tmps.

Does anybody know of files /tmp/nmtaba* created by any root process?
no users -- no problems
linuxfan
Honored Contributor

Re: How to avoid /tmp/nmtaba* files?

Hi Thomas,

Its possible the script is being run from cron, is there a specific time when the scripts are getting created?

You could something like (as root)
crontab -l |grep nmtaba

(this would give you a crontab entry which is creating those files if indeed its a script which is creating them)

If you do find that it is a script then you can probably modify the script to remove the temporary files


-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Thomas Schler_1
Trusted Contributor

Re: How to avoid /tmp/nmtaba* files?

There is no specific file creation time, e.g.:
front-root> date;ll -t nmtaba*|head
Thu Sep 13 18:22:38 METDST 2001
-rw-r--r-- 1 root root 1794 Sep 12 11:57 nmtaba20052
-rw-r--r-- 1 root root 1799 Sep 11 17:16 nmtaba00144
-rw-r--r-- 1 root root 1105 Sep 11 15:21 nmtaba03016
-rw-r--r-- 1 root root 1068 Sep 11 13:25 nmtaba02209
-rw-r--r-- 1 root root 1043 Sep 11 12:23 nmtaba14569
-rw-r--r-- 1 root root 1134 Sep 11 11:21 nmtaba12248
-rw-r--r-- 1 root root 2911 Sep 11 10:25 nmtaba09907
-rw-r--r-- 1 root root 2911 Sep 11 09:21 nmtaba07955
-rw-r--r-- 1 root root 1134 Sep 11 08:20 nmtaba06198
-rw-r--r-- 1 root root 1134 Sep 11 07:20 nmtaba04479

The crontab listing doesn't show up any hint.

Does anybody know of files /tmp/nmtaba* created by any root process?
no users -- no problems
linuxfan
Honored Contributor

Re: How to avoid /tmp/nmtaba* files?

Hi Thomas,


Actually it is highly possible that the crontab -l won't show the log file.

Do you have any scripts which are being run from crontab or at?

Do a grep in those scripts.

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Thomas Schler_1
Trusted Contributor

Re: How to avoid /tmp/nmtaba* files?

Yes, I have root cron jobs running. I examined all the scripts, but /tmp/nmtaba* files are nowhere created.

Does anybody know of files /tmp/nmtaba* created by any root process or application run by root?
no users -- no problems
Bill Hassell
Honored Contributor
Solution

Re: How to avoid /tmp/nmtaba* files?

An extensive search through docs and code fails to find any filename starting with nmtaba in HP-UX or common applications.

Conventional script and program techniques dictate the use of name$PID so I would start by searching through the usual suspects in /use, /opt as in:

find /usr /opt /home | fgrep nmtaba

Another method is to run a cron job for a day or so that every few minutes performs a ps -ef and fgrep for nmtaba to try to catch the process in action. Hopefully, it will catch the culprit with a full pathname or other clues.


Bill Hassell, sysadmin