LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   crap. pre installed software (https://www.linuxquestions.org/questions/linux-newbie-8/crap-pre-installed-software-500396/)

MrSako 11-10-2006 01:11 PM

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

uselpa 11-10-2006 01:46 PM

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".

MrSako 11-10-2006 01:50 PM

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?

uselpa 11-10-2006 01:53 PM

free -m ? "cached" value?

MrSako 11-10-2006 01:54 PM

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?

uselpa 11-10-2006 01:58 PM

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.

MrSako 11-10-2006 02:05 PM

oh ok,
so cached means, cached hard disk data?

MrSako 11-10-2006 02:07 PM

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?

uselpa 11-10-2006 02:10 PM

Yes, that is my understanding.

twilli227 11-10-2006 02:13 PM

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.

uselpa 11-10-2006 02:16 PM

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.

farslayer 11-10-2006 02:40 PM

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..


All times are GMT -5. The time now is 08:17 PM.