- 1 Product Description
- 1.1 Known Versions
- 2 Software Pattern Summary
- 3 Platforms Supported by the Pattern
- 4 Identification
- 4.1 Software Instance Triggers
- 4.2 Simple Identification Mappings
- 4.3 Software Instance type attributes
- 5 Versioning
- 5.1 Windows
- 5.1.1 Active Versioning Approach - Command Execution
- 5.1.2 Configuration File Parsing - Command Execution
- 5.2 Unix
- 6 Application Model Produced by Software Pattern
- 7 Testing
- 8 Information Sources
- Discover with BMC ADDM
-
This product can be discovered by any edition of BMC Atrium Discovery and Dependency Mapping. Download our free Community Edition to try it out, or see what else it can discover!
- What is this?
- This is a product information page, containing details of the information that BMC Atrium Discovery gathers about a product and how it is obtained.
- Product Name
- Lighttpd Web Server
- Publisher Page
- Category
- Release
- TKU 2009-Nov-1
- Reports & Attributes
- Publisher Link
- Open Source
Product Description
Lighttpd is a web server designed to be secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments.
Its low memory footprint (compared to other web servers), light CPU load and its speed goals make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from dynamic content. Lighttpd is free software/open source, and is distributed under the BSD license. Lighttpd runs on Linux and other Unix-like operating systems and Microsoft Windows (under Cygwin). Also under Windows, it can be controlled using the standalone program Lighty Tray.
Known Versions
- 1.0.2 - 3
- 1.1.0 - 10
- 1.2.0 - 8
- 1.3.0 - 16
- 1.4.0 - 20
Software Pattern Summary
| Product Component | OS Type | Versioning | Pattern Depth |
|---|---|---|---|
| Lighttpd | Unix | Active, Package Info | Instance based |
| Windows | Active, Configuration file | Instance based |
Platforms Supported by the Pattern
The pattern supports identification and versioning of Lighttpd webservers on all major platforms - Unix/Linux and Windows
Identification
Software Instance Triggers
| Trigger Node | Attribute | Condition | Argument | OS type |
|---|---|---|---|---|
| DiscoveredProcess | cmd | matches | regex '(?i)\blighttpd\.exe$' | Windows |
| regex '\blighttpd$' | Unix |
Simple Identification Mappings
The following components/processes are identified using the combination of pattern definitions and simple identity mappings
| Name | Command |
|---|---|
| Lighttpd Web Server | regex '(?i)\blighttpd\.exe$' |
| regex '\blighttpd$' |
Software Instance type attributes
The pattern in this module will set the following type attribute:
| Pattern Name | SI Type |
|---|---|
| Lighttpd | Lighttpd Web Server |
Versioning
Version information for this product can be gathered using several methods, depending on the type of OS on which Lighttpd is running. If the version is retrieved it is used to populate "version" and "product_version" attributes of the Software Instance created.
Windows
Active Versioning Approach - Command Execution
The command execution versioning method on Windows involves executing the web server binary (trigger process) with the argument "-version", provided that we pattern has obtained the full path to the binary. The output is then parsed.
| Executed command | Regular expression to extract the version |
|---|---|
| | regex '(?i)lighttpd[/-](\d+\.\d+(?:\.\d+)*)' |
Configuration File Parsing - Command Execution
If the pattern does not obtain the version by executing the web server binary, the pattern attempts to locate the version in a configuration file in corresponding directory, the version usually is contained in parameter "server.tag"
This configuration files directory is typically located at the the level of the installation path for the web server, although the pattern can handle both absolute path as well as path relative to the installation path.
The path to the main configuration file can be retrieved by extracting the path specified by the '-f' command-line argument.
The following regular expressions are used to check if the path is absolute or relative to the installation directory.
| Regular expression | Arguments to search in |
|---|---|
| regex '(?i)-f\s+"?\w:' | process.args |
If path is absolute, the pattern retrieves the path to configuration files directory exactly from process arguments with the following regular expression:
| Regular expression | Arguments to search in |
|---|---|
| regex '(?i)-f\s+"?(\w+:\\.+?\\)\S+\.conf"?\s' | process.args |
If path to the configuration files is relative to the path to the web server, the pattern retrieve the full installation path for lighttpd with following regular expression:
| Regular expression | Arguments to search in |
|---|---|
| regex '(?i)(\w+:\\.+\\)lighttpd\.exe' | process.cmd |
Once the installation path is obtained (if available) the configuration files directory location is obtained using the following regular expression:
| Regular expression | Arguments to search in |
|---|---|
| regex '(?i)-f\s+"?(.+?\\)\S+\.conf"?' | process.args |
Once the file location is determined, the pattern executes the following command to parse all the configuration files for 'server.tag' attribute
| Command executed for parsing | 'cmd /c DIR | FINDSTR 'server.tag ' |
|---|
The result is parsed using the following regular expression:
| Regular expression to obtain version | regex '(?i)lighttpd[/-](\d+\.\d+(?:\.\d+)*)' |
|---|
Unix
Active Versioning Approach - Command Execution
The command execution versioning method on UNIX/Linux involves executing the web server binary (trigger process) with the argument "-version", provided that we pattern has obtained the full path to the binary. The output is then parsed.
| Executed command | Regular expression to extract the version |
|---|---|
| | regex '(?i)lighttpd[/-](\d+\.\d+(?:\.\d+)*)', raw '\1' |
Package Versioning
If versioning command fails to return any version information, the pattern checks the installed packages to extract version information from one of them.
Package Regular expressions used:
- '^lighttpd$'
NOTE: With regards to Lighttpd, qe can be certain that returning that only one version will be returnes, since we cannot install two lighttpd packages on the same machine.
We have found that all of the approaches provide a version number up to three levels of depth, i.e. x.x.x.
Application Model Produced by Software Pattern
Product Architecture
Lighttpd is a single-threaded, single-process, event-based, non-blocking-IO web server. While this is perfect for the performance it doesn't scale very well over CPUs. It has been shown that lighttpd scales mostly linearly on multicore, multi-processor boxes if you set the number of workers (server.max-worker) equal to two times the number of cores if you are CPU bound (for heavy rewrites and heavy proxying).
Lighttpd can therefore be started wither as a single lighttpd process, or optionally as an initial lighttod process which creates a number of children processes, as set in configuration file.
Software Pattern Model
The pattern is triggered on all processes that match the defined trigger condition.
A Software Instance, is created for each 'parent' instance.
If command-line arguments can be retrieved, the Software Instance created will create a key based on the command-line arguments, since separate instances of Lighttpd will have different command-line arguments (specifying different configuration files, ports, etc).
Where command-line arguments are not retrieved, a grouped Software Instance is created.
Testing
This pattern has been tested against Lighttpd running on multiple platforms (Unix/Linux and Windows) with different configurations
Information Sources
Webserver Wikipedia was used to gather information on the product and produced a lot of the product description. It was also used as the source for some of our known versions.
The official Lighttpd documentation page was used to identify some versioning techniques and some configuration specifications for installation and setting of Lighttpd Webserver.
Created by: [i.galytska@tideway.com] 09:26, 26 October 2008 (PST)
Reviewed by: Nikola Vukovljak 11:34, 24 October 2008 (GMT)
