var memory usage increasing


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers var memory usage increasing
# 1  
Old 08-26-2008
var memory usage increasing

Hi all

Just a couple days ago my /var/ partition was at 63% now its shot up to 83%.
I checked my log file sizes and they same ok

Code:
# ls -l |more
total 38820
-rw-r-----  1 root     root        3754 Aug  1 19:26 acpid
drwxrwxrwx  2 root     root        4096 Aug 24 04:11 admserv
-rw-------  1 root     root       24116 Jan 31  2007 anaconda.log
-rw-------  1 root     root       18302 Jan 31  2007 anaconda.syslog
-rw-------  1 root     root       42915 Jan 31  2007 anaconda.xlog
drwxrwxrwx  2 root     root        4096 Nov 26  2007 audit
-rw-------  1 root     root         900 Aug 25 05:02 boot.log
-rw-------  1 root     root         515 Aug 24 05:03 boot.log.1.gz
-rw-------  1 root     root        1435 Mar 16 12:09 boot.log.2
-rw-------  1 root     root        3622 Mar  9 15:27 boot.log.3
-rw-------  1 root     root       25551 Mar  2 14:39 boot.log.4
drwxr-xr-x  2 clamav   clamav      4096 Aug 24 05:02 clamav
-rw-------  1 root     root     1630947 Aug 26 11:03 cron
-rw-------  1 root     root      249262 Aug 24 05:03 cron.1.gz
-rw-------  1 root     root           0 Apr 26 22:42 cron.2
-rw-------  1 root     root           0 Apr 26 22:42 cron.3
-rw-------  1 root     root           0 Apr 26 22:42 cron.4
drwxr-xr-x  2 lp       sys         4096 Aug 24 05:02 cups
-rw-r--r--  1 root     root      104304 Aug 26 11:03 dbrecover.log
-rw-r--r--  1 root     root        4078 Aug 16 05:07 dbrecover.log.1.gz
-rw-r--r--  1 root     root        5637 Aug  5 05:07 dbrecover.log.2.gz
-rw-r--r--  1 root     root       16128 Aug  1 19:24 dmesg
-rw-r--r--  1 root     root           0 Jul 21 21:25 error_log
-rw-r--r--  1 root     root           0 Jul 21 21:25 error_log.1.gz
drwxrwxrwx  2 root     root        4096 Aug 26 04:14 httpd
-rw-r--r--  1 root     root        5569 Aug 26 11:01 ipacct
-rw-r--r--  1 root     root        2016 Aug 26 05:08 ipacct.1.gz
-rw-r--r--  1 root     root       23219 Mar 26 09:01 ipacct.2
-rw-r--r--  1 root     root       15775 Mar 25 08:01 ipacct.3
-rw-r--r--  1 root     root       29670 Mar 24 15:01 ipacct.4
-r--------  1 root     root      296672 Aug 26 10:57 lastlog
drwxr-xr-x  2 root     root        4096 Jan 31  2007 mail
-rwxrwxrwx  1 root     root     9997338 Aug 26 11:04 maillog
-rwxrwxrwx  1 root     root     4186784 Aug 26 05:09 maillog.1.gz
-rw-------  1 root     root           0 Apr 26 22:42 maillog.4
-rw-r--r--  1 root     root           0 Jul 20 12:15 maillot
-rwxrwxrwx  1 root     root     8427127 Aug 26 11:04 messages
-rwxrwxrwx  1 root     root      658903 Aug 24 05:03 messages.1.gz
-rw-r-----  1 mysql    mysql    1807074 Aug 26 10:36 mysqld.log
-rw-r--r--  1 root     root           0 Jan  8  2008 mysql.log
-rw-rw----  1 root     mail      294855 Aug 26 11:04 openwebmail.log
-rw-rw----  1 root     mail      945895 Aug 24 04:48 openwebmail.log.1
-rw-rw----  1 root     mail      806217 Aug 17 04:48 openwebmail.log.2
-rwx------  1 postgres postgres       0 May 15 22:58 pgsql
drwxrwxrwx  2 root     root        4096 Feb 21  2005 ppp
-rw-r--r--  1 root     root       13590 Aug 23 05:11 prelink.log
drwxrwxrwx  2 root     root        4096 Jun 25  2006 proftpd
-rw-r--r--  1 root     root       29913 Aug 26 05:10 rpmpkgs
-rw-r--r--  1 root     root        7811 Aug 24 05:03 rpmpkgs.1.gz
-rw-r--r--  1 root     root        29653 Mar 15 09:38 rpmpkgs.2
-rw-r--r--  1 root     root        29653 Mar  8 08:15 rpmpkgs.3
-rw-r--r--  1 root     root        29628 Mar  1 08:43 rpmpkgs.4
drwxrwxrwx  2 root     root         4096 Dec 11  2007 samba
-rw-------  1 root     root      8515731 Aug 26 11:02 secure
-rw-------  1 root     root       198801 Aug 24 05:03 secure.1.gz
-rw-------  1 root     root            0 Aug 24 05:03 spooler
-rw-------  1 root     root           20 Aug 24 05:03 spooler.1.gz
drwxr-x---  2 squid    squid        4096 Apr 10 08:10 squid
drwxr-xr-x  2 tomcat4  tomcat4     20480 Aug 24 05:04 tomcat5
-rw-r--r--  1 root     root            0 Aug 24 05:04 up2date
-rw-r--r--  1 root     root           20 Aug 24 05:04 up2date.1.gz
-rw-r--r--  1 root     root            0 Mar  9 15:29 up2date.2
-rw-r--r--  1 root     root            0 Mar  2 14:40 up2date.3
-rw-r--r--  1 root     root            0 Feb 24  2008 up2date.4
drwxr-xr-x  2 root     root         4096 Feb 21  2005 vbox
-rw-rw-r--  1 root     utmp      1135488 Aug 26 11:01 wtmp
-rw-rw-r--  1 root     utmp        48663 Aug  1 04:58 wtmp.1.gz
-rw-r--r--  1 root     root          569 Aug 26 10:58 xferlog
-rw-r--r--  1 root     root        37790 Aug 26 05:08 xferlog.1.gz
-rw-------  1 root     root            0 May 16 08:19 yum.log
-rw-r--r--  1 root     root         6948 May 16 08:19 yum.log.1.gz

Any ideas were else I can look that could be causing /var to fill up?

THanks
# 2  
Old 08-26-2008
Did you look in /var/tmp?

Code:
find /var/ -type -size +10000 -mtime -20 -exec ls -l {} \;

will find recent big files - you can change it ot meet your needs.
# 3  
Old 08-26-2008
the only thing in /var/tmp is a majordomo.debug file

Code:
 tmp]# ls -l |more
total 4
-rw-rw----  1 mail daemon 484 Aug  6 05:19 majordomo.debug

Code:
# find /var/ -type -size +10000 -mtime -20 -exec ls -l {} \;
find: invalid argument `-size' to `-type'

Did i run this wrong?

thanks
# 4  
Old 08-26-2008
Quote:
Originally Posted by mcraul
Code:
# find /var/ -type -size +10000 -mtime -20 -exec ls -l {} \;
find: invalid argument `-size' to `-type'

Did i run this wrong?

thanks
-type needs a qualifier (file, link, directory) so it should look like:

Code:
find /var/ -type f -size +10000 -mtime -20 -exec ls -l {} \;
find: invalid argument `-size' to `-type'

# 5  
Old 08-28-2008
Could one safely delete files in /var/lib/ ?
I noticed thats one directory thats using up alot of space.

OS/centos 4.x

Code:
du -ks * | sort -nr | more
122696  modules
4696    tls
3116    libnss_db.so.2.0.0
2836    kbd
2596    security
2232    libnss_ldap-2.3.4.so
1840    i686
1488    libc-2.3.4.so
928     libcrypto.so.0.9.7a
832     libdb-4.2.so
824     libnss_wins.so.2
784     libpwdb.so.0.61.1
676     libasound.so.2.0.0
476     iptables
296     libdevmapper.a.1.02
292     libpwdb.a
216     libssl.so.0.9.7a
212     libm-2.3.4.so
192     libcidn-2.3.4.so
144     rtkaio
144     firmware

# 6  
Old 08-28-2008
How big is /var? It's not advisable to remove anything under /var/lib as there maybe software that's using the libraries installed under it. Show the output of...

Code:
du -xk /var | sort -rn | head

# 7  
Old 08-28-2008
# du -xk /var | sort -rn | head
3275272 /var
2636128 /var/lib
2397752 /var/lib/mysql
661296 /var/lib/mysql/mailscanner
392272 /var/cache
389948 /var/cache/yum
206464 /var/lib/mysql/barts
188688 /var/cache/yum/base
142044 /var/lib/mysql/timmartin
136196 /var/cache/yum/update
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Swap memory usage keeps increasing.

Hi the version is RedHat 6.2 (Oracle DB server) I don't know why swap memory usage keeps increasing... I used to check swap memory usage Free -m and another way. total used free shared buffers cached Mem: 32183 31861 322 ... (3 Replies)
Discussion started by: tom8254
3 Replies

2. UNIX for Dummies Questions & Answers

Memory usage per user,percent usage,sytem time in ksh

Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies

3. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

4. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

7. Solaris

increasing /var

i need to increase the size of my /var filesystem but i have no idea how to do it. Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t3d0s0 144799 74952 55377 58% / /dev/dsk/c0t3d0s6 342183 201079 106894 66% /usr /proc ... (0 Replies)
Discussion started by: roguekitton
0 Replies

8. Programming

memory increasing

On Alpha True64 UNIX platform, we use "ps aux" command to display the process information, it also displays the %MEM,VSZ, RRS field. The question is that which field really indicates the program's memeory is increasing, thanks (0 Replies)
Discussion started by: Frank2004
0 Replies

9. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

10. Programming

memory increasing on UNIX

hi, i'm writing a program that is running always... but, i have a problem that memory is increasing.. i want to know whether does stack size inscease or not, when program is running.. i don't know what is the cause stack or heap... i need some help.. :( (1 Reply)
Discussion started by: netfer
1 Replies
Login or Register to Ask a Question