Question about Linux Processes

Discussion in 'Installation/Configuration' started by pcburner, Mar 7, 2008.

  1. pcburner

    pcburner New Member

    I was looking into what was running on my CentOS 5.1 server and was wondering what services I can kill that are not needed. By eliminating unwanted processes wouldn't this speed up the server? For instance, kpsmoused, I'm not even using a mouse or keyboard or monitor on my server, I putty into it, so what would like to do is kill and then prevent it from running again. How can this be accomplished?
     
  2. topdog

    topdog Active Member HowtoForge Supporter

    What processes do you want to kill as i think kpsmoused is a kernel process killing it could make your system unstable
     
  3. pcburner

    pcburner New Member

    Here is a list of the running processes I am not sure what I can eliminate could you assist please?

    # top

    top - 10:40:36 up 2 days, 14:24, 1 user, load average: 0.00, 0.00, 0.00
    Tasks: 80 total, 3 running, 77 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.3%us, 0.3%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
    Mem: 1033584k total, 1000072k used, 33512k free, 168172k buffers
    Swap: 2031608k total, 64k used, 2031544k free, 686020k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    21259 root 15 0 2172 996 792 R 0.3 0.1 0:00.05 top
    1 root 15 0 2040 588 508 S 0.0 0.1 0:00.77 init
    2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
    3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
    4 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
    5 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/0
    6 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
    7 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
    10 root 10 -5 0 0 0 S 0.0 0.0 0:00.02 kblockd/0
    11 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
    89 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0
    92 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd
    94 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod
    153 root 15 0 0 0 0 S 0.0 0.0 0:09.55 pdflush
    154 root 15 0 0 0 0 S 0.0 0.0 0:04.58 pdflush
    155 root 10 -5 0 0 0 S 0.0 0.0 0:05.99 kswapd0
    156 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
    305 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused
    328 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0
    329 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 ata_aux
    332 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
    333 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
    334 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_2
    345 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 ksnapd
    348 root 10 -5 0 0 0 S 0.0 0.0 0:16.55 kjournald
    380 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 kauditd
    414 root 21 -4 2944 1432 384 S 0.0 0.1 0:00.75 udevd
    1209 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 kmpathd/0
    1232 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 kjournald
    1740 root 14 -3 12076 684 488 S 0.0 0.1 0:00.25 auditd
    1742 root 12 -3 10096 3972 2308 S 0.0 0.4 0:00.53 python
    1761 root 15 0 10080 8652 432 S 0.0 0.8 0:00.08 restorecond
    1776 root 18 0 1700 632 536 S 0.0 0.1 0:00.29 syslogd
    1779 root 18 0 1656 404 336 S 0.0 0.0 0:00.02 klogd
    1814 root 15 0 2140 584 388 S 0.0 0.1 0:01.39 mcstransd
    1836 rpc 19 0 1788 556 464 S 0.0 0.1 0:00.00 portmap
    1854 root 15 0 42428 11m 5096 S 0.0 1.1 0:21.60 setroubleshootd
    1879 root 24 0 1804 728 628 S 0.0 0.1 0:00.00 rpc.statd
    1923 root 15 0 5392 580 280 S 0.0 0.1 0:00.00 rpc.idmapd
    1950 dbus 18 0 12960 1180 912 S 0.0 0.1 0:00.02 dbus-daemon
    1966 root 25 0 2128 756 656 S 0.0 0.1 0:00.00 hcid
    1972 root 25 0 1724 500 428 S 0.0 0.0 0:00.00 sdpd
    1991 root 9 -10 0 0 0 S 0.0 0.0 0:00.00 krfcommd
    2041 root 25 0 12696 1324 580 S 0.0 0.1 0:03.55 pcscd
    2064 root 25 0 1888 448 368 S 0.0 0.0 0:00.00 hidd
    2083 root 25 0 9356 1124 884 S 0.0 0.1 0:00.11 automount
    2106 root 18 0 1648 516 440 S 0.0 0.0 0:00.00 acpid
    2136 root 17 0 6144 1028 664 S 0.0 0.1 0:00.03 sshd
    2151 root 15 0 9688 2092 1448 S 0.0 0.2 0:00.02 cupsd
    2167 root 24 0 2684 840 672 S 0.0 0.1 0:00.01 xinetd
    2216 root 18 0 1876 468 392 S 0.0 0.0 0:00.00 gpm
    2231 root 18 0 5236 1196 652 S 0.0 0.1 0:00.88 crond
    2258 xfs 18 0 3436 1304 752 S 0.0 0.1 0:00.00 xfs
    top - 10:40:50 up 2 days, 14:24, 1 user, load average: 0.00, 0.00, 0.00
    Tasks: 80 total, 3 running, 77 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 1033584k total, 1000072k used, 33512k free, 168172k buffers
    Swap: 2031608k total, 64k used, 2031544k free, 686020k cached
     
    Last edited: Mar 8, 2008
  4. zcworld

    zcworld New Member

    i cant remember if its like "init 3"
    to drop down to an command line
    on the box itself
    exit the Xserver
    simple frees up memory and CPU use :)
    so it can be used for other stuff

    also
    run the setup
    and see what services are running that you dont need
    always see what they do before turning them off if you not sure



    init 0 : goes thru the /etc/rc0.d/* scripts then halts ( note halt these
    days also syncs first )
    init 1: goes to single user - no need for sync
    init 2; multi user
    init 3: mult user plus network
    init 4: user defined
    init 5: as init 0, but with power off ( or as init 0 when on domains in a
    starfire )
    init 6: as 0 or 5, but reboots

    so 0, 5, 6, and halt all do a sync or two. shutdown also call halt which
    calls sync. note that you can suppy flags to shutdown/halt to not sync if
    thats what you want.

    http://www.sunmanagers.org/pipermail/summaries/2002-September/002368.html
     

Share This Page