Feature #1869
Feature #44: Implement basic introspection support
Realize ProcessInfo and HostInfo Backend in Java
Status: | Resolved | Start date: | 04/30/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | Introspection | |||
Target version: | rsb-0.11 |
Description
We need to consider a solution for getting the low-level or OS-specific platform properties required for introspection. Ideally, we should add a simple interface for getting this information as it will be platform-specific in any case:
ProcessInfo¶
- PID
- Program name (On POSIX systems, argv0)
- Command line arguments (On POSIX systems, does not include argv0, i.e. argv[1:])
- Start time of the process encoded as a timestamp in UTC in microseconds since UNIX epoch.
HostInfo¶
- HostID
- Hostname
Linux strategy for HostID:
* * contents of /etc/machine-id (excluding whitespace characters) * * contents of /var/lib/dbus/machine-id (excluding whitespace * characters) * * Return value of POSIX gethostid function in hexadecimal base * * Hostname
ProcessInfo
and HostInfo
should be realized as singletons as the information should only be collected once during factory initialization. The singleton may also instantiate the platform-specific implementation classes of these interfaces.
Related issues
Associated revisions
- added enum for machine types to HostInfo base
- added method to guess machine types in a portable way
- chanaged OSDetector's enum values to match introspection keys for OS
specification - added super calls to Portable and LinuxHostInfo classes to initialize
machine types and software type in HostInfo - added software version and machine type to serialization of Hello
message if not unknown - refs #1869
- initial implementation of PortableProcessInfo based on pure Java
functionality (has limitations, but at least provides pid, starttime,
java version and vm arguments) - tested on MacOS, should work on Windows on most JVM implementations
- refs #1869
- initial implementation of PortableHostInfo with pure java means
- extracted and renamed OSFamily enum from OSDetector
- use OSFamily enum in HostInfo classes
- adapted serialization in protocol handler
- refs #1869
- initial implementation of PortableProcessInfo based on pure Java
functionality (has limitations, but at least provides pid, starttime,
java version and vm arguments) - tested on MacOS, should work on Windows on most JVM implementations
- refs #1869
- initial implementation of PortableHostInfo with pure java means
- extracted and renamed OSFamily enum from OSDetector
- use OSFamily enum in HostInfo classes
- adapted serialization in protocol handler
- refs #1869
History
#1 Updated by J. Moringen almost 10 years ago
- Category changed from Java to Introspection
#2 Updated by S. Wrede over 9 years ago
- Description updated (diff)
#3 Updated by S. Wrede over 9 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
Reviewed, refactored and extended Suchit's PortableHostInfo class to a Linux-specific implementation of the HostInfo interface. Available in the wip branch. Still lacks more and automated testing but should be more robust now.
#4 Updated by S. Wrede over 9 years ago
- % Done changed from 30 to 50
Added and enabled a slightly refactored and extended implementation of the ProcFS-based ProcessInfo class written by Suchit. It works on my machine, but needs a further review.
#5 Updated by S. Wrede over 9 years ago
- Related to Feature #2122: Implement OS-specific Instantitation of Process and Host Info backends added
#6 Updated by S. Wrede over 9 years ago
- % Done changed from 50 to 70
Initial proposal for portable process info implementation available.
#7 Updated by S. Wrede over 9 years ago
- Status changed from In Progress to Feedback
- Assignee changed from S. Wrede to J. Wienke
- % Done changed from 70 to 100
Initial portable and linux implementation of process and host info available.
#8 Updated by J. Wienke over 9 years ago
- Status changed from Feedback to Resolved
Applied in changeset rsb-java|8abc8f82fb2108e09e62cc842b7ca472b10d23e4.