Linux Doc



Nagios
https://www.digitalocean.com/community/tutorials/how-to-create-nagios-plugins-with-bash-on-ubuntu-12-10
http://www.yourownlinux.com/2014/06/how-to-create-nagios-plugin-using-bash-script.html
http://www.tecmint.com/install-nagios-in-linux/
http://blog.centreon.com/good-practices/


mysql replication
https://www.percona.com/blog/2013/01/09/how-does-mysql-replication-really-work/
http://www.tecmint.com/how-to-setup-mysql-master-slave-replication-in-rhel-centos-fedora/


mysql - pt-query digest- aneometer
http://www.olindata.com/blog/2014/07/anemometer-mysql-slow-query-monitor
https://www.percona.com/blog/2012/08/31/visualization-tools-for-pt-query-digest-tables/


memcached
http://www.tecmint.com/install-memcached-caching-server-on-rhel-centos-fedora/

linux boot process
http://www.thegeekstuff.com/2011/02/linux-boot-process/
https://www.quora.com/How-does-the-Linux-boot-process-work
http://www.slashroot.in/linux-booting-process-step-step-tutorial-understanding-linux-boot-sequence

glusterfs


Raid
http://www.thegeekstuff.com/2010/08/raid-levels-tutorial/
-----------------------------------------------------------------------------------------------------------------

( innovativeness ) 
1) nagios monitoring - plugin creation - third party server .  

( solving problem  slow logs -- appreciation from client  ) 
2) pt-query-digest - anometer 

( cleint apprication  ) 
2) MP DE - se-config issue .  We got a call at 12 mid night and reset those changes.

( inovativeness ) 
3) Had setup behat  scripting for automated smoke testing ( gherkin) ..when I didn't even know how it was done ... using the php composer mink extension.
4) Other initiative I took was integrating slack with jira. Skack bot.

( innovativeness ) 
5) I was a part of.the implementation team.. the dns was managed by our client . He had to create a excel sheet of about 15 dns enteries  for  each domain every time a site went live . I had developed a simple web app that was apache authenticated . The client just had to enter the domans name and region ..He would get all the dns enteries associated with that domain and was downloadable. Client was pretty impressed. 

( innovative ness ) 
6) Had setup up centralized logging with logstash and kibana and elastic search.

( one of the problems we face, appication from the client  )
7) We had bots hitting our server. 
 options 1)  Goaccess.io , provided a dashboard for all the top 100 ips based on request . 
option 2 )  created a script to grep and  

( one of the problems we face )
8)  the script on  haproxy --> elb CNAME ( the name used to change ) - 

( Description of our environment) 
8)   - Every region had its own architecture. -  Elb -->  Varnish/nginx  --> Elb ->  Web ( distributed az zones ) -> Rds (Multi az setup)

code deployment 


                              
[linux troubleshooting ]                                                                                                                                                                                                        Memcached server 
9) trouble shooting skills -- uptime , top , iostat , iotop , sysstat , Sar -f file name
10) boot proecess - BIOS , MBR, Grub ,  Kernel , /sbin/init -> /etc/initab, run level , /etc/rc.d/rc*.d/S23syslog.  
11) format linux file system fdisk device , mkfs -t ext3 device , ./etc/fstab, mount -a  
13) linux hardening :           more partitions,             uncecessary services on ,             netstat,           never login as root,                groupremoved x window system. , psacct ( tracks users activity ), /etc/sysctl.conf ignore ping , Lynis (auditing s/w) , disable pam authenitication only alow with key
14) syslog/ rsynlog/ logstash --
15) puppet - master port 8140, puppet cert sign --all/hostname , puppet cert list -all , puppet cert clean hostname

[AWS]
cloudformation - json, [descrption ,parameter ,  resource and output ]
AWS CLI  --user data 
elasticbeastalk -- pip install awsebcli 


16) ansible 

17 ) how apache wok  - Prefork MPM  and  Worker MPM
18) apache status code - 200 , 400, 401 , 404, 500, 301 
15) raid : 0 , 1 , 5 , 10 
16) content of  /etc/passwd - user:passd:UID: GID: User ID Info: Home directory: 
      /etc/shadow file is by shadow-utils package 

17) lsof 
18) kill - SIGTERL or kill -15 is safe ,  SIGHUP or kill -1 is clean kill , kill -2 or SIGINT is same is ctl+c , kill -9 force kill

19) fine tuning apache : a2enmod a2dismod, disable mod_php and add php-fpm which uses fastcgi protocol 
 Setup appropriate Expires, Etag, and Cache-Control Headers
mod_gzip/mod_deflate , Avoid using hostname in configs , Do Not set KeepAliveTimeout too high,Options +FollowSymLinks, mod_security, mod_evasive 
list modules : apachectl -m 


20 ) what is zombiee process : When a child exits, the parent process will receive a SIGCHLD signal to indicate that one of its children has finished executing; the parent process will typically call the wait() system call at this point. That call will provide the parent with the child’s exit status, and will cause the child to be reaped, or removed from the process table.
Kill -s SIGCHILD pid

21) mysql replication : master -> wr to logsbinary <-- --="" from="" iothread="" slave="">wr relay log<-- nbsp="" read="" span="" sql="" thread="">

22) rewite rules 

23) loading kernel module : insmod , modprobe , lsmod 



There are a number of MPM modules (Multi-Processing Modules), but by far the most widely used (at least on *nix platforms) are the three main ones: prefork, worker, and event. Essentially, they represent the evolution of the Apache web server, and the different ways that the server has been built to handle HTTP requests within the computing constraints of the time over its long (in software terms) history.

prefork
mpm_prefork is.. well.. it's compatible with everything. It spins of a number of child processes for serving requests, and the child processes only serve one request at a time. Because it's got the server process sitting there, ready for action, and not needing to deal with thread marshaling, it's actually faster than the more modern threaded MPMs when you're only dealing with a single request at a time - but concurrent requests suffer, since they're made to wait in line until a server process is free. Additionally, attempting to scale up in the count of prefork child processes, you'll easily suck down some serious RAM.

It's probably not advisable to use prefork unless you need a module that's not thread safe.

Use if: You need modules that break when threads are used, like mod_php. Even then, consider using FastCGI and php-fpm.

Don't use if: Your modules won't break in threading.

worker
mpm_worker uses threading - which is a big help for concurrency. Worker spins off some child processes, which in turn spin off child threads; similar to prefork, some spare threads are kept ready if possible, to service incoming connections. This approach is much kinder on RAM, since the thread count doesn't have a direct bearing on memory use like the server count does in prefork. It also handles concurrency much more easily, since the connections just need to wait for a free thread (which is usually available) instead of a spare server in prefork.

Use if: You're on Apache 2.2, or 2.4 and you're running primarily SSL.

Don't use if: You really can't go wrong, unless you need prefork for compatibility.

However, note that the treads are attached to connections and not requests - which means that a keep-alive connection always keeps ahold of a thread until it's closed (which can be a long time, depending on your configuration). Which is why we have..

event
mpm_event is very similar to worker, structurally; it's just been moved from 'experimental' to 'stable' status in Apache 2.4. The big difference is that it uses a dedicated thread to deal with the kept-alive connections, and hands requests down to child threads only when a request has actually been made (allowing those threads to free back up immediately after the request is completed). This is great for concurrency of clients that aren't necessarily all active at a time, but make occasional requests, and when the clients might have a long keep-alive timeout.

The exception here is with SSL connections; in that case, it behaves identically to worker (gluing a given connection to a given thread until the connection closes).

Use if: You're on Apache 2.4 and like threads, but you don't like having threads waiting for idle connections. Everyone likes threads!


India.com.. Had setup along with my seniors the bsd based 

interview questions 
=======================

ant and maven 
svn and git 
branch in svn 
tag in svn
how to call one ant script from another ant script 
how to call a ant script if it is not build.xml
how to generate ssh key
differnce between top and head !! 


How to set up HAproxy 
How to set up DRBD 
ldap how to set up 
what is inode - description of inode  
how to setup sofware RAID 
hard link and soft link 
how to set up lvm
we have 100gb  os disk space on a certain location ... log file is 100 gb .. we delete that log file . But we dont see the disk space some down.  

we are not able to unable to mount partition  .. error  say system resource is utilizing that partition.  
what are filehandles -- 2>&1  ...lsof 

/etc/hosts how it comes to know it has to look in etc host file 
how traceroute work 
tcp and upd   



---------------------------------------------------------------------------------------------------

1)Are you working as Primary OR Secondary support system admin?  primary
2)Linux and Windows Server setup from scratch in black box. yes
3)Have you closely worked with web developer to resolve the server issue faced during development.  yes ( for all major websites of india.com )
4)SSL configuration? yes


5)SVN repository for multiple developers on multiple project. yes ( set up for the india.com office)
6)Name based Virtual Host on development server.  yes
7)Major Apache Modules installation & configuration. yes
8)Major PHP Extension installation & Configuration yes
9)Server Performance Optimization and enhancement. yes
10)Proficient in Major Linux command without searching on internet. yes
11)What kind of projects have you worked on?     


Setting up entire datacenter for india.com


setting up of the xen servers  on the blade hardware .


setting up automated deployments scripts ( written in perl and shell)


setting up of automated backup systems .


and much more ( do refer my resume )


12)Multitire server architecture for high volume project ... yes ( for india.com & netcore solutions )
13)Technical Expertise for database installation and configuration.  yes
14)Identify and resolve server security issue with prior information to Head. yes
15)Define the timeline for given work.  yes
16)Inform status of work and implementation status everyday by Email.


* Maintain site servers and hosted web applications, ensuring up-time and site responsiveness.
* Troubleshoot problems and issues, escalating issues within the organization.
* Maintain system and network procedure documentation.
* Communication of system and network events and root cause analysis after resolution
* Diagnose and resolve LINUX server, OS, network and other failures and engage internal specialists and vendors in the respective areas as required.
* Provide daily site operations reports to Operations Management.
* Configure new LINUX servers using automated deployment tools.
* Manage Data Center racking, cabling, power, servers, and other devices.
* 3+ years of experience operating a large-scale, 24x7 web environment
* 3+ years experience with Linux or other Windows based operating system
* Familiarity with network management tools.
* Work closely with developers / vendor teams to ensure business and technical compatibility to the functional specification.
* Coordinate with developers and testers to resolve issues during testing phase.



Configuration, troubleshooting, debugging, etc.
    Linux system administration experience.
    Good theoretical knowledge of networking, UNIX-like services and concepts.
    Advanced application debugging knowledge.
    Basic kernel debugging and tuning knowledge.
    Strong troubleshooting skills and a passion for problem solving and investigation.
    Strong Customer focus and service orientation.
    Ability to work with conflicting priorities and able to use initiative to develop solutions.
    Previous knowledge of support systems and tools.
    Solid understanding of Open Source technologies and technical support environments.
    Software development/programming experience is preferred.
    Scripting abilities preferred (Perl/Python/Bash).
    Knowledge of enterprise storage solutions and clustering.
    Knowledge of enterprise database solutions.
    Prior participation in open source software projects is preferred.



------------------------------------------------------------------------------------------------------------------------
pxe installation of centos


iso creation
installation of centos via ks.cfg
OS  hardening
shell scripting
perl scripting
varnish
vmware
aws
xen
LAMP
Gluster
RAID
Zabbix
LDAP
puppet :
postfix mailing ---
http://www.textndata.com/forums/canonical-vs-virtual-192561.html (difference between cononical and virtual tables )


Nagios
touble shooting techniques
apache -- rewrite   --   rules
nginx


repair corrupted database
mysqlcheck -r [DBNAME]





rewrite rule




how apache works




apache : request headers and response headers .







svn --
ks.cfg
varnish sticky session





forking a process in perl : http://www.perlmonks.org/?node_id=176222












syslog --


linux memory issue : http://www.cyberciti.biz/faq/linux-performance-tools-to-troubleshoot-problem/



yum repository explaination --


                               http://www.thegeekstuff.com/2011/06/iptables-rules-examples/





find command --
find . -newermt "2010-03-31 0300" -not -newermt "2010-03-31 0310" -type d




kill command -













apache error codes :









RED HAT interview question .
prepare for
1. software testing methodologies and processes
2. SDLC
3. bugzilla, automation, test cases, test plans,
4. QA terms, regression, sanity, functional, etc
5. gluster + swift authentication mechanism
6. ldap, AD, kerberos


sr system engineer job duties :
 User Administration  Activities - Account Creation/Deletion/Modification.
-         Monitoring  the server Health -   CPU, Memory, Diskspace and network.
-         Monitoring the server backups.
-         printer Administration activities - Creating, Removing  Printers.
-         Maintaining Server inventory list. - Addition, Deletion of the servers
-         Scheduling the  jobs  using  crontab.
-         Monitoring  the mail Queue, Printer Queue jobs.
-         backup and  Restoring the  server data.
-         User password  reset activities.
-         Auditing  the servers  for  failed logins .
-         Escallating the  issues to Level 2 support  when the issue is not resolved by L1.
-         Hardening the Linux servers.
-         Troubleshooting  Backup and  restore  issues.
-         Patches and packages installation.
-         Configuring NTP and NFS servers.
-         Administration of  Linux services.
-         Clearing the defunc processes.
-         Configuring log rotation  for  log files.
-         Implementing  password policy.
-         Network administration activities.
-         Troubleshootiong server performance issues.
-         Mail Configuration.
-         Writing  SOP documents for Linux activities.
-         Server crash dump analysis




==========================================================


* Upgradation of OS
* Linux shell scripting
* Backup Implementation.
* Configuration of NIS and DNS sevrer.
* Installing OS
* Installing and Configuring new hardwares.
* Configuring Raid technologies.
* Upgradaing firmware.
* Upgrading CPU, memory and network resources.
* Implementing DR and BCP plan.
* OS performance tuning.


Desired Candidate Profile:
* Applicant must have experience of 2-4 yrs in Linux Administration.
* Candidate must be well versed with User Administration Activities - Account Creation/Deletion/Modification.
* Hands-on experince on Scheduling the jobs using crontab.
* Experience in troubleshooting Backup and restore issues.
* Expert at Configuring NTP and NFS servers & log rotation for log files
* Experince on Mail Configuration.




netstat command to check route .. wat  does it  stand for ( every thngs )


How to set up a DMZ  
how to increase kernel memory at boot time
how to check with rpm command the list of files installed before intallation
how to check with rpm the list of dependecies before installation


free opensource products



-----------------------------------------------------------------------------------------------------------------------


Other Articles

Enter your email address: