SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Screen Player Bogdan Klichuk ©  Quintagroup 2009
Table of Contents ,[object Object]
sp.py
Adapting to screen's logging system
Player in action
Charts builder
Structure
Code documentation
Purpose
[object Object],Purpose - load - tempo - speed Input  echo Record Playback Screen player screen
[object Object],Purpose
Demo
[object Object],Purpose
sp.py
sp.py sp.py  is a Python utility,  enabling you to access all the Screen Player's functionality rapidly Works with Python >= 2.5
sp.py sp.py by itself does not provide and does not implement any  functionality, instead it provides a set of tasks, each of which  can handle different work arguments sp.py
sp.py Screen Player provides multi-level config system.  Any command line option for a specified task can be stored in config section, named  after the  task. Options at the level with higher priority override the same options at  The level with lower priority. For example to set option  -s STEP, --step=STEP  for 'sp.py play': [play] step = 10 Levels priority order (ascending) Config system in Screen Player Execute task sp.py -с (--config)  for any task
Adapting to screen's  logging system
Adapting to screen's logging system How does Screen Player play back the logs saving the nature of the interaction and time characteristics? Time stamps allow you to restore the real speed, tempo and load of the 'screen' terminal, when the logs where being written.  Two ways of how Screen Player plays back: ,[object Object]
Writes it's own time stamps, tracking the changes to the size of the log file  (needs the utility to be launched while logging)
Screen Player can be adapted to the
format of the screen's time stamp.
Here's the example of default
screen's time stamp: [2]
Adapting to screen's logging system Time line 0 Stamp, 200 bytes Stamp, 800 bytes Stamp, 2000 bytes Stamp, 2100 bytes Structure of time stamps: Time stamp here is an exact  moment of time and the size of  the log file in this moment of time.  Stamps data can be stored in  different,  yet 3 formats: ,[object Object]
CSV
Protocol buffer 2 [3]
(Language,platform independent)
Adapting to screen's logging system Track log file size and writing time stamps manually, sp.py track This command shows help for the task : To start tracking a file  logfile.txt  and producing stamps to  logfile.txt.times , use this: To start tracking a file  logfile.txt  and producing stamps to custom stamps file, use this: Option  --storage  enables you to choose a type of the storage for the time-stamps:  pickle, csv etc.
Adapting to screen's logging system Splitting the log file with built-in stamps to separate  time stamps storage and clean log data, sp.py split  Let us split the log file  logfile_dirty.txt  with  built-in stamps, produce the clean log to  logfile_clean.txt  and store time stamps In  logfile_clean.txt.times  (adjusted implicitly): If you need just to clean up the log file from  the built-in time stamps, use flag – c . In this case time stamps won't be stored. Type of the time stamps storage can be set by a flag  --storage
Player in action Playback of the log file, having separate time-stamps and log files, sp.py play To start playing back a log file  logfile.txt , when the time stamps storage is  logfile.times, use this: -t  option will let you set the time stamps storage explicitly. Start from the specified moment of time,  defining  a start point using a  --jump(-j)   option. A value has to be  a screen player's ISO 8601 time stamp.
Playback of the log file with built-in  time-stamps Player in action Assume, that you have a large log file, produced by screen with  “ logtstamp” option on, and you want to play it back easily,  not having to worry about the separate time-stamps storage and “clean”  log file. Use  -d (--dirty)  option:
Player in action Screen player's ISO 8601 date/time format A basic format of the date/time in ISO 8601 is: Screen player offers optional ISO 8601 format, when any count of the  parameter can be omitted and inherited from the default date/time. For example: In ' sp.py play'  our stamp is based on a default  stamp – first one from the time stamps storage, here we omitted the month, day, hour and  Time zone – all this parameters will be inherited  from the default stamp

Weitere ähnliche Inhalte

Ähnlich wie Screen Player

Python Online Compiler
Python Online CompilerPython Online Compiler
Python Online Compiler
Mr Examples
 
27.1.5 lab convert data into a universal format
27.1.5 lab   convert data into a universal format27.1.5 lab   convert data into a universal format
27.1.5 lab convert data into a universal format
Freddy Buenaño
 
Deploying ibm sametime 9 on aix 7.1
Deploying ibm sametime 9 on aix 7.1Deploying ibm sametime 9 on aix 7.1
Deploying ibm sametime 9 on aix 7.1
a8us
 
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
Azhar Satti
 

Ähnlich wie Screen Player (20)

Cisco be6000 solution
Cisco be6000 solutionCisco be6000 solution
Cisco be6000 solution
 
Scaling python webapps from 0 to 50 million users - A top-down approach
Scaling python webapps from 0 to 50 million users - A top-down approachScaling python webapps from 0 to 50 million users - A top-down approach
Scaling python webapps from 0 to 50 million users - A top-down approach
 
Logging, Serilog, Structured Logging, Seq
Logging, Serilog, Structured Logging, SeqLogging, Serilog, Structured Logging, Seq
Logging, Serilog, Structured Logging, Seq
 
Python Online Compiler
Python Online CompilerPython Online Compiler
Python Online Compiler
 
8.4 Upcoming Features
8.4 Upcoming Features 8.4 Upcoming Features
8.4 Upcoming Features
 
27.1.5 lab convert data into a universal format
27.1.5 lab   convert data into a universal format27.1.5 lab   convert data into a universal format
27.1.5 lab convert data into a universal format
 
Deploying ibm sametime 9 on aix 7.1
Deploying ibm sametime 9 on aix 7.1Deploying ibm sametime 9 on aix 7.1
Deploying ibm sametime 9 on aix 7.1
 
Where's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind PloneWhere's the source, Luke? : How to find and debug the code behind Plone
Where's the source, Luke? : How to find and debug the code behind Plone
 
Scientific Computing with Python Webinar --- May 22, 2009
Scientific Computing with Python Webinar --- May 22, 2009Scientific Computing with Python Webinar --- May 22, 2009
Scientific Computing with Python Webinar --- May 22, 2009
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
Goroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in GoGoroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in Go
 
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In PerlNagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
 
Augustus Overview Open Source Analytics
Augustus Overview  Open Source AnalyticsAugustus Overview  Open Source Analytics
Augustus Overview Open Source Analytics
 
Proyecto de microcontroladores
Proyecto de microcontroladoresProyecto de microcontroladores
Proyecto de microcontroladores
 
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
12 archiving system v1.00_en
12 archiving system v1.00_en12 archiving system v1.00_en
12 archiving system v1.00_en
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logs
 
Vasiliy Litvinov - Python Profiling
Vasiliy Litvinov - Python ProfilingVasiliy Litvinov - Python Profiling
Vasiliy Litvinov - Python Profiling
 

Mehr von Quintagroup

Plone 4. Що нового?
Plone 4. Що нового?Plone 4. Що нового?
Plone 4. Що нового?
Quintagroup
 
Plone в урядових проектах
Plone в урядових проектахPlone в урядових проектах
Plone в урядових проектах
Quintagroup
 
Використання системи Plone для створення університетських вебсайтів
Використання системи Plone для створення університетських вебсайтівВикористання системи Plone для створення університетських вебсайтів
Використання системи Plone для створення університетських вебсайтів
Quintagroup
 

Mehr von Quintagroup (20)

Georgian OCDS API
Georgian OCDS APIGeorgian OCDS API
Georgian OCDS API
 
Open procurement - Auction module
Open procurement - Auction moduleOpen procurement - Auction module
Open procurement - Auction module
 
OpenProcurement toolkit
OpenProcurement toolkitOpenProcurement toolkit
OpenProcurement toolkit
 
Open procurement italian
Open procurement italian Open procurement italian
Open procurement italian
 
Plone SEO: Пошукова оптимізація Плон сайтів
Plone SEO: Пошукова оптимізація Плон сайтівPlone SEO: Пошукова оптимізація Плон сайтів
Plone SEO: Пошукова оптимізація Плон сайтів
 
Plone 4. Що нового?
Plone 4. Що нового?Plone 4. Що нового?
Plone 4. Що нового?
 
Calendar for Plone
Calendar for Plone Calendar for Plone
Calendar for Plone
 
Packages, Releases, QGSkel
Packages, Releases, QGSkelPackages, Releases, QGSkel
Packages, Releases, QGSkel
 
Integrator Series: Large files
Integrator Series: Large filesIntegrator Series: Large files
Integrator Series: Large files
 
Python Objects
Python ObjectsPython Objects
Python Objects
 
Python Evolution
Python EvolutionPython Evolution
Python Evolution
 
GNU Screen
GNU ScreenGNU Screen
GNU Screen
 
New in Plone 3.3. What to expect from Plone 4
New in Plone 3.3. What to expect from Plone 4New in Plone 3.3. What to expect from Plone 4
New in Plone 3.3. What to expect from Plone 4
 
Overview of Plone-based websites for mobile devices.
Overview of Plone-based websites for mobile devices.Overview of Plone-based websites for mobile devices.
Overview of Plone-based websites for mobile devices.
 
Ecommerce Solutions for Plone
Ecommerce Solutions for PloneEcommerce Solutions for Plone
Ecommerce Solutions for Plone
 
Templating In Buildout
Templating In BuildoutTemplating In Buildout
Templating In Buildout
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Zope 3 at Google App Engine
Zope 3 at Google App EngineZope 3 at Google App Engine
Zope 3 at Google App Engine
 
Plone в урядових проектах
Plone в урядових проектахPlone в урядових проектах
Plone в урядових проектах
 
Використання системи Plone для створення університетських вебсайтів
Використання системи Plone для створення університетських вебсайтівВикористання системи Plone для створення університетських вебсайтів
Використання системи Plone для створення університетських вебсайтів
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

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)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Screen Player

  • 1. Screen Player Bogdan Klichuk © Quintagroup 2009
  • 2.
  • 4. Adapting to screen's logging system
  • 10.
  • 11.
  • 12. Demo
  • 13.
  • 14. sp.py
  • 15. sp.py sp.py is a Python utility, enabling you to access all the Screen Player's functionality rapidly Works with Python >= 2.5
  • 16. sp.py sp.py by itself does not provide and does not implement any functionality, instead it provides a set of tasks, each of which can handle different work arguments sp.py
  • 17. sp.py Screen Player provides multi-level config system. Any command line option for a specified task can be stored in config section, named after the task. Options at the level with higher priority override the same options at The level with lower priority. For example to set option -s STEP, --step=STEP for 'sp.py play': [play] step = 10 Levels priority order (ascending) Config system in Screen Player Execute task sp.py -с (--config) for any task
  • 18. Adapting to screen's logging system
  • 19.
  • 20. Writes it's own time stamps, tracking the changes to the size of the log file (needs the utility to be launched while logging)
  • 21. Screen Player can be adapted to the
  • 22. format of the screen's time stamp.
  • 23. Here's the example of default
  • 25.
  • 26. CSV
  • 29. Adapting to screen's logging system Track log file size and writing time stamps manually, sp.py track This command shows help for the task : To start tracking a file logfile.txt and producing stamps to logfile.txt.times , use this: To start tracking a file logfile.txt and producing stamps to custom stamps file, use this: Option --storage enables you to choose a type of the storage for the time-stamps: pickle, csv etc.
  • 30. Adapting to screen's logging system Splitting the log file with built-in stamps to separate time stamps storage and clean log data, sp.py split Let us split the log file logfile_dirty.txt with built-in stamps, produce the clean log to logfile_clean.txt and store time stamps In logfile_clean.txt.times (adjusted implicitly): If you need just to clean up the log file from the built-in time stamps, use flag – c . In this case time stamps won't be stored. Type of the time stamps storage can be set by a flag --storage
  • 31. Player in action Playback of the log file, having separate time-stamps and log files, sp.py play To start playing back a log file logfile.txt , when the time stamps storage is logfile.times, use this: -t option will let you set the time stamps storage explicitly. Start from the specified moment of time, defining a start point using a --jump(-j) option. A value has to be a screen player's ISO 8601 time stamp.
  • 32. Playback of the log file with built-in time-stamps Player in action Assume, that you have a large log file, produced by screen with “ logtstamp” option on, and you want to play it back easily, not having to worry about the separate time-stamps storage and “clean” log file. Use -d (--dirty) option:
  • 33. Player in action Screen player's ISO 8601 date/time format A basic format of the date/time in ISO 8601 is: Screen player offers optional ISO 8601 format, when any count of the parameter can be omitted and inherited from the default date/time. For example: In ' sp.py play' our stamp is based on a default stamp – first one from the time stamps storage, here we omitted the month, day, hour and Time zone – all this parameters will be inherited from the default stamp
  • 34. Adapting to screen's logging system Investigating the time line, sp.py tinfo Let us retrieve the information about the time line, using time stamps storage logfile.times. The command shows the start & end points, count of stamps, full duration of the time line: To write all the time stamps to a file as CSV values, use flag -- all :
  • 35. Player in action List of the shortcuts can be retrieved using this command: Controlling the playback. Player shortcuts To adjust the size of the step, made when jumping back/forward: --step <seconds> option
  • 37. Charts builder Screen player allows you to investigate the load and busyness of the 'screen' terminal in visual mode – drawing the statistics chart. This facility enables you to compare busyness of terminal in different periods of time, assess rise and falls in terminal activity, make conclusions.
  • 38. Charts builder Chart building functionality can be accessed by sp.py 'chart' task. Let us build a chart, showing the activity of the terminal, which was being logged. Let us save the image, produced to a file image.png, with size 800x100 Our image.png may look like this now:
  • 39. Charts builder Google charts sp.py chart functionality is based on Google Charts service from Google Inc. [4]
  • 41. Structure sp.py – Python executable module, uses “screenlog” Python package. A package encapsulates the Screen Player functionality. Consists of several modules. Inside of the Screen Player sp.py screenlog package Gathering tasks – modules with __task__ attribute player.py timeparser.py tracker.py splitter.py statchart.py util.py __init__.py
  • 42. “ screenlog” package logging system Structure . . . Level filter . . . Handlers logger “screenlog.module_N” logger “screenlog.module_3” logger “screenlog.module_2” logger “screenlog.module_1” logger “screenlog” screenlog module_1 module_2 module_3 module_N
  • 44. Code documentation Doctests Screen Player code is well documented, doctests are included in the code into the docstrings. Screen Player offers an uility to test all the modules of “screenlog” by once:
  • 45. Code documentation Epydoc Screen Player supports 'epydoc' documentation, it enables you to generate documentation in PDF or HTML format For example to generate HTML documentation for “screenlog” package, install Epydoc [5] and type:
  • 47.
  • 50. http://code.google.com/p/protobuf/ - Protocol Buffers project page
  • 51. http://code.google.com/apis/chart/ - Google Charts dev's guide
  • 52. http://epydoc.sourceforge.net/ - Epydoc project page