I want to control which services run at boot time in Debian

Place to discuss Debian Linux and Debian based distributions
dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

I want to control which services run at boot time in Debian

Post by dickinsd » Mon Jun 13, 2005 6:49 am

Hi there.

Ok after my Gentoo failure I decided to follow some advice that was given to me ages ago and get Debian.

I installed the net-install method, it was a little odd, and something must have broken somewhere as I made choices along the way about my keyboard, time zone and monitor resolutions, none of which was correct when the install completed, I have now sorted this and I am kind of happy, I choose a 'nice' theme, installed any extra apps I wanted, and so far things seem pretty good.

There are a couple of things I want help with:

1: When I press the power button on my PC the machine turns off instantly, this did not happen with Fedora; the machine used to stop services etc before. (I think this is just a parameter I need to pass at boot time)
2: I run folding (folding@home - the protien thing I suspect you have heard about it)
My machine is performing considerably slower than it did under Fedora, I know that different work units take longer etc, but this is terribly slow. I want to know how I check/choose what services are running.

I have gnome installed, and under Fedora I think it went something like this:
Applications>System Tools>Servers>Services

Where do I find this under Debian?

Also I have noticed that the screen savers run real slow as well, now I have to be honest here - I don't really care about the screen savers but I am wondering if this is also a side effect of a service running that I don't want - for example the service that slows your CPU down, as I know this has a nice effect on the performance of folding on my Fedora Laptop.

I would also like to know where it is that I setup Samba under Debian, as the Linux machines see each other fine, and the windows machine can see the Debian machine but it does not have access - so I am unable to see any files etc.

Thanks for any help with this.

Dave

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Jun 13, 2005 8:25 am

Things should not run slower. You probably have a process hung up or something running that is eating up your resources. Open a terminal and run "top" and see if anything is hogging your CPU or disk bandwidth.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Mon Jun 13, 2005 9:00 am

Ok, have checked top, it is showing that folding is taking a good 95% which is good, I want it to take as much of CPU as possible.

I have included the output of top, but I am not sure what the little box thing is all about as that does not show up in my text editor, so not sure why it has stuck loads of little boxes in there:

Code: Select all

[H[2J[?7l[mtop - 15:49:29 up  5:55,  3 users,  load average: 1.08, 1.08, 1.02[m[39;49m[K
Tasks:[m[39;49m[1m  95 [m[39;49mtotal,[m[39;49m[1m   2 [m[39;49mrunning,[m[39;49m[1m  93 [m[39;49msleeping,[m[39;49m[1m   0 [m[39;49mstopped,[m[39;49m[1m   0 [m[39;49mzombie[m[39;49m[K
Cpu(s):[m[39;49m[1m  15.3% [m[39;49muser,[m[39;49m[1m   0.2% [m[39;49msystem,[m[39;49m[1m  81.1% [m[39;49mnice,[m[39;49m[1m   3.5% [m[39;49midle[m[39;49m[K
Mem: [m[39;49m[1m   257044k [m[39;49mtotal,[m[39;49m[1m   245604k [m[39;49mused,[m[39;49m[1m    11440k [m[39;49mfree,[m[39;49m[1m    20100k [m[39;49mbuffers[m[39;49m[K
Swap:[m[39;49m[1m   771080k [m[39;49mtotal,[m[39;49m[1m      260k [m[39;49mused,[m[39;49m[1m   770820k [m[39;49mfree,[m[39;49m[1m    80564k [m[39;49mcached[m[39;49m[K
[6;1H
[7m  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            [m[39;49m[K
[m[1m 1740 me        20  19 20116  19m 1060 R 95.9  7.8 288:11.52 FahCore_78.exe     [m[39;49m[K
[m[1m 2012 me        11   0   976  976  760 R  3.8  0.4   0:00.05 top                [m[39;49m[K
[m    1 root       8   0   508  508  452 S  0.0  0.2   0:00.04 init               [m[39;49m[K
[m    2 root       9   0     0    0    0 S  0.0  0.0   0:00.17 keventd            [m[39;49m[K
[m    3 root      19  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd_CPU0     [m[39;49m[K
[m    4 root       9   0     0    0    0 S  0.0  0.0   0:00.06 kswapd             [m[39;49m[K
[m    5 root       9   0     0    0    0 S  0.0  0.0   0:00.00 bdflush            [m[39;49m[K
[m    6 root       9   0     0    0    0 S  0.0  0.0   0:00.00 kupdated           [m[39;49m[K
[m   99 root       9   0     0    0    0 S  0.0  0.0   0:00.08 kjournald          [m[39;49m[K
[m  347 root       7  -4   444  440  392 S  0.0  0.2   0:00.00 udevd              [m[39;49m[K
[m  427 root       9   0     0    0    0 S  0.0  0.0   0:00.00 khubd              [m[39;49m[K
[m 1221 root       9   0   860  860  740 S  0.0  0.3   0:00.00 dhclient           [m[39;49m[K
[m 1226 daemon     9   0   448  448  380 S  0.0  0.2   0:00.00 portmap            [m[39;49m[K
[m 1391 root       9   0   804  804  700 S  0.0  0.3   0:00.01 syslogd            [m[39;49m[K
[m 1394 root       9   0  1364 1360  484 S  0.0  0.5   0:00.07 klogd              [m[39;49m[K
[m 1401 messageb   9   0  1004 1004  892 S  0.0  0.4   0:00.00 dbus-daemon-1      [m[39;49m[K
[m 1407 root       9   0   872  868  732 S  0.0  0.3   0:00.05 dirmngr            [m[39;49m[K
[/code]

So that would look like folding is getting a good share of the CPU, which I guess would suggest that the problem is not with any greedy service running, unless of course you think other wise.

Unfortunately I do not have my laptop at the minute so I can't check the name of the service in Fedora that seems to slow the CPU down.

Another concern of mine is that the folding is not at a constant slow speed, I left it for the duration of yesterday, by the time I turned the machine off it had gone from doing 1% in 40 minutes (slower than I would expect it to, based on performance under Fedora) to 1% in about 103 minutes - I wonder if I had left the machine on, would it have ground to a halt?

I wasn't using any more applications at the end of the day than I was at the beginning, I had firefox open with 3 tabs, thunderbird, and obviously folding.

When I turned the machine on:

Code: Select all

[09:58:08] Completed 34891 out of 1000000 steps  (3%)
[10:40:28] Writing local files
[10:40:28] Completed 40000 out of 1000000 steps  (4%)
Just before I turned the machine off:

Code: Select all

[18:13:57] Completed 90000 out of 1000000 steps  (9%)
[19:32:46] Writing local files
[19:32:46] Completed 100000 out of 1000000 steps  (10%)
[21:15:46] Writing local files
[21:15:46] Completed 110000 out of 1000000 steps  (11%)
Any ideas?

thanks

Dave

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Mon Jun 13, 2005 9:04 am

By the way, it is only a sempron, and the machine only has 128MB RAM, I never expected it to be 'fast' I am simply remarking that under Debian, my system seems to be slower than it was with Fedora.

Dave

PS:

Does anyone know what the purpose of this program is??
ksoftirqd_CPU0

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Mon Jun 13, 2005 11:00 am

I think those little boxes are double-byte font characters. It simply means that the font being used doesn't have characters that correspond to those codes, so it prints the codes. Usually, you see that with Japanese or Chinese or Korean characters. But perhaps there are some strange characters in your terminal font that aren't available to the webserver. I'm in Firefox right now, and I see the boxes. But usually, my Mac can read the characters just fine. Weird thing.

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux » Mon Jun 13, 2005 11:24 am

They're just terminal control characters.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Jun 14, 2005 1:36 pm

dickinsd wrote:
I have gnome installed, and under Fedora I think it went something like this:
Applications>System Tools>Servers>Services
There is no such thing under debian.
You need to apt-get install sysv-rc-conf and then launch the program from within a console window.
From there you can start or shut down every service in each runlevel.

Shut down everything you don't need and look at the performance of your system after that.
If something still is wrong we'll try to take it from there.

I'm curious about what kernel version you are running.
I also have ksoftirqd_CPU0 running but it consumes 0.0 % of my cpu cycles.
I googled a bit and came up with a lot of people complaining about latency and stuff like that and noticed that they were all running 2.4 versions of the kernel.
Did you apt-get install kernel 2.6.11 already?

And regarding the boxes in your console window I had something similar with RH8 back in the days and it had something to do with konsole not being UTF-ready if I remember it right.
Voidmain came up with a fix pretty quickly, I'll see if I can dig up something about that and update this post if necessary.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Jun 14, 2005 2:27 pm

I think it just had to do with switching from UTF in your LANG settings to something like "C" or "en_US" or something like that. In Red Hat that was set in the /etc/sysconfig/i18n file.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Jun 14, 2005 3:06 pm

Yes, that was it!
dickinsd, what is your LANG variable set to?
You can check it in the /etc/environment file.

Edit: I just realized that you said it didn't show up in your text editor so I assume the boxes don't show up in your terminal, am I right?
If so ignore this last post and I will slap myself 3 times for not reading thoroughly from the first time! :)

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Fri Jun 17, 2005 9:51 am

Ice9 wrote: I'm curious about what kernel version you are running.
I also have ksoftirqd_CPU0 running but it consumes 0.0 % of my cpu cycles.
I googled a bit and came up with a lot of people complaining about latency and stuff like that and noticed that they were all running 2.4 versions of the kernel.
Did you apt-get install kernel 2.6.11 already?
No I kind of made an assumption that I would have a fairly recent kernel with my newly released Debian distro, however this was clearly wrong as I have a kernel of 2.4.x-386

I have since upgraded to the 2.6.8-k7, which I believe would be the best for my CPU, although I am just off to find the 2.6.11 kernel as I could not see anything like that when I looked earlier. (the upgrade from kernel 2.4.x to 2.6.8-k7 made no noticable speed improvement)

I am using Synaptic, I take it that it is fine to use synaptic to get my kernel, it should have a selection of new kernels available yes?

I am also going to get the package: sysv-rc-conf in a moment as well, as I have noticed at boot time that there are services such as Appletalk, which I definately don't need, so there could be a good drain on the system from services I don't need.

Thanks for your help so far.

Dave

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Fri Jun 17, 2005 1:11 pm

dickinsd wrote:
I am using Synaptic, I take it that it is fine to use synaptic to get my kernel, it should have a selection of new kernels available yes?
I personally use synaptic the least possible, especially when upgrading kernel, xfree and stuff like that.
If you do an
apt-cache search kernel-image you'll get a complete list of all the kernels available, select the one that's most suitable for your config and you're set.

Just looked and this is probably the one you need
kernel-image-2.6.11-1-k7
You should be able to "apt-get install kernel-image-2.6.11-1-k7"

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Fri Jun 17, 2005 1:37 pm

Of course you can always download and build your own kernel. Get the source from http://www.kernel.org/

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Fri Jun 17, 2005 2:02 pm

Now why would he want to do that when he has the power of apt at his fingertips :wink:

worker201
guru
guru
Posts: 668
Joined: Sun Jun 13, 2004 6:38 pm
Location: Hawaii

Post by worker201 » Fri Jun 17, 2005 2:50 pm

Because apt won't give him bleeding edge kernels, like 2.6.11-12. Or, because he wants to include support for some really bizarre type of optical drive. Or because he wants to reduce his kernel size down to where it will fit on a floppy.

Or, because he's a sucker for punishment :wink:

Actually, I take that back. Learning how to build your own kernel is a good learning experience. Especially since you are pretty much guaranteed to screw something up your first time.

dickinsd
scripter
scripter
Posts: 84
Joined: Sun Jan 30, 2005 2:29 pm
Location: Bristol, UK

Post by dickinsd » Fri Jun 17, 2005 2:59 pm

Thanks for the help, as for the kernel, for now I would like to stick to the apt (easy) way of doing things :roll:

Can I ask what repositories you are using as I do not have this kernel version available to me.

Are the repositories for apt the same as those for synaptic? If so I only have blueyonder.co.uk Stable listed.

Thanks

Dave

Post Reply