SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Controlling UNIX
 Processes using
   Supervisor
   Calvin Hendryx-Parker
        PyOhio 2010




         nowhere to go but
        open source
        s i xf e e tu p . c om
Supervisor Overview

•   Convenience
•   Delegation
•   Distributed Control
•   Process Groups




                          sixfeetup.com
Similar Tools

•   launchd
•   daemontools
•   runit




                  sixfeetup.com
Installation and Configuration
•   virtualenv!
•   Installation via setuptools
•   Configuration File Details
    •   Overview of the major sections
    •   Group Processes



                                         sixfeetup.com
Running Supervisor

•   Command line
•   Web Interface
•   XML-RPC




                     sixfeetup.com
supervisord Signals

•   SIGTERM, SIGINT, SIGQUIT
•   SIGHUP
•   SIGUSR2




                               sixfeetup.com
Subprocesses

•   supervisord is the parent process
•   Child Processes
•   pidproxy




                                        sixfeetup.com
Subprocess States




                    sixfeetup.com
Logging


•   Activity Log
•   Child Process Logs




                         sixfeetup.com
Utilizing XML-RPC

•   Remote Control of Supervisor
•   Extending Supervisor
    •   supervisor_cache
    •   supervisor_twiddler




                                   sixfeetup.com
Event Notifications
•   Types of Events
    •   PROCESS_STATE
    •   REMOTE_COMMUNICATION
    •   PROCESS_LOG
    •   PROCESS_COMMUNICATION
    •   SUPERVISOR_STATE_CHANGE
    •   TICK

                                  sixfeetup.com
Event Notifications

•   supervisor.childutils
•   Example usage of events
    •   Monitor resource usage
    •   Span new processes based on usage




                                            sixfeetup.com
Resources
•   http://supervisord.org
•   http://pypi.python.org/pypi/supervisor
•   http://pypi.python.org/pypi/
    collective.recipe.supervisor
•   http://pypi.python.org/pypi/superlance
•   http://pypi.python.org/pypi/supervisor_cache
•   http://virtualenv.openplans.org/
•   http://docs.repoze.org/bfg/1.3/narr/firstapp.html
                                                       sixfeetup.com
Questions?
  Thank you!




   nowhere to go but
  open source
  s i xf e e tu p . c om

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (19)

MoniTutor
MoniTutorMoniTutor
MoniTutor
 
Loadays 2015 - Enterprise Monitoring with Icinga
Loadays 2015 - Enterprise Monitoring with IcingaLoadays 2015 - Enterprise Monitoring with Icinga
Loadays 2015 - Enterprise Monitoring with Icinga
 
Monitoring OpenNebula with Icinga2
Monitoring OpenNebula with Icinga2Monitoring OpenNebula with Icinga2
Monitoring OpenNebula with Icinga2
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2
 
Icinga at Flossuk 2015 in York
Icinga at Flossuk 2015 in YorkIcinga at Flossuk 2015 in York
Icinga at Flossuk 2015 in York
 
Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2
Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2
Log Monitoring Simplified - Get the best out of Graylog2 & Icinga 2
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them all
 
Icinga Camp Belgrade - Icinga 2 Apify Them All
Icinga Camp Belgrade - Icinga 2 Apify Them AllIcinga Camp Belgrade - Icinga 2 Apify Them All
Icinga Camp Belgrade - Icinga 2 Apify Them All
 
Icinga @ OSMC 2014
Icinga @ OSMC 2014Icinga @ OSMC 2014
Icinga @ OSMC 2014
 
Icinga Camp Berlin 2017 - Welcome & State of Icinga
Icinga Camp Berlin 2017 - Welcome & State of IcingaIcinga Camp Berlin 2017 - Welcome & State of Icinga
Icinga Camp Berlin 2017 - Welcome & State of Icinga
 
Icinga Camp Amsterdam - How to monitor Windows
Icinga Camp Amsterdam - How to monitor WindowsIcinga Camp Amsterdam - How to monitor Windows
Icinga Camp Amsterdam - How to monitor Windows
 
Icinga Camp Berlin 2016 - Opening
Icinga Camp Berlin 2016 - OpeningIcinga Camp Berlin 2016 - Opening
Icinga Camp Berlin 2016 - Opening
 
Git It
Git ItGit It
Git It
 
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
 
Icinga Camp Bangalore - Welcome
Icinga Camp Bangalore - WelcomeIcinga Camp Bangalore - Welcome
Icinga Camp Bangalore - Welcome
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
OSMC 2014: Log monitoring simplified - Get the best out of Graylog2 & Icinga ...
OSMC 2014: Log monitoring simplified - Get the best out of Graylog2 & Icinga ...OSMC 2014: Log monitoring simplified - Get the best out of Graylog2 & Icinga ...
OSMC 2014: Log monitoring simplified - Get the best out of Graylog2 & Icinga ...
 
Icinga Camp Berlin 2018 - What's evolving in icinga 2018
Icinga Camp Berlin 2018 - What's evolving in icinga 2018Icinga Camp Berlin 2018 - What's evolving in icinga 2018
Icinga Camp Berlin 2018 - What's evolving in icinga 2018
 
Icinga 2011 at OSMC
Icinga 2011 at OSMCIcinga 2011 at OSMC
Icinga 2011 at OSMC
 

Andere mochten auch

Social Networking Tools Session Three
Social Networking Tools Session ThreeSocial Networking Tools Session Three
Social Networking Tools Session Three
Calvin Hendryx-Parker
 
Enterprise search in plone using solr
Enterprise search in plone using solrEnterprise search in plone using solr
Enterprise search in plone using solr
Calvin Hendryx-Parker
 

Andere mochten auch (7)

Plone and Drupal -- CMS Coexistance in Higher Education
Plone and Drupal -- CMS Coexistance in Higher EducationPlone and Drupal -- CMS Coexistance in Higher Education
Plone and Drupal -- CMS Coexistance in Higher Education
 
How to seal the deal
How to seal the dealHow to seal the deal
How to seal the deal
 
Plone on RelStorage
Plone on RelStoragePlone on RelStorage
Plone on RelStorage
 
Enterprise search in Plone using Solr
Enterprise search in Plone using SolrEnterprise search in Plone using Solr
Enterprise search in Plone using Solr
 
Plone roadmap
Plone roadmapPlone roadmap
Plone roadmap
 
Social Networking Tools Session Three
Social Networking Tools Session ThreeSocial Networking Tools Session Three
Social Networking Tools Session Three
 
Enterprise search in plone using solr
Enterprise search in plone using solrEnterprise search in plone using solr
Enterprise search in plone using solr
 

Ähnlich wie 2010 py ohio supervisor talk

Ähnlich wie 2010 py ohio supervisor talk (20)

DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)
 
Nagios Conference 2007 | Enterprise Application Monitoring with Nagios by Jam...
Nagios Conference 2007 | Enterprise Application Monitoring with Nagios by Jam...Nagios Conference 2007 | Enterprise Application Monitoring with Nagios by Jam...
Nagios Conference 2007 | Enterprise Application Monitoring with Nagios by Jam...
 
12 Factor App Methodology
12 Factor App Methodology12 Factor App Methodology
12 Factor App Methodology
 
Open Policy Agent for governance as a code
Open Policy Agent for governance as a code Open Policy Agent for governance as a code
Open Policy Agent for governance as a code
 
Zentral london mac_ad_uk_2017
Zentral london mac_ad_uk_2017Zentral london mac_ad_uk_2017
Zentral london mac_ad_uk_2017
 
How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015
 
Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014Sensu and Sensibility - Puppetconf 2014
Sensu and Sensibility - Puppetconf 2014
 
Pywps
PywpsPywps
Pywps
 
PyWPS-4.0.0
PyWPS-4.0.0PyWPS-4.0.0
PyWPS-4.0.0
 
Tool up your lamp stack
Tool up your lamp stackTool up your lamp stack
Tool up your lamp stack
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP Stack
 
Web development with Python
Web development with PythonWeb development with Python
Web development with Python
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
TestMaker Object Designer Training - Basics
TestMaker Object Designer Training - BasicsTestMaker Object Designer Training - Basics
TestMaker Object Designer Training - Basics
 
DrupalCon 2011 Highlight
DrupalCon 2011 HighlightDrupalCon 2011 Highlight
DrupalCon 2011 Highlight
 
Icinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrationsIcinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrations
 
Kick starting Network Automation
Kick starting Network AutomationKick starting Network Automation
Kick starting Network Automation
 
Git version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTSGit version control and trunk based approach with VSTS
Git version control and trunk based approach with VSTS
 
OWASP 2013 APPSEC USA Talk - OWASP ZAP
OWASP 2013 APPSEC USA Talk - OWASP ZAPOWASP 2013 APPSEC USA Talk - OWASP ZAP
OWASP 2013 APPSEC USA Talk - OWASP ZAP
 
Presentation Magento OroCRM - MageConf 2014
Presentation Magento OroCRM - MageConf 2014Presentation Magento OroCRM - MageConf 2014
Presentation Magento OroCRM - MageConf 2014
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

2010 py ohio supervisor talk

  • 1. Controlling UNIX Processes using Supervisor Calvin Hendryx-Parker PyOhio 2010 nowhere to go but open source s i xf e e tu p . c om
  • 2. Supervisor Overview • Convenience • Delegation • Distributed Control • Process Groups sixfeetup.com
  • 3. Similar Tools • launchd • daemontools • runit sixfeetup.com
  • 4. Installation and Configuration • virtualenv! • Installation via setuptools • Configuration File Details • Overview of the major sections • Group Processes sixfeetup.com
  • 5. Running Supervisor • Command line • Web Interface • XML-RPC sixfeetup.com
  • 6. supervisord Signals • SIGTERM, SIGINT, SIGQUIT • SIGHUP • SIGUSR2 sixfeetup.com
  • 7. Subprocesses • supervisord is the parent process • Child Processes • pidproxy sixfeetup.com
  • 8. Subprocess States sixfeetup.com
  • 9. Logging • Activity Log • Child Process Logs sixfeetup.com
  • 10. Utilizing XML-RPC • Remote Control of Supervisor • Extending Supervisor • supervisor_cache • supervisor_twiddler sixfeetup.com
  • 11. Event Notifications • Types of Events • PROCESS_STATE • REMOTE_COMMUNICATION • PROCESS_LOG • PROCESS_COMMUNICATION • SUPERVISOR_STATE_CHANGE • TICK sixfeetup.com
  • 12. Event Notifications • supervisor.childutils • Example usage of events • Monitor resource usage • Span new processes based on usage sixfeetup.com
  • 13. Resources • http://supervisord.org • http://pypi.python.org/pypi/supervisor • http://pypi.python.org/pypi/ collective.recipe.supervisor • http://pypi.python.org/pypi/superlance • http://pypi.python.org/pypi/supervisor_cache • http://virtualenv.openplans.org/ • http://docs.repoze.org/bfg/1.3/narr/firstapp.html sixfeetup.com
  • 14. Questions? Thank you! nowhere to go but open source s i xf e e tu p . c om

Hinweis der Redaktion

  1. Pure Python Simple, centralized, efficient, extensible, compatible, proven Maintainable Software - Mike Agendaless - Chris Accuracy
  2. supervisord supervisorctl
  3. tail -f (stderr) utilize the supervisor namespace supports XML-RPC multicall API - encapsulate multiple calls to a remote server into a single request
  4. stop processes, reload config close and re-open log files, rotate log files
  5. manages complete lifetime of child processes can't daemonize for daemons that can't
  6. stdout
  7. Supervisor Cache can prevent the synchronization headaches you might have using the filesystem or a database to accomplish the same task manipulated in ways that are not normally possible at runtime.
  8. need to mention superlance Supervisor sends specially-formatted input to an event listener process' stdin and stdout supervisor maintains state of event listeners, busy, ready, acknowleged starting, running, backoff, stopping, exited, stopped, fatal, unknown stdout, stderr watches for tags in process output, stdout and stderr running, stopping 5, 60, 3600 event listeners can be in any lang, but supervisor contains a support lib to make this easy.
  9. need to mention superlance Supervisor sends specially-formatted input to an event listener process' stdin and stdout supervisor maintains state of event listeners, busy, ready, acknowleged starting, running, backoff, stopping, exited, stopped, fatal, unknown stdout, stderr watches for tags in process output, stdout and stderr running, stopping 5, 60, 3600 event listeners can be in any lang, but supervisor contains a support lib to make this easy.