[SOLVED] Linux processes, behind the scenes... what does it do while logged off?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Linux processes, behind the scenes... what does it do while logged off?
Hi. I am occasionally curious and somewhat intrigued I once read in an edition of " Linux for Dummies" in the section about proper shutdown procedures what to. do and not to do. I of course do not ever do a hard shutdown 99.9% of the time... but my question is how the author said a lot of Linux users prefer to always keep their systems running and hardly ever power off the computer, but rather just log out? So when given the opportunity I sometimes watch my harddrive's LED light and even when logged off or after idle a while when the display blackens I can indeed see it flash periodically so there are things obviously going on without human interaction, but what types of things exactly? Im hoping to get some of the Linux gurus here to answer but it truly seems like the Linux kernel does have a mind of its own. Can anyone give some known examples of what goes on behind the scenes? And perhaps some opinions on leaving the system running mostly verus shutting if off as was so common in my days of old with Windows? My new laptop has some awesome hardware in it but its taken me a few days to go from factory settings to revamping to a new GUID partion with the EFI now versus an MBR and while the new GRUB 1.99 was a new concept and challenge I finally have a smooth Linux installed with UEFI. This has the Intel i5 and a Sandy Bridge chipset, 6 GB of RAM and so I want to baby the hardware yet take it to its max performance.
There are many background processes on a linux system, performing the multitude of tasks required to maintain and provide an operating system. There are several service/daemon managers these days including upstart and systemd - previously most services were managed via sysv init scripts. A service manager will start services when the system boots.
You'll need to determine which manager your distro uses to work out which services are running automatically, running a graphical desktop will also provide another hosts of processes.
To explore you can run 'ps -efwww' from a terminal which will show you all currently running processes as well as the full path to where they're located - have fun.
Thanks, I will definitely do those things. By the way, here is one other question but it is moreso regarding tweaking and improving a system. Okay, so at the moment I am running Sabayon Linux but in doing a Hardware Profile report, the base system and kernel are both reporting a Gentoo system. Gentoo is indeed my preferred distro but installing it has proven a challenge all the times before now. I know probably that Sabayon installed some extra games or whatever else, at least that's my assumption so I really want to remove the software I do not want or will not use and strip Sabayon down to basically a real Gentoo minimal install, but I don't know if that is possible. Also, I got the Gnome AMD64 iso as I'm becoming fonder of Gnome 3 the more I use it, in terms of either or KDE and the libraries both include as their base. But I am wondering this also, I like LXDE just as well as GNOME, so which would benefit me more in terms of tweaking and speed and such? To go and do a fresh LXDE install, or to keep my current GNOME install and just add the LXDE windows manager manager and its packages on top of the GNOME packages I have now and boot into LXDE after that. Because if I do go the route of LXDE, I'm wondering if the extra GNOME packages still on my system are going to weigh down the LXDE when I use it or does it not work like that? I mean LXDE is coined "lightweight" and even Openbox I like to use but in the times before it always seems like even using Openbox, I will end up wanting some GTK program so I end up with those dependencies and the same with KDE dependencies, but does that effect the lightweight effect when using LXDE? Is the "lightweight" referring to the instances when you are using that interface or is lightweight include the packages sitting on your harddrive but excludes any of another Window Managers installed dependencies?
I'd probably attempt a fresh install rather than trying to strip down the existing build. The lightweight reference is in relation to system resources such as cpu, memory and probably disk as well.
It's probably worth testing your new (thin) package set by building in a virtual machine, once you're happy then you can perform the real build.
There is a reason why Linux (and Unix) have an uptime command. And sometimes there's a little bit of competition going on ... for example, I had a laptop with a uptime of over a year and a half. (Curiously, the machine was originally bought to run Windows-95. Putting Linux on the box gave it an entire new lease on life and proved that it wasn't "slow and klunky" after all. The circuit-board finally fried from old age and the drive started making weird noises. (I miss "Old Dobbin," but her data lives on.)
When you are logged-off, it simply means that there are no shell-processes currently running that are attached to any terminals or X-window sessions; not that the system is or has to be idle. Processes might be running for several different reasons, for instance:
They are fundamental parts of the system, such as the init process (which cannot die).
They are so-called daemon processes that run all the time, or because you started them or they were specified to be started at boot-time, as previously mentioned.
They are processes that are started "on demand." (For example, you might have some processes that are started only when-and-if a connection is requested to a particular TCP/IP port.)
They are started at certain times by cron ("the service that never sleeps").
I personally think that the kindest thing to do for the hardware is to leave it running. Shut the lid, let the display turn itself off, and "otherwise don't waste power," but basically just let it do its thing overnight. File indexing and so-on are things most conveniently done at night, and typically they will be.
Thanks a lot sundialsvcs! Those four examples explain everything I was wondering about. I find the Linux system just so fascinating. It really seems to have become my life now...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.