Thursday, 16 April 2015

How Does Puppet Work ?

Puppet Master:

This machine contains all the configuration for different hosts. Puppet master will run as a daemon on this master server.

Puppet Agent: 

This is the daemon that will run on all the servers, which are to be managed using puppet.
Puppet agent will go and ask the configuration for itself from the puppet master server at a specific time interval.

  • Puppet agent is a daemon that runs on all the client servers. The connection between puppet agent and master is made in a secure encrypted channel with the help of SSL.
  • 30 minutes is the default interval when puppet agent daemon will go and fetch config data from puppet master.

Steps involved whenever a puppet agent of any node connects to a puppet master server :

Step 1: Whenever a client node connects to the master, the master server analyses the configuration to be applied to the node, and how to apply that configs on the node.
Step 2: Puppet master server Takes and collects all the resources and configurations to be applied to the node, and compiles it and make it a catalog. This catalog is given to the puppet agent of the node.
Step 3: Puppet agent will apply the configuration on the node, according to the catalog, and then reply back, and submit the report of the configuration applied to the puppet master server.

Tuesday, 30 April 2013

What does the status D,R,S,Z indicate when i run top /ps aux command?

       D   uninterruptible sleep (usually IO)
       R   runnable (on run queue)
       S   sleeping
       T   traced or stopped
       Z   a defunct ("zombie") process

       For BSD formats and when the "stat" keyword is used, additional letters may be displayed:
       W   has no resident pages
       <   high-priority process
       N   low-priority task
       L   has pages locked into memory (for real-time and custom IO)

Linux process state codes

Here are the different values that the s, stat and state output specifiers
(header "STAT" or "S") will display to describe the state of a process.

D Uninterruptible sleep (usually IO)

R Running or runnable (on run queue)

S Interruptible sleep (waiting for an event to complete)

T Stopped, either by a job control signal or because it is being traced.

W paging (not valid since the 2.6.xx kernel)

X dead (should never be seen)

Z Defunct ("zombie") process, terminated but not reaped by its parent.

For BSD formats and when the stat keyword is used, additional characters may be displayed:

< high-priority (not nice to other users)

N low-priority (nice to other users)

L has pages locked into memory (for real-time and custom IO)

s is a session leader

l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do) 

+ is in the foreground process group