Linux Unix help !!

"Give respect to Time, One day at right Time, Time will respect You"

Wednesday, September 7, 2011

Monitor Your System Performance


Xxxxxxxxxxxxxxx Monitor Your System Performance xxxxxxxxxxxxxxxxxxxxX
[root@server ~]# uptime
 13:14:02 up  1:30,  2 users,  load average: 0.04, 0.26, 0.27

[root@server ~]# ps -eo %u | sort | uniq -c | sort -rn
     56 root
     22 nagios
      8 apache
      1 xfs
  
[root@server ~]# sar -c           ## Process/sec
Linux 2.6.18-164.el5 (server.scratch.com)       08/24/2011
11:50:01 AM    proc/s
12:00:01 PM      6.87
12:10:01 PM      6.90
12:20:01 PM      7.10
12:30:01 PM      6.77
12:40:01 PM      6.99
12:50:01 PM      6.85
01:00:01 PM      6.83
01:10:01 PM      6.92
Average:         6.90

[root@server ~]# sar -b   ## Data r/wr ps
Linux 2.6.18-164.el5 (server.scratch.com)       08/24/2011
11:50:01 AM       tps      rtps      wtps   bread/s   bwrtn/s
12:00:01 PM     24.81      0.18     24.63      6.37    376.94
12:10:01 PM     26.14      0.33     25.81     10.68    388.21
12:20:01 PM     57.68     28.05     29.63    620.21    466.02
12:30:01 PM     24.16      0.13     24.03      1.92    369.00
12:40:01 PM     24.55      0.10     24.44      1.70    374.73
12:50:01 PM     25.07      0.14     24.93      4.31    380.10
01:00:01 PM     24.95      0.58     24.37      6.20    377.88
01:10:01 PM     24.57      0.01     24.56      0.04    376.16
Average:        28.98      3.68     25.30     81.17    388.59

[root@server ~]# iostat -k
Linux 2.6.18-164.el5 (server.scratch.com)       08/24/2011

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.40    0.00    3.84    0.44    0.00   95.32

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               6.60        32.24        65.92     177987     363873
sda1              0.10         0.21         0.00       1163          5
sda2              6.50        32.01        65.92     176684     363868
dm-0             20.19        31.54        65.91     174109     363844
dm-1              0.02         0.08         0.00        440          0
dm-2              0.06         0.25         0.00       1397         20
dm-3              0.03         0.11         0.00        613          4

# cat /proc/stat
cpu  1864 0 16482 416939 2375 34 527 0
cpu0 1864 0 16482 416939 2375 34 527 0
intr 2416023 2368439 12 0 2 2 0 5 0 1 0 0 0 116 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 29989 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 17399 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ctxt 258727
btime 1314166387
processes 32539
procs_running 1
procs_blocked 0

# cat /proc/meminfo
MemTotal:       218872 kB
MemFree:         36680 kB
Buffers:         40416 kB
Cached:          79080 kB
SwapCached:          0 kB
Active:         116728 kB
Inactive:        47320 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       218872 kB
LowFree:         36680 kB
SwapTotal:      614384 kB
SwapFree:       614384 kB
Dirty:             460 kBWriteback:           0 kB
AnonPages:       44556 kB
Mapped:          15936 kB
Slab:            11628 kB
PageTables:       2320 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    723820 kB
Committed_AS:   376900 kB
VmallocTotal:   802808 kB
VmallocUsed:      3564 kB
VmallocChunk:   798832 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     4096 kB

[root@server ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz
stepping        : 10
cpu MHz         : 2592.870
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss constant_tsc up pni
bogomips        : 5185.74


[root@server ~]# cat /proc/buddyinfo
Node 0, zone      DMA     37     33     31     29     19     12      9      2      0      0      0
Node 0, zone   Normal   2217    861    467    317     71     17      6      1      1      0      0
[root@server ~]#

[root@server ~]# cat /proc/execdomains
0-0     Linux                   [kernel]

[root@server ~]# cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   cpuset
nodev   binfmt_misc
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   anon_inodefs
nodev   futexfs
nodev   tmpfs
nodev   inotifyfs
nodev   eventpollfs
nodev   devpts
        ext2
nodev   ramfs
nodev   hugetlbfs
        iso9660
nodev   mqueue
        ext3

[root@server ~]# cat /proc/loadavg
0.33 0.36 0.29 1/92 2916

[root@server ~]# cat /proc/locks
1: POSIX  ADVISORY  READ  2689 fd:00:320039 4 4
2: POSIX  ADVISORY  WRITE 2732 fd:00:931460 0 EOF
3: POSIX  ADVISORY  READ  2689 fd:00:320021 4 4

[root@server ~]# cat /proc/net/tcp
  sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
   0: 00000000:0185 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 7642 1 c8adbb40 3000 0 0 2 -1
   1: 0100007F:0CEA 00000000:0000 0A 00000000:00000000 00:00000000 00000000    27        0 7887 1 c8adb240 3000 0 0 2 -1
   2: 00000000:008B 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8138 1 c8ada4c0 3000 0 0 2 -1
   3: 00000000:006F 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 7482 1 c9720040 3000 0 0 2 -1
   4: 00000000:0015 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 7778 1 c8adb6c0 3000 0 0 2 -1

[root@server ~]# cat /proc/net/udp
  sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
   9: 0A08A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8108 2 c4db8d00
   9: 0908A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8106 2 c4db32c0
   9: 0808A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8104 2 c4db36c0
   9: 0708A8C0:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8102 2 c4db3ac0
   9: 00000000:0089 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 8099 2 c8a04080
[root@server ~]# cat /proc/net/protocols
protocol  size sockets  memory press maxhdr  slab module     cl co di ac io in de sh ss gs se re sp bi br ha uh gp em
RAWv6      648     -1      -1   NI       0   yes  ipv6        y  y  y  n  y  y  y  n  y  y  y  y  n  y  y  y  y  n  n
UDPv6      620     -1       0   NI       0   yes  ipv6        y  y  y  n  y  n  y  n  y  y  y  y  n  n  y  y  y  y  n
TCPv6     1248     19       1   no     224   yes  ipv6        y  y  y  y  y  y  y  y  y  y  y  y  n  n  y  y  y  y  y
PACKET     444     -1      -1   NI       0   no   kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n
UNIX       416     -1      -1   NI       0   yes  kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n
RAW        500     -1      -1   NI       0   yes  kernel      y  y  y  n  y  y  n  n  y  y  y  y  n  y  y  y  y  n  n
UDP        508     -1       0   NI       0   yes  kernel      y  y  y  n  y  n  y  n  y  y  y  y  y  n  y  y  y  y  n
TCP       1136     19       1   no     224   yes  kernel      y  y  y  y  y  y  y  y  y  y  y  y  n  n  y  y  y  y  y
NETLINK    404     -1      -1   NI       0   no   kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n

[root@server ~]# cat /proc/partitions
major minor  #blocks  name
   8     0   31457280 sda
   8     1     104391 sda1
   8     2   20860402 sda2
 253     0    7168000 dm-0
 253     1     512000 dm-1
 253     2    3891200 dm-2
 253     3    2048000 dm-3

[root@server ~]# cat /proc/schedstat
version 12
timestamp 2436227
cpu0 4336 4336 7 4343 7528 307075 58464 139144 139144 192048 1771799 248611
domain0 00000001 661081 661081 0 0 0 0 0 661081 360 360 0 0 0 0 0 360 58464 58464 0 0 0 0 0 58464 0 0 0 0 0 0 0 0 0 0 0 0

[root@server ~]# cat /proc/stat
cpu  2085 0 18967 484888 2403 42 607 0
cpu0 2085 0 18967 484888 2403 42 607 0
intr 2808623 2749553 12 0 2 2 0 5 0 1 0 0 0 116 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33013 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 25861 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 302029
btime 1314166387
processes 37438
procs_running 1
procs_blocked 0

[root@server ~]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/mapper/MYVOL-SWAPer                partition       511992  0       -1
/extraswap                              file            102392  0       -2

[root@server ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI SCSI revision: 02
[root@server ~]# cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
serial               /dev/ttyS       4 64-95 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console

[root@server ~]# cat /proc/uptime
5253.31 4967.57

[root@server ~]# cat /proc/version
Linux version 2.6.18-164.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 03:33:56 EDT 2009

Other that are usefulls :
[root@server ~]# cat /proc/interrupts
[root@server ~]# cat /proc/iomem
[root@server ~]# cat /proc/vmstat
[root@server ~]# vmstat -m

## Check NC status
[root@server ~]# mii-tool eth0


--Shirish Shukla

Saturday, May 14, 2011

IMP Linux Services

xxxxxxxxxxxxx Important Linux Services in Linux and there meanings xxxxxxxxxxxxx

# chkconfig sshd --list                      [To check daemon default on boot running status ]
# service daemon-name status      [Check daemon present status ]
# service --status-all                         [Check all running service ]
# ntsysv                                              [Change services status ]

gpmneeded if you want to use the mouse at the console
kudzuimportant for detecting new hardware
syslogimportant for syslog services
netfsneeded only if there are NFS shares that should be mounted at boot time
networkimportant for starting network interfaces (e.g. eth eth1bonding...)
randomused for the system entropy pool
atdneeded if the at(1) service is used instead of cron
apmdAdvanced Power Management (APM) daemon is used for laptops and some desktops
isdnneeded if ISDN is being used
iptablesneeded if Netfilter (iptables) Firewall is being used
ip6tablesneeded if ip6tables Firewall is being used
pcmcianot needed on servers - needed for laptops
irqbalanceimportant for distributing interrupts across all CPUs
sendmaineeded if Sendmail is used - Procmail should be used which is more secure
autofsneeded if automounter is used - production applications should not be dependent on automounter
sshdimportant for logins via SSH
portmapneeded if e.g. NFS is being used
nfslockneeded if NFS shares are mounted
nfsneeded if server runs the NFS server
mdmonitorneeded only if software RAID is being used
crondimportant for running cron jobs
xinetdneeded if xinetd services are being used see /etc/xinetd.d/ for list of services
cupsneeded if CUPS is used for the printing system
rhnsdneeded if server should connect to RHN to check for software updates etc.
sysstatneeded to reset system statistics logs
auditneeded only if Linux Audit Subsystem (LAuS) should run for collecting system call audit records
psacctneeded only if kernel process accounting information is needed
smartdimportant for monitoring disk problems if hard disks support SMART technology
netdumpimportant if kernel oops data and memory dumps should be sent to a Netdump server for server crashes
 
Rest will add sooooonnnn .....

Diff ext2 ext3 ext4

xxxxxxxxxxxxxxxxxxxxx Diff ext2 ext3 ext4 xxxxxxxxxxxxxxxxxxxxxxxxx
Extended n file system

ext2 :
- Introduced with kernel 1.0 in 1993
- Flexible can handle upto 4TB
- super block feature increase file system performance
- ext2 reserve 5% of disk space for root
- ext2 is popular on USB and other solid-state devices.
  This is because it does not have a journaling function.
  so it generally makes fewer reads and writes to the drive,
  effectively extending the life of the device .
-  NO journalalizm

ext3 :
- Provide all the feature of ext 2 + journaling and backward compatibility .
- can upgrade ext2 to ext3 without loss of data.
- journaling feature speed up the system to recover the state after power-failure
  or improper mount unmount etc.
- Example: In ext2 in an improper unmount or in-between power-off etc.. so in time
  of receiver it checks whole file system .
  But in ext3 it keeps record of uncommitted file transactions and checks applied
  on on them so system will come back up in faster and quicker .
-

ext4:
- Introduced with kernel 2.6.28
- Ext4 is a deeper improvement over Ext3
- support  larger filesystem, faster checking, nanosecond timestamps,
  and verification of the journal through checksums.
- It’s backward and forward compatible with versions 2 and 3, so we can
  mount a ext2 or ext3 filesystem as ext4 .
- The main benefits that ext4 has over ext3 are:
  - faster time-stamping
  - faster file system checking
  - journaling check-sums
  - extents (basically automatic space allocation to avoid fragmentation)

What is Journalism in linxu file syatem ?
A journaling file system is a file system that keeps track of the changes that will be made in
a journal (usually a circular log in a dedicated area of the file system) before committing them to
the main file system. In the event of a system crash or power failure, such file systems are quicker
to bring back online and less likely to become corrupted.
difference between ext2 ext3 ext4, extended file system linux, ext2, ext3,ext4, what is ext in linux, partition types in linux, file partition in linux, linxu partitions , ext2 ext3, ext4 linux, linuxva, shirish, shukla

File Permission Linux

xxxxxxxxxxxxxxxxxxxxxx File Permission xxxxxxxxxxxxxxxxxx

Set user ID, set group ID, sticky bit

- SUID or setuid:[4] Change user ID on execution. If setuid bit is set, when the file being executed by any user,  the process will have the same rights as the owner of the file being executed.

- SGID or setgid:[2] Change group ID on execution. Same as above, but inherits rights of the group of the owner of the file on execution. For directories it also may mean that when a new file is created in the directory it will inherit the group of the directory (and not of the user who created the file).

- Sticky bit:[1] It was used to trigger process to "stick" in memory after it is finished, now this usage is obsolete. Currently its use is system dependent and it is mostly used to suppress deletion of the files that belong to other users in the folder where you have "write" access to.
               -->> If the sticky bit is set for a directory, only the owner of that directory or the owner of a file can delete or rename a file within that directory.
          
               EG:  Login as root
                                     # mkdir /usr/Shirish
                                     # touch /usr/Shirish/shukla
                                     # chmod -R 1777 /usr/Shirish/shukla
                      Login as normal user : sks
                                     # ls -l  /usr/Shirish/shukla            
                                        -rwxrwxrwt 1 root root 16 Feb 11 00:31  /usr/Shirish/shukla
                                     # rm -fr /usr/Shirish/shukla
                                        rm: cannot remove `/usr/Shirish/shukla': Operation not permitted
                                  

SUID bit is set for files ( mainly for binary files only, note It'll not work on perl or shell scripts).
The SUID permission makes a binary to run as the user who is the owner of the binary, rather than the user who started it.

SGID, it will run with the privileges of the files group owner, instead of the privileges of the person running the program.

-----------------------------------------------------------------------------------
0755 -> setuid, setgid, sticky bits are cleared        000
1755 -> sticky bit is set                                              001
2755 -> setgid bit is set                                             010
3755 -> setgid and sticky bits are set                      011
4755 -> setuid bit is set                                             100
5755 -> setuid and sticky bits are set                      101    
6755 -> setuid and setgid bits are set                     110
7755 -> setuid, setgid, sticky bits are set                111
-----------------------------------------------------------------------------------


Shirish Shukla
Any comments are welcome .
File Permission Linux, file permission, linux file permission, file permiss, permission linux, security file, file security, user file permission, permissions, linux, linuxva, shirish, shukla

Tuesday, May 3, 2011

Types of Processes in linux

xxxxxxxxxxxxxxxxxx Types of Process in Linux xxxxxxxxxxxxxxxxxxxxxxxx

Every application it may be system specific or application daemon specific. It have to started as process
in background or foreground as designed.

Below are the few common process states:

Runnable: Process started and it's running and is in active queue in meantime it may in waiting for CPU resource.

Stopped: Process started and stopped in between but is not fully killed and can run if started again.

Sleeping/Waiting:  Process started and at meantime there are to many request to CPU from some other process or it's is waiting for another process to complete.

Zombie: Process started and started another child process and then parent process gone/died, in such condition that child process doesn't know how to end, so it's hang around but living, such process is known as zombie process.

More About Foreground/Background Process < fg and bg command linux >

Types of process in linux, zombie process linux , zombie process, processes background, foreground, stopped process, foreground process

Friday, April 29, 2011

how a normal user update shadow file on password change

xxxxxxxxxxx How a normal user changes his password and updated shadow file xxxxxxxxxxxxx

Note:
permission on /etc/shadow is: 400
permission on /etc/password : 644
permission on /usr/bin/passwd : 4755  ( suid is set)

Can root change own/others password ?: yes (Even he is having read permission on shadow,
but ofcourse root can update any file which is on properly mounted partition)

But can a normal user change his pasword ? : Yes (HOW? he is not having write permission on password and even not having read permission on shadow so how????)

Here's the solution why??

# which passwd
/usr/bin/passwd

# ls -l  /usr/bin/passwd
-rwsr-xr-x 1 root root 27768 Jan  6  2007 /usr/bin/passwd

Note: The permission on command binary /usr/bin/passwd is 4755 mean any user can execute it and suid is set on it mean, it must be executed as root it's dose not matter who is executing it, and root have authority to update any file .

But if we look into this scenario then can user keep any password of him and can he change any's password Noooo???

Because passwd binary it's itself authenticate via PAM and run accordingly.


=> inode is is data structure in unix/linux file system
how a user updated passwd, shadow passwd, passwd /etc/passwd, /etc/shadow, passwd linux, normal user updaed shadow file how?

Thursday, April 21, 2011

ssh without password

xxxxxxxxxxxxxxxxxxxxx SSH Login Without Password By- Shirish Shukla xxxxxxxxxxxxxxxxxxxxxxx

Example: ssh from shirish@client-1  to shukla@server-1  without password
Server-1: 192.168.8.10               
Client-1: 192.168.8.20

#####ON Client-1: 192.168.8.20 : user  shirish
### Login as shirish

# ssh-keygen -t dsa
----------------------------------------------->> Just press Enter don't type anything

Generating public/private dsa key pair.
Enter file in which to save the key (/home/shirish/.ssh/id_dsa):  <--Enter
Created directory '/home/shirish/.ssh'.                                    
Enter passphrase (empty for no passphrase):                          <--Enter
Enter same passphrase again:                                               <--Enter
Your identification has been saved in /home/shirish/.ssh/id_dsa.
Your public key has been saved in /home/shirish/.ssh/id_dsa.pub.
The key fingerprint is:
d8:6c:cb:2a:e7:24:01:43:9f:96:4a:45:e6:93:9b:f4 shirish@my.scratch.com

# ssh-copy-id -i .ssh/id_dsa.pub shukla@192.168.8.10

The authenticity of host '192.168.8.10 (192.168.8.10)' can't be established.
RSA key fingerprint is e8:0b:8a:d3:1a:d1:ce:ec:d8:f9:13:31:79:c8:03:ed.
Are you sure you want to continue connecting (yes/no)?  yes                        <--type yes
Warning: Permanently added '192.168.8.10' (RSA) to the list of known hosts.

Password:                                <-- type password of shukla on Server-1: 192.168.8.10               

Now try logging into the machine, with "ssh 'shukla@192.168.8.10'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

#####ON Server-1: 192.168.8.10
### Login as shukla  and confirm following

1> permission of /home/shukla/.ssh    700
$ ls -lrthd .ssh/
drwx------ 2 shukla shukla 4.0K Mar 12 13:51 .ssh/

2> permission of /home/shukla/.ssh/authorized_keys    600
$ ls -lrth .ssh/
-rw------- 1 shukla shukla 614 Mar 12 13:51 authorized_keys

########### Now login as shirish on Client-1:192.168.8.20
## ssh shukla@192.168.8.10
------------------------------------------------------>> It will not prompt for password

# Faced any problem Feedback in above contact me
#===============================Scratch=============================#
# AND Many More .....................Linux is Endless                                                                       #
#=========================== Hope you Liked IT ========================#
#                                                                                                   SSH-I  -- BY Shirish Shukla   #
#                                                                                                                 RHC Engineer 2010 #
#                                                                                                            shirish.linux@gmail.com #
#                                                                                                           shirishlinux.blogspot.com #
#                                  "Give Respect To Time One Day At Right Time, Time Will Respect You" #
#=================================================================#
# TRy Hard theres nothing that are un-achievable by HARDdd-WORKkk                                    #
#=================================================================#
linux ssh without password, password linux ssh, ssh, password sshd, sshd without password, login without password linux, ssh to a system without password

Wednesday, March 23, 2011

Script to take MBR backup

xxxxxxxxxxxx BASH To Take MBR BAckup -- Shirish Shukla xxxxxxxxxxxxx

#!/bin/bash
hdds=$(echo /dev/[hs]d?)

for hdd in $hdds
do
      ## take only last name of dir
        base=$(basename $hdd)
      ##take MBR Backup 0-512 bytes
        dd if=$hdd of=/tmp/$base.mbr count=1 bs=512
 echo $hdd
done


Wednesday, March 16, 2011

Install Configure Nagios

xxxxxxxxxx Install & Manage NAGIOS Monitoring tool by Shirish Shukla xxxxxxxxxxxxx

Nagios® is a system and network monitoring application. (Description from some source)
Some of the many features of Nagios® include:
- Monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.)
- Monitoring of host resources (processor load, disk usage, etc.)
- Simple plugin design that allows users to easily develop their own service checks
- Parallelized service checks
- Ability to define network host hierarchy using "parent" hosts, allowing detection of and     distinction between hosts that are down and those that are unreachable
- Contact notifications when service or host problems occur and get resolved (via email, pager,   or user-defined method)
- Ability to define event handlers to be run during service or host events for proactive          problem resolution
- Automatic log file rotation
- Support for implementing redundant monitoring hosts
- Optional web interface for viewing current network status, notification and problem history,   log file, etc.

PREREQUISITE:
=============
Apache (https)
gcc libraries

Nagios Tols:
============
# mkdir /root/SW
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz

##Adduser and groups

# useradd -m nagios 
# passwd nagios

# groupadd nagios              <--Just for confirmation
# usermod -G nagios nagios     <--Just for confirmation

# groupadd nagcmd
# usermod -a -G nagcmd nagios
# usermod -a -G nagcmd wwwrun  <--Not Require(optional) need to create group wwwrun before

INSTALLATION:
=============
# cd /root/SW
# tar xzf nagios-3.2.3.tar.gz
# cd nagios-3.2.3

# ./configure --with-command-group=nagcmd
# make all
# make install
# make install-init
# make install-config
# make install-commandmode

# vi /usr/local/nagios/etc/objects/contacts.cfg
At line
35: Change --> email           youadmin-mail-id

# make install-webconf
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Note: if you want to change admin "nagiosadmin" name  chanhe all in  "/usr/local/nagios/etc/cgi.cfg" file too .

##Start httpd(Apache)
# /etc/init.d/httpd restart
# chkconfig httpd on

### Instal nagios-plugin
# tar xzf nagios-plugins-1.4.11.tar.gz
# cd nagios-plugins-1.4.11
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
# make
# make install

#### Start nagios
# /etc/init.d/nagios restart
# chkconfig nagios on

###### How to OPERATE

# Webadmin panel
http://your-ip/nagios/  < Provide above seted id & password---

EG: To Check All Hosts without options You can set it to your default apache hosting file for your monitoring purpose
http://192.168.8.10/nagios/cgi-bin/status.cgi?host=all

### Want default as above to your ip
# vi /var/www/html/index.html
<html>
<head>
<META HTTP-EQUIV="Refresh"
CONTENT="2; URL=http://192.168.8.10/nagios/cgi-bin/status.cgi?host=all">
</head>
<body bgcolor="pink">
<br />
<br />
<br />
<br />
<br />
<br />
<Center>
<h1> <font color="green"> Wait 2 Sec.............</font></h1>
</body>
</html>

##Save and relaod httpd

Now just type your ip on browser and <---Enter

####################################################
#################Add your servers to monitor ############
###################################################
# cd /usr/local/nagios    <-- Nagios default files

# cd /usr/local/nagios/etc/objects <<-- All cfg file server's config file to monitor

# cat /usr/local/nagios/etc/nagios.cfg  <<<-- NAgios main config file

# vi /usr/local/nagios/etc/nagios.cfg  <<<--Add your own config dirs where your all server cfg file will reside

==>Add below line

  cfg_dir=/usr/local/nagios/etc/lnx-servers

# cd usr/local/nagios/etc/lnx-servers

# vi my-samba_server


##############################################################
############# HOST DEFINITION ###############################
##############################################################
 # HOST DEFINITION
   define host{
        use                     linux-server            ; defined in template
        host_name               scratch-samba.8.10
        alias                   samba-server
        address                 192.168.8.10
        }

# HOST GROUP DEFINITION (Optional, you can add multiple members to your already created group seperated by comma)
define hostgroup{
        hostgroup_name  my-servers             ; The name of the hostgroup
        alias           MY Linux Servers         ; Long name of the group
        members         scratch-samba.8.10      ; Comma separated list of hosts that belong to this group
       }

##############################################################
####################### SERVICE DEFINITIONS #################
##############################################################

###Ping check
define service{
        use                             local-service                 ; defined in template /usr/local/nagios/etc/objects/templates.cfg
        host_name                       scratch-samba.8.10
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60% ; Defined in commnd file /usr/local/nagios/etc/objects/commands.cfg
        }


### SSH service Check
define service{
        use                             local-service        
        host_name                       scratch-samba.8.10
        service_description             SSH
        check_command                   check_ssh!-t 5 -r "OpenSSH_4.2"
        }

define service{
        use                             local-service         ; Name of service template to use
        host_name                       scratch-samba.8.10
        service_description             samba
        check_command                   check_http
        }

define service{

        use                     local-service           ; Inherit default values from a template
        host_name               scratch-samba.8.10
        service_description     SMTP
        check_command           check_smtp
        }

#check port 139
define service{
        use                     local-service           ; Inherit default values from a template
        host_name               scratch-samba.8.10
        service_description     Samba_port139
        check_command           check_tcp!139
        }

##########################################################################


## Nagios Fine tunning file (Do not replace original line comment that then add below line)
# vi /usr/local/nagios/etc/cgi.cfg

### Don't show pending satate of service
use_pending_states=0

### Disable webadmin auth
use_authentication=0

### Want  to authorize an user shukla to have all admin rights for weadmin panel
authorized_for_system_information=shukla
authorized_for_configuration_information=shukla
authorized_for_system_commands=shukla
authorized_for_all_hosts=shukla
authorized_for_all_services=shukla
authorized_for_all_service_commands=shukla
authorized_for_all_host_commands=shukla


### Want default guest user, WARN: dont' allow this
default_user_name=guest

### Want an read only user
#htpasswd -c /usr/local/nagios/etc/htpasswd.users user1
#using command add more users
authorized_for_read_only=user1

### Want to change ping syntax
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$

### Refresh rate of cgi (status, statusmap, extinfo, and outages) in sec
refresh_rate=60

### Want to play sound on webpanel if error occour on network
## Plcace your audio file at
# /usr/local/nagios/share/media
##Un commen tbelow lines after adding resp audio files
#host_unreachable_sound=hostdown.wav
#host_down_sound=hostdown.wav
#service_critical_sound=critical.wav
#service_warning_sound=warning.wav
#service_unknown_sound=warning.wav
#normal_sound=noproblem.wav

### dont allow to change author name while submitting comment
lock_author_names=0


# vi /usr/local/nagios/etc/nagios.cfg

### Change log path
log_file=/usr/local/nagios/var/nagios.log

## Add your specific cfg file of server to monitor
cfg_file=/usr/local/nagios/etc/objects/myserver.cfg

## Add you dir contain your server cdf file to monitor all
cfg_dir=/usr/local/nagios/etc/my-lnx-servers

## Host update interval in sec
status_update_interval=5

## Change nagios user & Group (NOT Recomended)
nagios_user=nagios
nagios_group=nagios

## Add you own command file
check_external_commands=0
command_check_interval=-1
command_file=/usr/local/nagios/var/rw/nagios.cmd <<--As you want
external_command_buffer_slots=4096

## Nagios store his pid at
lock_file=/usr/local/nagios/var/nagios.lock


##### agios Log rotation
#       n       = None - don't rotate the log
#       h       = Hourly rotation (top of the hour)
#       d       = Daily rotation (midnight every day)
#       w       = Weekly rotation (midnight on Saturday evening)
#       m       = Monthly rotation (midnight last day of month)

log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives

##Use syslog to do so
use_syslog=1

##### MAXIMUM SERVICE CHECK SPREAD in munute
max_service_check_spread=30

### HOST FRESHNESS CHECK OPTION (Nagios chek periodically freshmess of hosts)
check_host_freshness=1
host_freshness_check_interval=20

### Change date format
#       us              (MM-DD-YYYY HH:MM:SS)
#       euro            (DD-MM-YYYY HH:MM:SS)
#       iso8601         (YYYY-MM-DD HH:MM:SS)
#       strict-iso8601  (YYYY-MM-DDTHH:MM:SS)
date_format=us

##Enable perl support
##not in use if u have not compliled nagios with perl
p1_file=/usr/local/nagios/bin/p1.pl
###disable =0
enable_embedded_perl=1

# ADMINISTRATOR EMAIL/PAGER ADDRESSES
admin_email=nagios@localhost

# DEBUG LEVEL
#          -1 = Everything
#          0 = Nothing
#          1 = Functions
#          2 = Configuration
#          4 = Process information
#          8 = Scheduled events
#          16 = Host/service checks
#          32 = Notifications
#          64 = Event broker
#          128 = External commands
#          256 = Commands
#          512 = Scheduled downtime
#          1024 = Comments

debug_level=0

# DEBUG VERBOSITY
# Values: 0 = Brief output
#         1 = More detailed
#         2 = Very detailed

debug_verbosity=1

# DEBUG FILE
debug_file=/usr/local/nagios/var/nagios.debug


############################ BASIC Checking #############################

### Check Your Config files for error

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
# /etc/init.d/nagios start



########## Tunnning

1> Want any new updates to be check every minute (Default 5 minute)
# vi /usr/local/nagios/etc/objects/templates.cfg

check_interval      1 ; Actively check the host every 1 minutes

2> I want to check default ping of my server
check_command                   check-ping

3> I want to use all config waht i defined in my template linux-server to windows-server
Add below line in windows.cfg
use  linux-server


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Faced any problem Feedback in above contact me
#===============================Scratch===============================#
# AND Many More .....................Linux is Endless                 #
#========================== Hope you Liked IT ========================#
#                                         NAGIOS -- BY Shirish Shukla #
#                                                   RHC Engineer 2010 #
#                                             shirish.linux@gmail.com #
#                                           shirishlinux.blogspot.com #
# "Give Respect To Time One Day At Right Time, Time Will Respect You" #
#=====================================================================#
# TRy Hard theres nothing that are un-achievable by HARDdd-WORKkk     #
#=====================================================================#
Nagios, Nagios linux , install nagios, config nagios linux, nagios refresh, nagios configuration linux, how to install nagios linux, basic nagios; shirish, shukla, linux engineer, linux, alert, monitoring tool linux

mysql master -slave Replication

..........mysql master slave replication configuration on LINUX.......- Shirish Shukla

Some Basics:
Port No: 3306 (TCP/UDP)

IPADDRESS_Set as per your requirement

SYATEM 1 >>  master   : 192.168.8.10
SYATEM 2 >>  Slave    : 192.168.8.20

1> Installation on both server

# yum install mysql*

# /etc/init.d/mysqld restart
# /etc/init.d/mysqld restart

                                                      ### Set root password
# mysqladmin -u root password x                       ### replace x is ur password

Login in mysql:

# mysql -u root -px                                   ### replace x is as ur password aviod direct
                                                      ### passing of password for security reason
# mysql -u root -p       <Enter>
Enter password:     <Enter Password>
mysql> exit

2> ON MASTER--192.168.8.10

# cp /etc/my.cfg  /etc/my.cfg_Org                      ### Keep a copy
# vi  /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
###Default to using old password format for compatibility with mysql 3.x
### clients (those using the mysqlclient10 compatibility package).
old_passwords=1

server-id=1
binlog-do-db=SHUKLA               ### databases which you want to replicate
binlog-do-db=SHIRISH                # create these databases before SEE
                                    # at END BASIC MYSQL COMMANDS
                                    # use, to add in 1 line or add seperately
binlog-ignore-db=mysql            ### Input the database that should be ignored
binlog-ignore-db=test               # for replication

log-bin=/var/lib/mysql/mysqld-bin

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
relay-log=/var/log/mysql-relay-bin

# mysql -u root -p 

mysql>  grant replication slave on *.* to replication@192.168.8.20 identified by 'slave';
mysql> GRANT ALL PRIVILEGES ON *.* TO replication;

Cross check user replication
======================
mysql> use mysql;
mysql> select * from user where User='replication';        ### must show 'Y' in most fields specially in "Super_priv"

####  Now Craete some database and tables

mysql> CREATE DATABASE SHIRISH;
mysql> use SHIRISH;
mysql> create table members(name char(20), age varchar(20));
mysql> show tables;
mysql> insert into members(name, age) values ('Shirish Shukla', 23);
mysql> insert into members(name, age) values ('Shirish Shukla-2', 23);
mysql> insert into members(name, age) values ('Shirish Shukla-3', 23);
mysql> select * from members;
+------------------+------+
| name             | age  |
+------------------+------+
| Shirish Shukla | 23   |
| Shirish Shukla-2 | 23   |
| Shirish Shukla-3 | 23   |
+------------------+------+
3 rows in set (0.00 sec)

mysql> exit

3> ON SLAVE--192.168.8.20
# cp /etc/my.cfg  /etc/my.cfg_Org               ### Keep a copy
# vi  /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

server-id=2
master-host = 192.168.8.10
master-user = replication
master-password = slave
master-port = 3306
log-bin=/var/lib/mysql/mysqld-bin

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
relay-log=/var/log/mysql-relay-bin

# mysql -u root -p

mysql> stop slave;
mysql> CHANGE MASTER TO MASTER_HOST='192.168.8.10',MASTER_USER='replication',MASTER_PASSWORD='slave';
mysql> GRANT ALL PRIVILEGES on *.* TO replication                                                              

Cross check user replication
======================
mysql> use mysql;
mysql> select * from user where User='replication';        ### must show 'Y' in most fields specially in "Super_priv"

mysql> start slave;
mysql> show slave status\G;
*************************** 1. row ***************************
             Slave_IO_State: Waiting for master to send event            <1>                             
                Master_Host: 192.168.8.10                                 <2>
                Master_User: replication                                  <3>
                Master_Port: 3306                                         <4>
              Connect_Retry: 60
            Master_Log_File: mysqld-bin.000008                            <5>           
        Read_Master_Log_Pos: 223                                          <6>
             Relay_Log_File: mysqld-relay-bin.000002
              Relay_Log_Pos: 361
      Relay_Master_Log_File: mysqld-bin.000008            
           Slave_IO_Running: Yes                                          <7>
          Slave_SQL_Running: Yes                                          <8>
            Replicate_Do_DB:
        Replicate_Ignore_DB:
         Replicate_Do_Table:
     Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
                 Last_Errno: 0
                 Last_Error:
               Skip_Counter: 0
        Exec_Master_Log_Pos: 223                                          <9>
            Relay_Log_Space: 361
            Until_Condition: None
             Until_Log_File:
              Until_Log_Pos: 0
         Master_SSL_Allowed: No
         Master_SSL_CA_File:
         Master_SSL_CA_Path:
            Master_SSL_Cert:
          Master_SSL_Cipher:
             Master_SSL_Key:
      Seconds_Behind_Master: 0                                           <10>
1 row in set (0.01 sec)

ERROR:
No query specified


#### CROSS check some things in above;
<1>Always "Waiting for master to send event" if unable to connect then report or restrat
<2>Muyst show master IP
<3>Show user as set above
<4>PORT 3306
<5>must match with  below (show master status;) FILE
<6>must match with  below (show master status;) Position
        On master RUN
        mysql> show master status;
+-------------------+-----------+-------------------------------+------------------------+
| File              | Position  | Binlog_Do_DB                  | Binlog_Ignore_DB      |
+-------------------+-----------+-------------------------------+------------------------+
| mysqld-bin.000008 |      223  | SHUKLA,SHIRISH,SHUKLA,SHIRISH | mysql,test,mysql,test |
+-------------------+-----------+-------------------------------+------------------------+

<7>Must show Yes
<8>Must show Yes
<9> SAME As <6>
<10>Must show limited sec diff < 2 or 0 sec but not 'NULL'


3> TESTING MASTER SLAVE
#### Now cross check is replacition done properly or not !!!

mysql> show databases;
mysql> use SHIRISH;  
mysql> show tables;        <--- Compare with master
mysql> select * from members;  <--- Compare with master

### Now create a new table as LINUX at MASTER;
      
mysql> SHOW TABLES;
mysql> create table linux(name char(20), age varchar(20));
mysql> insert into linux(name, age) values ('Shirish Shukla', 23);
mysql> SHOW TABLES;
+--------------------------+
| Tables_in_SHIRISH       |
+--------------------------+
| linux                   |
| members                 |
+--------------------------+
2 rows in set (0.00 sec)

## now at slave

mysql> use SHIRISH;  
mysql> show tables;
mysql> select * from linux;    << MUST SHOW SAME AS MASTER JUST UPDATED>>


Some Tuning.....add below in /etc/my.conf of both master and slave........



==========================================================================
||                    MASTER SLAVE <--> MASTER SLAVE                    ||
==========================================================================

Continue above configuration and add BELOW....

                     192.168.8.10      192.168.8.20
                       SYSTEM-1          SYSTEM-2             
Now Above AS:          Master  <------>  SLAVE
                       SLAVE   <------>  MASTER2

ON SYSTEM-1
# vi /etc/my.cnf    <<--Add below lines

master-host = 192.168.8.20
master-user = replication
master-password = slave
master-port = 3306

# /etc/init.d/mysqld restart

# mysql -u root -px
mysql> stop slave;
mysql> grant replication slave on *.* TO ayam@'192.168.8.10' identified by 'x';
mysql> grant replication slave on *.* TO ayam@'192.168.8.20' identified by 'x';
mysql> GRANT ALL PRIVILEGES ON *.* TO replication@192.168.8.10;
mysql> GRANT ALL PRIVILEGES ON *.* TO replication@192.168.8.20;
mysql> GRANT ALL PRIVILEGES ON *.* TO replication;
mysql> CHANGE MASTER TO MASTER_HOST='192.168.8.20',MASTER_USER='replication',MASTER_PASSWORD='slave';
mysql> start slave;


ON SYSTEM-2
# vi /etc/my.cnf    <<--confirm below line we had already added in Part -1

## Add below lines
binlog-do-db=SHUKLA               #Databases that you want to replicate
binlog-do-db=SHIRISH
binlog-ignore-db=mysql            # input the database that should be ignored for replication
binlog-ignore-db=test

## Cross varify below to exist we had already added
master-host = 192.168.8.10
master-user = replication
master-password = slave
master-port = 3306

# mysql -u root -px
mysql> stop slave;
mysql> grant replication slave on *.* TO ayam@'192.168.8.10' identified by 'x';
mysql> grant replication slave on *.* TO ayam@'192.168.8.20' identified by 'x';
mysql> GRANT ALL PRIVILEGES ON *.* TO replication@192.168.8.10;
mysql> GRANT ALL PRIVILEGES ON *.* TO replication@192.168.8.20;
mysql> GRANT ALL PRIVILEGES ON *.* TO replication;
mysql> CHANGE MASTER TO MASTER_HOST='192.168.8.10',MASTER_USER='replication',MASTER_PASSWORD='slave';
mysql> start slave;

ON SYSTEM-1
mysql> show slave status\G;  < and cross varifie with as we done in PART-1

ON SYSTEM-2
mysql> show slave status\G;  < and cross varifie with as we done in PART-1

CROSS Checking:


###################################### BASIC MYSQL COMMANDS ###############################
##Create database SHIRISH
mysql> create database SHIRISH;
##Create Tables into database SHIRISH
mysql> use SHIRISH;
mysql> create table LINUX_USERS(name char(20), age varchar(20));
##Display created table;
mysql> show tables;
##Insert data into table LINUX_USERS
mysql> insert into LINUX_USERS(name,age) values ('Shirish Shukla', 23)
##display created entry into table LINUX_USERS
mysql> select * from shukla;

# Faced any problem Feedback in above contact me
#===============================Scratch===============================#
# AND Many More .....................Linux is Endless                 #
#========================== Hope you Liked IT ========================#
#                                          MYSQL -- BY Shirish Shukla #
#                                                   RHC Engineer 2010 #
#                                             shirish.linux@gmail.com #
#                                           shirishlinux.blogspot.com #
# "Give Respect To Time One Day At Right Time, Time Will Respect You" #
#=====================================================================#
# TRy Hard theres nothing that are un-achievable by HARDdd-WORKkk     #
#=====================================================================#
mysql, mysql installation linux, mysql installation , mysql replication, master slave, mysql master slave replication, mysql master master replication, replication

Thursday, January 27, 2011

boot process Linux sort

Boot Process in sort by Shirring Shukla

In sort boot process of linux OS ....

power on --> BIOS load into RAM --> BIOS moto is to load OS --> for that he perform POST inventry and calls CMOS to know boot order

---> after getting boot order BIOS load it whatever it finds in first sector of hdd into RAM this is what we called MBR

M ----------------------------- B ----------------------------------- R
<----------------------------- 512 bytes --------------------------->
+--------------BS------------+ +--------PT--------+ +----MN----+
                    446                              64                      2         
M ------------------------------ B ----------------------------------- R

--> Exaine PT of MBR to know where is active partition (AP) -> Then BIOS load whatever it finds on BS of AP
--> BIOS then load 1SBL(1st satge boot loader) which were put there by anocanda during install time.
--> 1SBL gives CHS # of the /boot/boot.map to BIOS to load 2SBL(2st satge boot loader)
--> 2SBL examine the binary format of grub.conf and follows all instructions given there.
--> with the help of BIOS 2SBL loads Linux kernel vmlinuz-2.4.20-8 into the RAM
--> 2SBL uncompress kernal vmlinuz and filled it into ram waht we see in /proc dirr...
--> Now Linux Kernel is into RAM which is much powerfull than 2SBL and takes total control from it.
--> With the help of BIOS Kernal uncompresses the /boot/initrd-2.4.20-8.img to find filesystem driver.
-> Now HDd driver available and Kernel is into RAM
-> Now Kernel Load /sbin/init  program into RAM.
-> /sbin/init* examines /etc/inittab  and
                        1> run level (0-6 what ever is is defined) and run an script name
                        2> /etc/rc.d/rc.sysinit in a subshell of inittab shell
                        which calls /etc/sysconfig/network to load networking
                        and start various functions defined in /etc/init.d/functions
                        and Mounts all local filesystems from /etc/fstab and updates /etc/mtab
                        and now function of ec.sysinit ends
                        Short summary of what rc.sysinit does
                             ===================================== in sort waht done by rc.sysinit
                             hostname
                             system logs
                              date and time
                             keyboard
                             system font
                             swap partitions
                             usb
                             file system checks
                             mount the filesystems read/write
                        =====================================

                        3> /etc/rc.d/rc      { as a subshell }
                           /etc/rc.d/rc3.d/K*
                           /etc/rc.d/rc3.d/S* -->   start & stop of services
                           /etc/rc.d/rc.local  -->

--> shell inittab is active and by defaults there are 6 mingettys out of which all entered into sleep state     
--- except 1
---> this mingetty then executes the /bin/login process and is then it put into sleep state by init
---> and we get promped for username & password
--> * /bin/login execs /usr/bin/passwd which challenges for passwd from
    us which then does authentication and authorization using PAM
---> after Right username and password
---> mingetty then goes into zombie state and is killed by init
---> defined shell loads and we get our shell based command prompt:#$

# Faced any problem Feedback in above contact me
#============================Scratch=================================#
#                                                      AND Many More .....................Linux is Endless                 #
#========================== Hope you Liked IT ==========================#
#                                                                                    BOOT PROCESS-- BY Shirish Shukla #
#                                                                                                                  RHC Engineer 2010 #
#                                                                                                            shirish.linux@gmail.com #
#                                                                                                          shirishlinux.blogspot.com #
#                          "Give Respect To Time One Day At Right Time, Time Will Respect You" #
#===================================================================#
#                           TRy Hard theres nothing that are un-achievable by HARDdd-WORKkk   #
#===================================================================#
bOOT PROCESS, hoe boot process works linux, boot processing of linux in sort, linux boot process shirish, boot process,boot process, linux, in sort how boot process linux works, linux, boot, process, works date configuration linux, linux, commands, Linux commands, kernel Linux, Linux mantra, linux history command, magic, Linux web, yum server configuration Linux, cron, anacron

Followers

Pls LIKE my Story !!!