Cleaning Up - NAT - Linux

Hi,
Does anyone know a safe way to clean unused Natural objects from Linux environment? Buffer Pool is not the way, it could be a complement, but, there is a command on Linux - STAT, and this command tells me when it was the last time the module was accessed, modified or changed (meta). Is there any gap/lack on using it? Of course that I will need a program to separate and include a rule (date, time, modules…), but this is the other part of the job.
Tks.

We’re running natural@solaris here and I don’t know the STAT-command. How do you use it? Is it a bufferpool-command?

Hi Matthias,

No, it is Unix/Linux command, try do this: stat /opt/softwareag/nat/fuser/XXX/* where XXX is your librareid. You can use > yyyy.txt to save the result in a file. You will be able to see some information for each object: the last access, modify and change status.
You need to be careful, because any process in your machine could change the information, such as, backup process.
I think BP is not the solution, but it could be a complement.
I don’t have hundred percent sure if this process covers the whole possible gaps, this was the reason that I posted here…
tks.

Hi John,

Ok, got it. You’re talking about the linux-command.

This wouldn’t work on our system. Stat displays the same time as the command ls -lu. And this time differs from the real last usage time. Instead we’re using a bufferpool-statistics for that issue. Example:

$ grep MAPTESTP $HOME/dba/*.xls  # this is my selfmade bufferpool-statistics (first usage/last usage)
MYLIB   MAPTESTP        2011-02-08 08:10:00     2013-07-23 19:00:01
$ cd $NATDIR/fuser/MYLIB/GP/
$ ls -lu MAPTESTP*
-rw-r--r--   1 kbar     sag        15304 May 25 06:17 MAPTESTP.NGP
$

So stat says that MAPTESTP was used some days ago (as you mentioned before, it could be a backup process). But I know: I didn’t use this program for quite a long time. My bufferpool-statistics says: It wasn’t used since 2013.

Matthias

Addition to my last post:

Our bufferpool-statistics works as follows:

  1. every day at 7p.m. natural’s bufferpool is cleaned completely
  2. every five minutes a cronjob analyzes the bufferpool content and does an update on my statistic-file.

The only disadvantage: CATALL loads Maps, LDAs, PDAs etc. into the bufferpool. Even if the regarding program is no longer in use. But I think you got this problem on the stat command as well.

Hi Matthias,

as I am using Linux, it is possible to use the command - STAT, see below the sysout of the command.

File: USR6306P.NGP' Size: 1296 Blocks: 16 IO Block: 4096 Device: fd00h/64768d Inode: 2526815 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ sag) Gid: ( 500/ sag) Access: 2011-04-27 08:00:25.000000000 -0300 Modify: 2011-04-25 08:19:54.000000000 -0300 Change: 2011-04-25 08:19:54.000000000 -0300 File: USR-FLD.NGA’
Size: 302 Blocks: 16 IO Block: 4096
Device: fd00h/64768d Inode: 2526543 Links: 1
Access: (0664/-rw-rw-r–) Uid: ( 500/ sag) Gid: ( 500/ sag)
Access: 2014-04-14 08:41:26.000000000 -0300
Modify: 2011-04-25 03:19:53.000000000 -0300
Change: 2011-04-25 03:19:53.000000000 -0300
File: `USR-MSG.NGA’
Size: 226 Blocks: 16 IO Block: 4096
Device: fd00h/64768d Inode: 2526541 Links: 1
Access: (0664/-rw-rw-r–) Uid: ( 500/ sag) Gid: ( 500/ sag)
Access: 2014-04-14 08:41:26.000000000 -0300
Modify: 2011-04-25 06:19:53.000000000 -0300
Change: 2011-04-25 06:19:53.000000000 -0300

I got a mistake, the command must be issued on GP or SRC folares, once you set the path, or if you are there, you should be able to issue the command and also be able to see a similar sysout above. Ex: (if you are on GP or SRC): stat *

As I am not sure if the command STAT is allowed on Solaris.
tis

Hi John,

seems like STAT works on your system.

There’s one (small) trap: I think the access time is the last time the module was loaded into Natural’s bufferpool. So if you really want to know the last time of usage, you have to empty the bufferpool from time to time…

Matthias