LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2012, 09:28 AM   #1
vnc
LQ Newbie
 
Registered: Jun 2012
Location: terra
Distribution: centOS Ubuntu
Posts: 13

Rep: Reputation: Disabled
how services and programs works at back-end ?


hi..

what happens when we restart , stop or check status for any daemons/programs or do some changes to configuration file. For example when we do services network restart. what happen at backend which scripts it reads.

like when we create user so it refers to /etc/login.defs and /etc/passwd

is there any website where i can get all information.

Learning on CentOS 5.5

Thank You.
 
Old 09-01-2012, 10:39 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
This is a rather complex question with regards to what actually happens when you ask the system to run a daemon or program.

Basically, when you ask the system to run a daemon/program, the kernel assigns it a chunk of memory for it to load into. Once loaded, it get executed. Once running, it ask for any additional memory space for heap/stack etc. Depending on the daemon/program, it may then read any CLI options and/or configuration files and set it operating parameters accordingly.

When the daemon/program gets a signal to quit/exit/close, it should first ask/save any data. Within it's shutdown routine, it should release all assigned memory back to the kernel before exiting. The kernel then reclaims the memory space that the program was loaded into and returns it to the free pool.

Of course this is very simplistic and does not even consider the kernel having to move other programs into swap space to make memory available for the newly requested program.

If you would like to know exactly what files are used by any particular daemon/program, check out it's manpages. You mentioned adding a user. If you use the useradd utility, a look at the end of the manpages for useradd show:
Code:
FILES
       /etc/passwd
           User account information.

       /etc/shadow
           Secure user account information.

       /etc/group
           Group account information.

       /etc/gshadow
           Secure group account information.

       /etc/default/useradd
           Default values for account creation.

       /etc/skel/
           Directory containing default files.

       /etc/login.defs
           Shadow password suite configuration.
These are all of the files that useradd utility would access when you create a new user. Of course, the body of the manpage should explain the conditions that require the use of these files.

For more info, try:
Code:
man ld-linux
or
http://en.wikipedia.org/wiki/Executa...inkable_Format

Last edited by towheedm; 09-01-2012 at 10:48 PM.
 
Old 09-02-2012, 05:36 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,364

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
For example when we do services network restart. what happen at backend which scripts it reads.
Basically, it runs the correspondingly named script in /etc/init.d.

As you are running Centos 5.5 (latest id 5.8 btw) you should bookmark this http://www.linuxtopia.org/online_boo...ion/index.html as Centos is a free rebuild of RHEL.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Myth TV back end or front end. thedoctor Linux - Newbie 1 05-20-2010 07:58 PM
back end of growisofs gat3 Linux - Software 2 05-17-2010 12:18 PM
gui read out of back end command lines from gui front end activation? how? Siljrath Linux - General 0 10-24-2008 10:11 AM
Mythbuntu front-end and back-end questions... Liambiscuit Linux - Software 4 09-28-2008 05:11 PM
Multiple Apache - Front-end & Back-end in one server grant-skywalker Linux - Server 3 08-27-2008 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration