The ‘playlog’ utility
- Topics:
- Dynamic Media Classic,SDK/API
CREATED FOR:
- Developer
- User
The playlog utility can be used to pre-generate contents for the HTTP response cache.
The existing Image Serving HTTP response cache is not guaranteed usable after a major version upgrade (when the first or second digit of the version number changed). If the server is to be taken live into full-load conditions after the upgrade, the server may be overloaded handing the first few hours of cache miss requests until the cache is reasonably populated and the cache hit rate increases.
To avoid this initial load spike, the playlog
utility can be used to pre-generate contents for the HTTP response cache. playlog
extracts HTTP requests from an existing access log file and sends it to the server to generate cache entries. For typical usage scenarios, it is sufficient to play back a single access log file containing a full-day’s worth of traffic.
In addition to priming the HTTP response cache after upgrade installs, the utility is also used to pre-generate cache contents when adding a new server to a load-balanced environment; simply play back a recent log file from one of the other servers.
playlog
can be configured to support most access log files generated by prior versions of Image Serving.
Usage
playlog *logFile* [-n *col*] [-s *separator*] [-m *marker*] [-p *prefix*] [-x *suffix*] [-v] [-h] [-r *request method*] [-o *position*]
-p prefix |
Root URL to prepend to the requests extracted from the log file. Default: http://localhost:8080/is ) |
-n col |
Field (column) number which contains the request in the log record; 1-based. Default: 16 |
-s separator |
Field separator; regular expression pattern. Default: [ ]+ ) |
-m marker |
Request marker; identifies requests in the log file which should be played back; regular expression pattern. Default: Request: ) |
-x suffix |
Suffix to append to the request extracted from the log file; can be used to separate played-back requests from live requests in the log files; a '?' or '&' separator is inserted automatically; suffix can reference any log field by position within curly braces, default corresponds to md5 signature field. Default: playlog={25} ) |
-v | Verbose mode, prints the generated request URLs to stdout . |
-h | Print a synopsis to stdout . |
-r |
request-method - HTTP request method to use ( get|post|head|smart ). Default: smart ) |
-o |
request-method-pos - pos in log file to grab original method from. Default: 15 |
For Windows, the filename is playlog.bat and on Linux it is playlog.sh.
Examples
The following example plays back all requests from an access log file created by Image Serving on Linux:
> cd /usr/local/Scene7/ImageServing/logs
> ../bin/playlog.sh access-2007-01-01.log -n 18 -s ' ' -m . -p http://localhost:8080
The following command plays back all requests found in a trace log file created by Image Serving on Windows:
> "\Program Files\Scene7\ImageServing\bin\playlog.bat" d:\logs/access-2006-09-01.log
Experience Manager
- Dynamic Media Image Serving and Image Rendering API Home
- About this release
- System requirements and prerequisites
- Disk space requirements and recommendations
- Restrictions and known issues
- Technical support
- Document conventions
- Installation
- Image Serving API
- Image Serving API
- Intended audience
- Image Serving components
- Configuration and administration
- Serving static (non-image) contents
- Troubleshooting
- HTTP protocol reference
- HTTP protocol reference overview
- HTTP protocol introduction
- Syntax and features
- Syntax and features
- Image Serving HTTP protocol basic syntax
- Image Serving HTTP protocol command
- Layering
- Layer effects
- Request nesting and embedding
- Substitution variables
- Command macros
- Image catalogs
- Object ID translation
- Text string localization
- SVG support
- Request preprocessing
- Image maps
- Image Serving color management
- Image Serving HTTP encoding
- Request locking
- Request obfuscation
- Watermarks
- Serving static (non-image) content
- Media set requests
- Text formatting
- Data types
- Command reference
- Command reference overview
- align
- anchor
- bfc
- bgc
- bgColor
- blendMode
- cache
- clipPath
- clipXPath
- color
- crop
- cropPathE
- defaultImage
- dpr
- effect
- effectMask
- extend
- fit
- flip
- fmt
- hei
- hide
- icc
- iccEmbed
- id
- imageSet
- jpegSize
- layer
- locale
- map
- mask
- maskUse
- network
- op_blur
- op_brightness
- op_colorbalance
- op_colorize
- op_contrast
- op_grow
- op_growMask
- op_growMaskR
- op_hue
- op_invert
- op_noise
- op_saturation
- op_sharpen
- op_usm
- op_usmR
- opac
- origin
- pathAttr
- pathEmbed
- perspective
- pos
- printRes
- pscan
- qlt
- quantize
- rect
- req
- res
- resMode
- rgn
- rotate
- scale
- scl
- size
- src
- template
- text
- textAngle
- textAttr
- textFlowPath
- textFlowXPath
- textPath
- textPs
- type
- wid
- xmpEmbed
- Response data
- Server behavior
- Templates
- FXG server protocol reference
- Image catalog reference
- Attributes
- Attributes reference
- AllowDirectAccess
- AllowDirectUrls
- ApplyEffectMask
- AudioBitRate
- Bfc
- BkgColor
- CacheValidationPolicy
- ClientAddressFilter
- CatalogFile
- DefaultExpiration
- DefaultExt
- DefaultFont
- DefaultImage
- DefaultImageMode
- DefaultLocale
- DefaultPix
- DefaultThumbPix
- DigimarcId
- DigimarcInfo
- ErrorImage
- ErrorDetail
- Expiration
- FontMapFile
- FullMatch
- HttpAppleStreamingContext
- HttpFlashStreamingContext
- IccBlackPointCompensation
- IccDither
- IccProfileCmyk
- IccProfileGray
- IccProfileMapFile
- IccProfileRgb
- IccProfileSrcCmyk
- IccProfileSrcGray
- IccProfileSrcRgb
- IccRenderIntent
- JpegQuality
- LocaleMap
- LocaleStrMap
- MacroFile
- MaxPix
- NonImgExpiration
- PublishInfo
- PrintResolution
- RequestLock
- RequestObfuscation
- ResMode
- Resolution
- RootId
- RootPath
- RootUrl
- RuleSetFile
- SavePath
- StaticContentCatalogFile
- StaticContentRootPath
- SvgCatalogFile
- SynthesizeFontStyles
- ThumbBkgColor
- ThumbHorizAlign
- ThumbRes
- ThumbType
- ThumbVertAlign
- TimeStamp
- TotalStreamBitRate
- TrustedDomains
- UseLastModified
- VideoBitRate
- VideoSize
- Watermark
- Image/SVG data reference
- Macro definition
- Font map
- ICC profile map reference
- Rule set reference
- Image server proxy
- Responsive Static Image Library
- Image Rendering API
- Image Rendering API
- Configuration
- Server administration
- Server administration
- Server administration preface
- Server administration overview
- Configuring and managing the server
- Configuration settings reference
- HTTP protocol reference
- HTTP protocol reference
- Introduction
- HTTP protocol syntax and features
- HTTP protocol syntax and features
- Image Rendering HTTP protocol basic syntax
- Image Rendering HTTP protocol command overview
- Vignettes
- Materials
- Advanced Render effects
- Request nesting and embedding
- Material catalogs
- Request pre-processing *
- Custom variables
- Command macros *
- Image Rendering color management *
- Color values
- Image Rendering HTTP encoding
- HTTP protocol command reference
- HTTP protocol response data
- Material catalog
- Material catalog
- Introduction
- Material catalog overview
- Attributes reference
- Attributes reference
- AllowDirectURLs
- CacheValidationPolicy
- CatalogFile
- ClientAddressFilter
- DefaultPix
- ErrorDetail
- ErrorImage
- Expiration
- Format
- IccBlackPointCompensation
- IccDither
- IccProfileCmyk
- IccProfileGray
- IccProfileMapFile
- IccProfileRgb
- IccProfileSrcCmyk
- IccProfileSrcGray
- IccProfileSrcRgb
- IccRenderIntent
- JpegQuality
- MacroFile
- MaxPix
- OnFailObj
- OnFailSel
- RenderSettings
- ResMode
- Resolution
- RootId
- RootPath *
- RootUrl *
- RuleSetFile
- Sharp
- Sharpen
- ShowOverlapObjs
- TiffEncoding
- TimeStamp
- TrustedDomains *
- UseLastModified
- VignetteMapFile
- Material data reference
- Vignette map reference
- Macro definition reference
- ICC profile map reference
- Rule set reference
- Utilities