LinuxQuestions.org
Review your favorite Linux distribution.
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, 10: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, 11:39 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Jessie
Posts: 592

Rep: Reputation: 119Reputation: 119
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 11:48 PM.
 
Old 09-02-2012, 06:36 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,247

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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


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



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


All times are GMT -5. The time now is 09:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration