1847206 Members
3266 Online
110263 Solutions
New Discussion

Re: memory error

 
brian_31
Super Advisor

memory error

I have my /var at 99%. Meanwhile whatever command i try to fails with memory insufficient. I cannot reboot right away. I have to fix this. Pl. help

Thanks

Brian
11 REPLIES 11
RAC_1
Honored Contributor

Re: memory error

Does even cd command fail?? ls fails??

If cd command does not fail, cd /var
> "big_file1"
> "big_file2"

make sure that you do not need those files and those files can e deleted.
There is no substitute to HARDWORK
Robert Bennett_3
Respected Contributor

Re: memory error

# quot /var

If you can do that then you can see who the users are that are using the most space and call them - have them log off and log back on.

After you get it cleaned up you may want to think about making /vat/tmp a separate mount point

Hope this helps

B
"All there is to thinking is seeing something noticeable which makes you see something you weren't noticing which makes you see something that isn't even visible." - Norman Maclean
brian_31
Super Advisor

Re: memory error

this is my swapinfo information

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 546 478 53% 0 - 1 /dev/vg00/lvol2
reserve - 478 -478
memory 534 534 0 100%
total 1558 1558 0 100%

Pl help

Thanks

Brian
renarios
Trusted Contributor

Re: memory error

Hi Brian,

Maybe there are some core files which you can remove:
find /var -name core -exec rm {} \;
Try to cleanup some old logfiles to get some space:
find /var -name '*.log' -mtime +14 -exec rm {} \;

That will give you some space to find the reason of the full filesystem.

Cheers,

Renarios
Nothing is more successfull as failure
Bill Hassell
Honored Contributor

Re: memory error

/var is the most critical filesystem in Unix. Almost everything uses or creates something in /var. Start by analyzing /var for big directories:

di -kx /var | sort -rn | head -20

The largest directories will be at the top. Then list the contents of the biggest directories:

ll /var/tmp | sort -rnk5 | head -10

Places that can be fixed:

/var/preserve (old vi temp files, remove any more than a few days old)

/var/tmp (most everything here should be temporary and can be removed but be careful if there are files that may be in use)

/var/mail (user mail files are here...tell users to cleanup old email)

Now all of this assumes you can run commands. If you're still having memory problems, you'll have to stop some processes. It appears that you have very little RAM and have to use swap space a lot (which causes extreme slowdowns).


Bill Hassell, sysadmin
Geoff Wild
Honored Contributor

Re: memory error

Bill means du - not di :)

du -sk * |sort -rn

Look for cores as well:

find /var -name core

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bill Hassell
Honored Contributor

Re: memory error

Oops, that's right. Those pesky keyboards are moving keys to the wrong places...


Bill Hassell, sysadmin
brian_31
Super Advisor

Re: memory error

My memory is the issue. I cant even do ps..it says not enough memory for has table. what do i do?

Thanks

Brian
Geoff Wild
Honored Contributor

Re: memory error

You will have to kill something...

But - you can't ps....

Uh...do you have multiple connections to server? logout of all but one....ask any users that may be logged in (telnet) to logout - that should give you enough to run some commands...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
renarios
Trusted Contributor

Re: memory error

Do you have any unneccessary services running? Maybe you can kill them ( i.e. apache, imap, samba) from /etc/rc.d/init.d/ directory. That should give you some air.

Cheers,

Renarios
Nothing is more successfull as failure
Bill Hassell
Honored Contributor

Re: memory error

Most likely your swap space is now exhausted too. So the first thing to do is to add more swapspace using swapon. Find an unused disk volume and add another 1000megs and if swapon completes successfully, the additional swap space should keep your system running. You may also have a bunch of runaway processes.

But performance has got to be pretty awful with 500 megs of swap in use and only 500 megs of RAM. I would add another 1500megs of RAM for a tremendous boost in performance.


Bill Hassell, sysadmin