WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: services to safely disable for RPi model A in offline / headless mode ?  (Read 5051 times)

Offline s-m-s

  • Newbie
  • *
  • Posts: 5
I welcome everyone in this forum,

this is my first post, and though I am not the linux-guru, I am learning quite a lot ...

I hope someone can help me with my questions.

Here´s my setup:

I have a Raspberry Pi model A 256MB (without Ethernet) and I plan to be using it:

A) in offline mode (USB HUB connected + Keyboard + USB DAC attached to the USB port, booting to console, ready to use it for programming / debugging etc.)

B) in an offline-and-headless mode (so no console statements in cmdline.txt PLUS disabled/unloaded hotplug demons after first boot, only the USB DAC for audio playback connected to the single USB port and it´s not supposed to be exchanged with another USB device in this mode)

Notes: I am using PicorePlayer 1.06 (I don´t use squeezelite at all), with 3.9.10 kernel; alsa of course; I will use the GPIOs (only the ones from the main connector of the board), and wiringpi, so the GPIOs must be enabled.

So far I´ve disabled the onboard sound (don´t need it )+ spi + i2c (in bootsync.sh with modprobe -r snd_bcm2835) and (modprobe -r spi_bcm2708 i2c_bcm2708)

The issue:

As I don´t use any internet/ethernet connection, and neither will be using an USB to LAN or WLAN connection, I am completely offline. I am using quite a big ramdisk despite having only 256MB of ram, and I want to have a minimalistic but working setup, so to disable all unneeded services/daemons, that are being loaded while booting (even if sleeping), with some of them being found in the process list with the ps command.

As far as I found out most (if not all) processes/services are stated in /etc/rpc
aswell as .tcz extensions being loaded in the onboot.lst file,
and of course user defined programs possibly being located in /opt/bootlocal.sh or /opt/bootsync.sh at bootup time.

Now when I check out "ps aux";

Q#1: I can see some services beginning with the letter "k"; e.g. "kthreadd" or "kworker"; I´ve researched those are kernel-related and necessary for the system; but please correct my if I´m wrong or if there´s any exception to it with things to disable.

Q#2: Also which of these services are possible in my setup to be disabled; and of course, how to do it ? (sudo kill pid# did not work out that well):

netns
bdi-default
rpciod
nfsiod
crypto
DWC_Notification
deferwq
/sbin/udevd --daemon
scsi_eh_0
bcm2708_spi.0   (strangely being loaded althout lsmod doesn´t show spi, which means I´ve successfully unloaded modprobe -r spi_bcm2708 correctly )

Q#3: what of these services or entries can be safely disabled or #commented in /etc/rpc in my setup (offline mode)? I hope it´s not stupid to ask, but possibly ps doesn´t show hidden tasks or services that are being loaded on boot that could be disabled after all.

Here´s my rpc file, I have omitted the numbers and just stated the first part:

portmapper
rstatd
rusersd
nfs
ypserv
mountd
ypbind
walld
yppasswdd
etherstatd
rquotad
sprayd
3270_mapper
rje_mapper
selection_svc
database_svc
rexd
alis
sched
llockmgr
nlockmgr
x25.inr
statmon
status
bootparam
ypupdated
keysserv
sunlink_mapper
tfsd
nsed
nsemnt.d
showfhd
ioadmd
NETlicense
sunisamd
debug_svc
ypxfrd
bugtraqd
kerbd
event
logger
sync
hostperf
activity
hostmem
sample
x25
ping
rpcnfs
hostif
etherif
iproutes
layers
snmp
traffic
nfs_acl
sadmind
nisd
nispasswd
ufsd
pcnfsd
amd
sgi_fam
bwnsfsd
fypxfrd

Q#4: did I forget some other location and files to look for services ?
« Last Edit: October 05, 2013, 02:01:33 PM by s-m-s »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: services to safely disable for RPi model A in offline / headless mode ?
« Reply #1 on: October 05, 2013, 03:30:14 PM »
I am using quite a big ramdisk despite having only 256MB of ram, and I want to have a minimalistic but working setup

Using a ramdisk would hardly make any sense as Core is using tmpfs by default.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline s-m-s

  • Newbie
  • *
  • Posts: 5
Re: services to safely disable for RPi model A in offline / headless mode ?
« Reply #2 on: October 06, 2013, 10:06:10 AM »
I am using quite a big ramdisk despite having only 256MB of ram, and I want to have a minimalistic but working setup

Using a ramdisk would hardly make any sense as Core is using tmpfs by default.

Thanks for sharing your opinon, the extra ramdisk makes pretty much sense in my application,

but anway,

maybe there´s someone else who can point to me to some detailed information about the services and the ones that are safely to be disabled in TCL when no ethernet is being used...? I didn´t find any tutorial regarding the rpc file...

Thanks,

regards.

Offline s-m-s

  • Newbie
  • *
  • Posts: 5
Re: services to safely disable for RPi model A in offline / headless mode ?
« Reply #3 on: October 06, 2013, 02:21:05 PM »
update: seems I was wrong with rpc,

/etc/init.d/tc-functions, tc-config are the places to look for... sadly sysv-rc-conf.tcz would help here, but it´s not compiled yet.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: services to safely disable for RPi model A in offline / headless mode ?
« Reply #4 on: October 06, 2013, 05:11:55 PM »
I am using quite a big ramdisk despite having only 256MB of ram, and I want to have a minimalistic but working setup

Using a ramdisk would hardly make any sense as Core is using tmpfs by default.

Thanks for sharing your opinon, the extra ramdisk makes pretty much sense in my application


I am very curious about that now, as I have not seen any usage case where a ramdisk would be of benefit since long before Core even came into existence.

Quote
maybe there´s someone else who can point to me to some detailed information about the services and the ones that are safely to be disabled in TCL when no ethernet is being used...?

I wouldn't know about specifics of Raspberry Pi, but at least with Core x86 there are no other services than udevd started by defaut.

Quote
I didn´t find any tutorial regarding the rpc file...

http://man7.org/linux/man-pages/man5/rpc.5.html
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: services to safely disable for RPi model A in offline / headless mode ?
« Reply #5 on: October 07, 2013, 08:59:11 PM »

I wouldn't know about specifics of Raspberry Pi, but at least with Core x86 there are no other services than udevd started by defaut.


piCore is exactly the same in this respect. What ps shows are system processes needed for normal operation, nothing to disable. If you want to get a bit more memory reduce video RAM size to 16M

If you really need ramdisk, you can make a compressed disk same way as zswap is doing
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."