cancel
Showing results for 
Search instead for 
Did you mean: 

/var grow up irregular

Achilles_2
Regular Advisor

/var grow up irregular

Hello All,

Do anyone know that how come the size of /var directory increasingly grew up? I check the /var patrition by bdf command and found the number in the "available" column is decreasing. What actual background process need to touch /var?

Thanks
19 REPLIES
AwadheshPandey
Honored Contributor

Re: /var grow up irregular

TY 007
Honored Contributor

Re: /var grow up irregular

Hello Achilles,

>> What actual background process need to touch /var?

Issue command: # fuser /var

Example:
/var: 770o(root) 592o(root) 589o(root) 1488mo(root) 617o(root) 618o(root) 735o(root) 839o(root) 1153cm(root) ........

Thanks
A. Clay Stephenson
Acclaimed Contributor

Re: /var grow up irregular

/var is one of the most used file systems on a UNIX box. /var/tmp is the default location for application temporary files. The lp spooler subsystem uses /var/spool and mail uses /var as well. Moreover /var/adm/syslog is the location for syslog.log and mail.log which can grow very large. All of this is normal but filling up /var can bring a system to its knees so the wise plan is to create separate mountpoints for /var/tmp, /var/spool/lp, and /var/mail.
If it ain't broke, I can fix that.
Amit Parui
Valued Contributor

Re: /var grow up irregular

The best way to find this out would be to take the file thats eating up the space, so find it as below -

find /var -xdev -size +500000c -mtime -3 -exec ls -altr {}\; | sort -r -n -k 5 | more

or

to really dig down /var filesystem try -

du -sk * | more

and check out for the large files there.

Hope this wud help u !!!
If Life gives u a ROCK, its upto u to build a BRIDGE or a WALL !!!
wittie
Frequent Advisor

Re: /var grow up irregular

Another possible reason for /var being increased is if the system has crashed. Crash dumps are written in /var/adm/crash and they are normally really large.

Use this command to find out which files/directories are filling up /var

# du -akx /var | sort -nr | more

Then you can decide if you can delete something to free up space.
Suraj Kumar Sankari
Occasional Advisor

Re: /var grow up irregular

Achilles,
First do fuser -cu to check who is using /var
check is there any batch program is runing and chech what is the output goes may be someone give the output directory is /var
or u can check /var/spool directory some time I have found some old big file over there just delete all old file
hope it will work
Achilles_2
Regular Advisor

Re: /var grow up irregular

Hi ALL,

I found that one of file called the error.log which is located at /var/opt/dce/svc is so big (7610368 bytes) and its contains all the same line like that

2007-08-23-05:22:47.541+00:00I----- dced ERROR dhd hostdata epops.c 1021 0x7b5c4ed4 Postprocessor for /opt/dcelocal/bin/ep_scavenger exited with status 2

What is the function of dce?
Achilles_2
Regular Advisor

Re: /var grow up irregular

Now when I ran "last" and "lastb" command, it will show the error :

Invalid record size. Unable to continue ...

The size of wtmps is 197181440
The size of btmps is 1127690940
Dennis Handly
Acclaimed Contributor

Re: /var grow up irregular

>Now when I ran "last" and "lastb" command, it will show the error:
Invalid record size. Unable to continue ...
The size of wtmps is 197181440
The size of btmps is 1127690940

I'm not sure you care about this info? You could copy it and then empty those files.
If you want to try repairing them, see fwtmp(1M).

See this other thread if you are on 11.23 or later:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1149632
whiteknight
Honored Contributor

Re: /var grow up irregular


Hi Achillies


Tips to clean wtmps/btmps
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01016434-2


Thanks
WK
Problem never ends, you must know how to fix it
RobinKing
Valued Contributor

Re: /var grow up irregular

Another common 'space eater' is the /var/adm/sw/save directory. If your system is at a stable patch level, you could run a cleanup to remove superseded patches.

cleanup -c 2

This will remove all patches that have been superseded twice or more. You can run the command with -p to preview, and the output will tell you exactly how much space you could reclaim.

Use with care though.
tsf_1
Frequent Advisor

Re: /var grow up irregular

I agree to find out any huge files in /var:

# find /var -xdev -size +10000000c (To list around >10MB)
be willing to do, be happy to bear
JorgeUX
Visitor

Re: /var grow up irregular

Hi guys, I was having the same problem.

 

Right now the filesystem /var is increasing and decreasing in a few minutes, between 58% and 75%, but most of the time is in the lower.

 

Do you have any Idea why is this happening or what can I check?

 

Thanks.

Patrick Wallek
Honored Contributor

Re: /var grow up irregular

I would monitor /var/tmp first.  My guess is that something is creating and destroying temporary files.

 

You could always try something like:

 

find /var -type f -mtime -1 -exec ls -ld {} \;

 

to try to find files that are less than 1 day old.

 

 

Dennis Handly
Acclaimed Contributor

Re: /var grow up irregular

>Do you have any idea why is this happening or what can I check?

 

Have you looked at what the most recent files are and who the owner is?

JorgeUX
Visitor

Re: /var grow up irregular

This is a sample of the output of the command

 

find /var -type f -mtime -1 -exec ls -ld {} \;
....
-rw-r--r--   1 root       root           452 Jul 25 15:45 /var/stm/logs/tools/1_0_8_1_0_4_0_2_3_1_1_9_2/info/test_activity_log
-rw-r--r--   1 root       root          1316 Jul 25 15:45 /var/stm/logs/tools/1_0_8_1_0_4_0_2_3_1_1_9_2/info/info_log_msg
-rw-r--r--   1 root       root           452 Jul 25 15:45 /var/stm/logs/tools/1_0_8_1_0_4_0_2_3_1_1_9_3/info/test_activity_log
-rw-r--r--   1 root       root          1316 Jul 25 15:45 /var/stm/logs/tools/1_0_8_1_0_4_0_2_3_1_1_9_3/info/info_log_msg
-rw-r--r--   1 root       root           452 Jul 25 15:45 /var/stm/logs/tools/1_0_8_1_0_4_0_2_3_1_1_9_4/info/test_activity_log
-rw-r--r--   1 root       root          1316 Jul 25 15:45 /var/stm/logs/tools/1_0_8_1_0_4_0_2_3_1_1_9_4/info/info_log_msg
-rw-r--r--   1 root       root           452 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x12/info/test_activity_log
-rw-r--r--   1 root       root          1316 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x12/info/info_log_msg
-rw-r--r--   1 root       root           452 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x15/info/test_activity_log
-rw-r--r--   1 root       root          1316 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x15/info/info_log_msg
-rw-r--r--   1 root       root           452 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x4/info/test_activity_log
-rw-r--r--   1 root       root          1316 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x4/info/info_log_msg
-rw-r--r--   1 root       root           452 Jul 25 15:55 /var/stm/logs/tools/64000_0xfa00_0x16/info/test_activity_log
...

 There are several files with this description, another batch of them are from DB.

 

V. Nyga
Honored Contributor

Re: /var grow up irregular

>Right now the filesystem /var is increasing and decreasing in a few minutes
Well, that sounds ok - applications are writing temp log-files and delete it again.

Just check the [edit](above already) mentioned directories:
/var/tmp
/var/adm/crash

Superseeded patches:

Check it with 'cleanup -p -c 2'
then recover space with 'cleanup -c 2'

HTH
V.

*** Say 'Thanks' with Kudos ***
Pete Randall
Outstanding Contributor

Re: /var grow up irregular

All those logs would suggest some diagnostic activity.  Any hardware issues in the system?  Take a look at dmesg output and syslog for errors.   Other than that, this might be completely normal.


Pete
JorgeUX
Visitor

Re: /var grow up irregular

Thanks all.