LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2006, 02:11 PM   #1
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Rep: Reputation: 30
crap. pre installed software


i ordered a new dedicated server, with centos 4 blah blah blah. unfourtanetly the provider thought they were doing a favor by pre installing all sorts of software onto my server, which i didn't want any of it. i just wanted the bare minimum needed to have SSH access to the server.

theres all sorts of things on it. when i type in top i get a list of 100 things running.

I know some of them are important but i know alot of them arent. i only have about 50 megs free (of 1,000 megs of ram !) becasue theres so much crap running

I would tell them to reinstall the OS but without the crap. But i need the server online so i need to do this on my own.

is there a way to output the output of top to a logfile to paste here?

right now my biggest concern is "couriertcpd" and "courierlogger" which are running multiple instances.

google says their for something involved TCP connections so im not sure if i should go ahead and kill them
 
Old 11-10-2006, 02:46 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Installing is one thing and running is another. If you browse through your runlevel's init scripts, I'm sure you can stop and disable quite some processes. Having them installed will then just eat up disk, which is cheap.

Linux uses a maximum of memory for caching, so a high memory usage is not necessarily a problem. Type "free -m" and look at the "cached" column.

As for your top question: "top -b -n 1 > outfile".
 
Old 11-10-2006, 02:50 PM   #3
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
i just got rid of a bunch of things, but i still only have about 100 megs of ram free. which now looking at this file makes even less sense....
Code:
top - 13:50:10 up 2 days,  2:51,  3 users,  load average: 0.00, 0.00, 0.00
Tasks:  59 total,   2 running,  57 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.4% us,  0.3% sy,  0.0% ni, 99.1% id,  0.1% wa,  0.0% hi,  0.0% si
Mem:   2008888k total,  1866788k used,   142100k free,   272416k buffers
Swap:  2040244k total,        0k used,  2040244k free,  1401984k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                            
 4838 gamecrea  15   0  169m  89m  12m R    6  4.6   1:34.22 srcds_amd                                                          
    1 root      16   0  2824  544  472 S    0  0.0   0:00.61 init                                                               
    2 root      RT   0     0    0    0 S    0  0.0   0:00.20 migration/0                                                        
    3 root      34  19     0    0    0 S    0  0.0   0:00.05 ksoftirqd/0                                                        
    4 root      RT   0     0    0    0 S    0  0.0   0:00.19 migration/1                                                        
    5 root      34  19     0    0    0 S    0  0.0   0:00.04 ksoftirqd/1                                                        
    6 root       5 -10     0    0    0 S    0  0.0   0:00.00 events/0                                                           
    7 root       5 -10     0    0    0 S    0  0.0   0:00.00 events/1                                                           
    8 root      11 -10     0    0    0 S    0  0.0   0:00.00 khelper                                                            
    9 root      15 -10     0    0    0 S    0  0.0   0:00.00 kacpid                                                             
   33 root       5 -10     0    0    0 S    0  0.0   0:00.00 kblockd/0                                                          
   34 root       5 -10     0    0    0 S    0  0.0   0:00.00 kblockd/1                                                          
   52 root      15   0     0    0    0 S    0  0.0   0:00.02 pdflush                                                            
   55 root       9 -10     0    0    0 S    0  0.0   0:00.00 aio/0                                                              
   56 root       9 -10     0    0    0 S    0  0.0   0:00.00 aio/1                                                              
   35 root      15   0     0    0    0 S    0  0.0   0:00.00 khubd                                                              
   54 root      15   0     0    0    0 S    0  0.0   0:01.70 kswapd0                                                            
  200 root      25   0     0    0    0 S    0  0.0   0:00.00 kseriod                                                            
  310 root       5 -10     0    0    0 S    0  0.0   0:00.00 ata/0                                                              
  311 root       5 -10     0    0    0 S    0  0.0   0:00.00 ata/1                                                              
  315 root      23   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_0                                                          
  316 root      24   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_1                                                          
  332 root      15   0     0    0    0 S    0  0.0   0:02.96 kjournald
 1453 root       6 -10  3428  500  412 S    0  0.0   0:00.05 udevd                                                              
 1808 root       6 -10     0    0    0 S    0  0.0   0:00.00 kauditd                                                            
 1897 root       7 -10     0    0    0 S    0  0.0   0:00.00 kmirrord                                                           
 1915 root      15   0     0    0    0 S    0  0.0   0:00.00 kjournald                                                          
 2717 root      16   0  4068 1132  832 S    0  0.1   0:01.32 sshd                                                               
 2734 root      17   0  3128  772  624 S    0  0.0   0:00.01 xinetd                                                             
 2751 ntp       16   0  5544 5544 3436 S    0  0.3   0:00.01 ntpd                                                               
 2760 root      16   0  6380  936  536 S    0  0.0   0:00.01 crond                                                              
 2786 dbus      16   0  2784  956  812 S    0  0.0   0:00.01 dbus-daemon-1                                                      
11781 root      16   0  1568  552  456 S    0  0.0   0:00.34 syslogd                                                            
32622 root      15   0     0    0    0 S    0  0.0   0:01.03 pdflush                                                            
32639 root       0 -20     0    0    0 S    0  0.0   0:00.05 loop0                                                              
32640 root      15   0     0    0    0 S    0  0.0   0:00.00 kjournald                                                          
 3313 mailnull  15   0  9012 1196  804 S    0  0.1   0:00.00 exim                                                               
 3319 mailnull  25   0  9184 1132  756 S    0  0.1   0:00.00 exim                                                               
 4794 root      16   0  8836 2252 1796 S    0  0.1   0:00.01 sshd                                                               
 4796 gamecrea  16   0  8836 1744 1284 S    0  0.1   0:00.02 sshd                                                               
 4797 gamecrea  16   0  5724 1404 1184 S    0  0.1   0:00.01 bash                                                               
 4923 root      15   0  8124 2244 1796 S    0  0.1   0:00.02 sshd                                                               
 4925 gamecrea  15   0  8288 1756 1288 S    0  0.1   0:00.02 sshd                                                               
 4926 gamecrea  16   0  6124 1404 1184 S    0  0.1   0:00.02 bash                                                               
 5029 gamecrea  16   0  9308 1304 1036 S    0  0.1   0:00.00 gamecreate.x86                                                     
 5030 gamecrea  16   0  9308 1304 1036 S    0  0.1   0:00.00 gamecreate.x86                                                     
 5031 gamecrea  16   0  9308 1304 1036 S    0  0.1   0:00.00 gamecreate.x86
 5032 gamecrea  16   0  9308 1304 1036 S    0  0.1   0:00.00 gamecreate.x86                                                     
 5068 root      15   0  8428 2328 1856 S    0  0.1   0:00.51 sshd                                                               
 5070 root      15   0  5196 1408 1184 S    0  0.1   0:00.05 bash                                                               
 6279 root      17   0  3276  412  356 S    0  0.0   0:00.00 mingetty                                                           
 6296 root      17   0  2892  412  356 S    0  0.0   0:00.00 mingetty                                                           
 6297 root      18   0  2308  412  356 S    0  0.0   0:00.00 mingetty                                                           
 6298 root      17   0  2308  412  356 S    0  0.0   0:00.00 mingetty                                                           
 6374 root      18   0  2116  412  356 S    0  0.0   0:00.00 mingetty                                                           
 6425 root      18   0  2908  412  356 S    0  0.0   0:00.00 mingetty                                                           
 7091 root      15   0  7108 2308 1828 S    0  0.1   0:00.01 sshd                                                               
 7093 root      15   0  4288 1244  916 S    0  0.1   0:00.00 sftp-server                                                        
 7116 root      15   0  3124  848  688 R    0  0.0   0:00.00 top
my 2 gigs are reduced to 140 megabytes. my guess is all the cpanel and apache and mysql and named yadah yadah yadah didnt fully release ram when i killed them?

Last edited by MrSako; 11-10-2006 at 02:52 PM.
 
Old 11-10-2006, 02:53 PM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
free -m ? "cached" value?
 
Old 11-10-2006, 02:54 PM   #5
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
Code:
# free -m
             total       used       free     shared    buffers     cached
Mem:          1961       1822        139          0        266       1369
-/+ buffers/cache:        187       1774
Swap:         1992          0       1992
edit :i just noticed the cached column showing 1369. i guess this is memory in cash which is taking up space? so i need to maybe clear the cache or something?

Last edited by MrSako; 11-10-2006 at 02:57 PM.
 
Old 11-10-2006, 02:58 PM   #6
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
So if I understand that correctly, 70% (=1369/1961) of your memory is "abused" to speed up disk access and can be freed by the kernel any moment. 23% of your memory is really in use. No swap is used at all. That looks very fine to me.
 
Old 11-10-2006, 03:05 PM   #7
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
oh ok,
so cached means, cached hard disk data?
 
Old 11-10-2006, 03:07 PM   #8
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
now what steps should i take to get rid of the pre installed software off of my disk? i dnot want to have to kill all the tasks again if i eve reboot or something.

is just deleting them (the files) suffice enough?
 
Old 11-10-2006, 03:10 PM   #9
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Yes, that is my understanding.

Last edited by uselpa; 11-10-2006 at 03:16 PM.
 
Old 11-10-2006, 03:13 PM   #10
twilli227
Member
 
Registered: May 2003
Location: S.W. Ohio
Distribution: Ubuntu, OS X
Posts: 760

Rep: Reputation: 30
Quote:
i only have about 50 megs free (of 1,000 megs of ram !)
You payed for the ram, why not use it?
Quote:
i guess this is memory in cash which is taking up space? so i need to maybe clear the cache or something?
What space? Cache will release this memory when needed. Start some process and see how this works.
Quote:
load average: 0.00, 0.00, 0.00
Your system is basically sitting idle doing nothing. Run some processes and watch "top". This will show how it works. If you are having problems with processes starting or running slow, then you might have a problem with your system allocating ram.
Quote:
so cached means, cached hard disk data?
Not in the context of ram.

Last edited by twilli227; 11-10-2006 at 03:17 PM.
 
Old 11-10-2006, 03:16 PM   #11
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Quote:
Originally Posted by MrSako
now what steps should i take to get rid of the pre installed software off of my disk? i dnot want to have to kill all the tasks again if i eve reboot or something.

is just deleting them (the files) suffice enough?
The key here is not to start the software when starting the system.
So, first stop the tasks using the scripts in /etc/init.d.
Then you need to adjust what gets started. I don't use CentOS/RH, but this can get you started.
 
Old 11-10-2006, 03:40 PM   #12
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
chkconfig in CentOS should give you a nice text view of what services are set to run at startup..

It can then be used to change startup options.
http://www.epicdesigns.co.uk/howto/server_services.php

Theres a nice text tool available as well that you simply check and uncheck the services but I'm having trouble locating it..

Last edited by farslayer; 11-10-2006 at 04:09 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running pre-installed games Andriy Linux - Games 4 08-11-2006 09:08 AM
upgrade pre-installed mysql 2639 Red Hat 3 04-28-2005 07:57 PM
does python come pre-installed on slackware? habala Slackware 2 01-29-2005 06:06 PM
How do I remove pre-installed packages? cb8100 Slackware 13 02-21-2004 12:52 PM
Wine pre-installed ?! SuseBoy Linux - Software 1 07-16-2003 03:56 PM


All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration