© 2004 EMC Corporation. All rights reserved. 111 nsr_shutdown Changes in NetWorker 7.3 nsr_shutdown’s Redesign for Scalability Bryce Tompkins

Slides:



Advertisements
Similar presentations
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Advertisements

June 1, 1999Foreground/Background Processing1 Introduction to UNIX H. Foreground/Background Processing.
1 CS345 Operating Systems Φροντιστήριο Άσκησης 1.
Using tcpdump. tcpdump is a powerful tool that allows us to sniff network packets and make some statistical analysis out of those dumps. tcpdump operates.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX – The Process The Process A process is.
Processes and Job Control. Foreground and Background (1)  Unix is a multi-tasking operating system –some of these tasks are being done by other users.
Lesson 10-Controlling User Processes. Overview Managing and processing processes. Managing jobs. Exiting/quitting when jobs have been stopped.
Copyright, © Qwest Communications International, Inc. Qwest Protected Internet Delivery / Service Delivery Gateway Client Agent.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Linux+ Guide to Linux Certification, Second Edition
Process Process: the UNIX abstraction of a stand-along computer that manages resources (memory, CPU, I/O resources) comprising a running program. Processes.
Linux+ Guide to Linux Certification, Second Edition
Experiment: Step by Step Author: Anna Bekkerman
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Installing Apache There are several ways to install the Apache web server – in CIT 370, you probably installed it from the CentOS CD-ROM although in fact,
5 UNIX Processes. Introduction  Processes  How to list them  How to terminate them  Process priorities  Scheduling jobs  Signals.
UNIX Processes. The UNIX Process A process is an instance of a program in execution. Created by another parent process as its child. One process can be.
UNIX Signals Bach 7.2 Operating Systems Course The Hebrew University Spring 2010.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Processes Tarek Abdelzaher Vikram Adve.
CHAPTER 21 Automating Jobs. Introduction to Automating Jobs DBAs rely heavily on automating jobs. DBAs cannot be effective without automation. Listed.
1 Team Leader TKS Job Aid. 2 Viewing the On-line Presentation If you are viewing this presentation via Internet Explorer for best results resize the “Notes”
FTP Client Application CSC 8560 Brian Jorgage 4/27/2004.
Linux+ Guide to Linux Certification, Third Edition
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
#!/bin/sh echo Hello World cat Firstshellscript.sh Firstshellscript.sh.
Process Control. Module 11 Process Control ♦ Introduction ► A process is a running occurrence of a program, including all variables and other conditions.
Session Objectives How to Debug PTF test case/Script Session-6 DebuggingSlide 2.
Managing processes and services. 1. How Linux handles processes 2. Managing running processes 3. Scheduling processes.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux Processes.
RH030 Linux Computing Essentials
The kernel considers each program running on your system to be a process A process lives as it executes, with a lifetime that may be short or long A process.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Hands On UNIX II Dorcas Muthoni. Processes A running instance of a program is called a "process" Identified by a numeric process id (pid)‏  unique while.
Agenda  Working with Processes: Purpose Running Programs within same process (execl, execlp, execle, execv, execvp, execve) “Spawning” other process (fork,
EMT 2390L Lecture 5 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Lecture 24CS311 – Operating Systems 1 1 CS311 – Lecture 24 Outline Final Exam Study Guide Note: These lecture notes are not intended replace your notes.
System calls for Process management
Scis.regis.edu ● CS 468: Advanced UNIX Class 5 Dr. Jesús Borrego Regis University 1.
Copyright © 2002 Legato Systems, Inc.
UNIX Signals * POSIX-Defined Signals * Signaling Processes * Signal Mask * sigaction * kill and sigaction * alarm * Interval Timers * POSIX.1b Timers *
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Unix System Calls and Posix Threads.
Recitation: Signaling S04, Recitation, Section A Debug Multiple Processes using GDB Debug Multiple Processes using GDB Dup2 Dup2 Signaling Signaling.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
Lecture – Users and groups
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop VI Scheduling & Process Management Professional.
System calls for Process management Process creation, termination, waiting.
Agenda Managing Processes (Jobs) Command Grouping Running jobs in background (bg) Bringing jobs to foreground (fg), Background job status (jobs) Suspending.
1 Figure 6-5: Turning Off Unnecessary Services Unnecessary Services  Operating system vendors used to install many services by default  This made them.
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
Agenda The Bourne Shell – Part I Redirection ( >, >>,
An Introduction to processes R Bigelow. A Unix Process A process in Unix is simple a program The Unix system is made up of a group of processes all interacting.
Processes Todd Kelley CST8207 – Todd Kelley1.
Chapter 16 Advanced Bourne Shell Programming. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To discuss numeric data processing.
System Administration Startup Process. Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup.
...looking a bit closer under the hood
Chapter 11 – Processes and Services
Hands On UNIX AfNOG 2010 Kigali, Rwanda
Unix Process Management
Chapter 4 Booting and Shutdown
Hands On UNIX AfNOG X Cairo, Egypt
UNIX PROCESSES.
Lecture 2: Processes Part 1
The Linux Command Line Chapter 10
CGS 3763 Operating Systems Concepts Spring 2013
Chapter 3: Processes.
Lab 6: Process Management
Processes Creation and Threads
LPI Linux Certification
Presentation transcript:

© 2004 EMC Corporation. All rights reserved. 111 nsr_shutdown Changes in NetWorker 7.3 nsr_shutdown’s Redesign for Scalability Bryce Tompkins

© 2004 EMC Corporation. All rights reserved. 22 Preliminaries  nsr_shutdown is a UNIX shell script provided with the NetWorker Client package to properly shutdown NetWorker services.  In this TOI, service, parent process and daemon can be used interchangeably.

© 2004 EMC Corporation. All rights reserved. 33 Highlights  Completely re-written  Primary design goals include safety and scalability  Default behavior and options have changed

© 2004 EMC Corporation. All rights reserved. 44 nsr_shutdown’s Legacy Behavior  Target services were hard-coded into nsr_shutdown script.  nsr_shutdown indiscriminately targeted all listed daemons at once.  Shutdown sequence consisted of ten iterations of 5 second delimited SIGTERMs to each process.  After ten iterations, nsr_shutdown would SIGKILL all remaining alive processes.  No support for process dependencies (shutting down one process before the other).  Not scalable. nsr_shutdown requires editing to add processes to its target list.

© 2004 EMC Corporation. All rights reserved. 55 New nsr_shutdown Features  Supports process dependencies. For example, nsrd depends on nsrexecd for proper operation. As such, nsr_shutdown will not target nsrexecd until nsrd is down.  Scalable. Target services are specified outside of nsr_shutdown’s source code.  Safe. By default, nsr_shutdown will not SIGKILL processes unless explicitly told to do so.  Informative. nsr_shutdown’s -l flag lists NetWorker services and process IDs in a heirarchical display.  Specific. User can target individual services for shutdown.

© 2004 EMC Corporation. All rights reserved. 66 New nsr_shutdown Design  The new nsr_shutdown makes use of run files to determine which processes to shutdown and in what order they need to be shutdown.  Run files are created under /nsr/run by each NetWorker service or parent process: nsrd, nsrexecd, savegrp, etc.  Run files contain three pieces of information: –The process name. Eg. nsrexecd –The process ID. Eg –Prerequisite services to shutdown. Eg. nsrd and savegrp  Example run file: nsrd savegrp /nsr/run/nsrexecd.12345

© 2004 EMC Corporation. All rights reserved. 77 nsr_shutdown’s New Behavior  NetWorker service or parent process creates a run file at startup.  When nsr_shutdown is launched, it creates a list of running processes and a dependency file for each process based on their run files.  For each process in the list, nsr_shutdown will recursively attempt to kill, via SIGTERM, all prerequisite services found in its dependency file.  When all prerequisites are killed, nsr_shutdown will signal the process for termination.  After a process has successfully shutdown, it is removed from nsr_shutdown’s process list and its run file is deleted.

© 2004 EMC Corporation. All rights reserved. 88 nsr_shutdown’s New Behavior (cont…)  Unlike legacy nsr_shutdown, the redesigned nsr_shutdown only signals a process once and only the parent process or process group leader. For example, during shutdown, nsr_shutdown will send one SIGTERM to nsrd to terminate it and all its child processes (nsrmmd, nsrindexd, etc). The shutdown notification is propogated by nsrd to its children.  If a process group leader aborts/crashes and orphans its children to init, nsr_shutdown can still be used to shutdown the process heirarchy using the aborted process group leader’s run file.

© 2004 EMC Corporation. All rights reserved. 99 When nsr_shutdown Fails….  By default, nsr_shutdown uses a time period of 120 seconds to shutdown all specified services. If nsr_shutdown fails to terminate all processes successfully after 120 seconds, it will error with the following message: nsr_shutdown: Failed to shutdown service: nsrexecd (12345)  The default timeout can be changed using the -t flag.  Alternatively, users can forcefully shutdown NetWorker services after the timeout period has elapsed using the -f flag. This flag will instruct nsr_shutdown to send a SIGKILL to each remaining NetWorker process and their children. This is NOT recommended.

© 2004 EMC Corporation. All rights reserved. 10 When Things Really Go Wrong….  nsr_shutdown requires valid run files for each process it is asked to shutdown. If, for whatever reason, run files are deleted prematurely, users will have to resort to the “ps and kill” method of terminating processes: –Use ps to find the PID of the process you want to terminate: # ps –ef | grep nsrexecd –Use kill to terminate the process: # kill

© 2004 EMC Corporation. All rights reserved. 11 Additional nsr_shutdown Features  The -l flag will list running NetWorker services: > sudo nsr_shutdown -l Password: +--o lgtolmd (3231) +--o nsrd (3234) +--o nsrmmd (10215) +--o nsrindexd (3250) +--o nsrntfyd (3251) +--o nsrjobd (3252) +--o nsrmmdbd (3245) +--o nsrexecd (3228)  Individual services can be specified on the command line: # nsr_shutdown nsrd

© 2004 EMC Corporation. All rights reserved. 12 Questions?

© 2004 EMC Corporation. All rights reserved. 13 Demo

© 2004 EMC Corporation. All rights reserved. 14 More Information  d1647: SDS nsr_shutdown Redesign for Scalability  nsr_shutdown man page (NetWorker 7.3) 

© 2004 EMC Corporation. All rights reserved. 15