cancel
Showing results for 
Search instead for 
Did you mean: 

FS size growing

SOLVED
Go to solution
himacs
Super Advisor

FS size growing

Hi gurus

my mountpoint /oracle growing rapidly.
but ls -lrt not shows nothing
can anybody tell how to check last modified or last created files..

quick response highly appreciated

regards
himacs
16 REPLIES
Sharma Sanjeev
Respected Contributor

Re: FS size growing

Hi Himacs

You can use -m (mtime) with find command to see modified file.

Regards
Sanjeev

Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
James R. Ferguson
Acclaimed Contributor

Re: FS size growing

Hi Himacs:

Use 'lsof' to see if you have unlinked open files. These are commonly temporary files that are opened and immediately unlinked (removed). When the last process using them terminates, then and only then will there allocated disk blocks be returned to the system.

You can find the process(es) by looking for a file with a zero link count:

# lsof +D /oracle +L1

Regards!

...JRF...
sarfaraj ahmad
Trusted Contributor

Re: FS size growing

hi,
please explain this mount point is being used for which purpose?
is oracle installed in this mountpoint?
Ganesan R
Honored Contributor

Re: FS size growing

Hi Himacs,

You can compare the bdf and du outputs. If there is a difference in usage then use lsof to find out which process having open files on it.
Best wishes,

Ganesh.
himacs
Super Advisor

Re: FS size growing

hi admins.

thanx for ur replies..
server is B.11.23
lsof not there
while i tried to open man page of lsof it says no manul entry..

/oracle is home dir

regards
himacs
James R. Ferguson
Acclaimed Contributor

Re: FS size growing

Hi (again):

> lsof not there

So, download it from the HP Porting Centre. Installation is done with 'swinstall'; includes manpages; and no reboot is required to install it:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.82/

Regards!

...JRF...
Ganesan R
Honored Contributor

Re: FS size growing

Hi,

You need to download it from here and install it.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.82/
Best wishes,

Ganesh.
himacs
Super Advisor

Re: FS size growing

HI james,Ganesan

thanx for the link
but since its a live server i cannot install now.

plz tell me any alternative ways..

i think using find command is it possible to track latest generated files or modified files

plz help on this

regards
himacs
Mel Burslan
Honored Contributor

Re: FS size growing

The question is, what is under /oracle as subdirectories ? Usually this type of behavior is seen when somebody makes a typo and say instead of putting a file under /oracle/data01 directory, they type, let's say /oracle/dat01. While /oracle/data01 is a filesystem and should not affect the size of /oracle, the latter, i.e., /oracle/dat01 gets created as a directory and whatever is put in there blows up the size of /oracle.

I bet you, a clever dba is performing a database dump and placing the ascii file unde oracle, either deliberately, assuming it has infinite space, or they made a typo and accidentally doing this. Talk to you dba's if you are not able to install the lsof tool. But in the long run, lsof is an invaluable tool that should be on every sysadmins list to install as an add-on.
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: FS size growing

Yes you can install lsof on a live server as it won't require a reboot or modify anything currently running on the system.

in the faceof what you say might be true, try running a find statement as follows:

find /oracle -xdev -mtime -1 >/tmp/filelist

this will give you the files modified in the last day. Then you can go over these files to see what is taking up so much space.

Or you can do this if you want

find /oracle -xdev -mtime -1 | xargs ll | more

to see the file sizes on the fly
________________________________
UNIX because I majored in cryptology...
James R. Ferguson
Acclaimed Contributor

Re: FS size growing

Hi (again):

> thanx for the link
but since its a live server i cannot install now.

Remember, there is NO REBOOT required and installation takes just a few minutes.

> i think using find command is it possible to track latest generated files or modified files

Well, yes, 'find' can do this as long as the link-count remains greater than one. (Re-read my post above). You could try:

# find /oracle -type f -mtime 0 -exec ls -l {} +

...to find files modified within the last 24-hours.

Regards!

...JRF...
himacs
Super Advisor

Re: FS size growing

hi

i want to check hidden file -

i used ls -la-nothing shows
any other options?


/oracle>ls -lrt
total 117160


plz tell me what total 117160 indicates

regards
himacs

James R. Ferguson
Acclaimed Contributor

Re: FS size growing

Hi (again):

> i want to check hidden file - i used ls -la-nothing shows any other options?

In one sense, "hidden" files are simply those that have a dot ('.') as their first character. By default, root always lists them.

However, read on.

> /oracle>ls -lrt
> total 117160
> plz tell me what total 117160 indicates

This is the total blocks used by the directory.

I am beginning to think that Mel is right. You have "hidden" files because you have over-mounted. If anything was written to the /oracle directory when it was _NOT_ mounted, and then the directory was mounted, the files first written are "hidden" from view.

I would unmount /oracle and look again at the /oracle directory while it is unmounted.

Regards!

...JRF...
himacs
Super Advisor

Re: FS size growing

Hi admins,

thanx a lot for ur help.

As recommended James and Ganesan, i have installed lsof in the server and found around more than 1000 unlinked open processes.We are going to restart the DB now.

regards
himacs
himacs
Super Advisor

Re: FS size growing

hi gurus,

issue solved!!!
we restarted the DB.All unlinked open files killed.


lsof +D /oracle +L1 - did wonderful job.
thanks james..



regards
himacs
James R. Ferguson
Acclaimed Contributor
Solution

Re: FS size growing

Hi (again):

...and thanks for posting what worked to solve your problem...

Regards!

...JRF...