LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
LinkBack Search this Thread
Old 02-08-2012, 07:45 PM   #1
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: Arch Linux, Android ICS CM9
Posts: 148
Blog Entries: 1

Rep: Reputation: 8
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.
 
Old 02-08-2012, 08:05 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,048

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
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.
 
1 members found this post helpful.
Old 02-08-2012, 08:24 PM   #3
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: Arch Linux, Android ICS CM9
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 8
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?
 
Old 02-08-2012, 08:49 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,048

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
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.
 
Old 02-08-2012, 09:27 PM   #5
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: Arch Linux, Android ICS CM9
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 8
Thanks a lot!
 
Old 02-09-2012, 04:55 AM   #6
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,681

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
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.
 
1 members found this post helpful.
Old 02-09-2012, 12:57 PM   #7
barnac1e
Member
 
Registered: Jan 2012
Location: Moorhead, Minnesota, USA (birthplace of Slackware, ironically)
Distribution: Arch Linux, Android ICS CM9
Posts: 148
Blog Entries: 1

Original Poster
Rep: Reputation: 8
Thumbs up Excellent answer/explanationexplanation

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

Take care.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another session logged in but running no processes? asimov Linux - Server 2 01-30-2011 11:32 AM
[Help in Bash Scripting] Display real name from username logged in + user processes leoboy1986 Programming 1 01-14-2011 01:11 PM
[SOLVED] logged users without processes? paliga Linux - Server 4 11-02-2010 02:05 PM
LXer: <em>Running Linux, Version 5</em> Behind the Scenes LXer Syndicated Linux News 0 04-02-2006 02:21 PM
processes remain after I have logged out! drgowans Red Hat 5 11-12-2003 03:39 AM


All times are GMT -5. The time now is 08:35 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration