Feature #1869

Feature #44: Implement basic introspection support

Realize ProcessInfo and HostInfo Backend in Java

Added by S. Wrede over 7 years ago. Updated almost 7 years ago.

Status:ResolvedStart date:04/30/2014
Priority:NormalDue 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

Related to Robotics Service Bus - Feature #2122: Implement OS-specific Instantitation of Process and Host ... Resolved 12/04/2014

Associated revisions

Revision c6b8ec33
Added by S. Wrede almost 7 years ago

  • 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

Revision 87607069
Added by S. Wrede almost 7 years ago

  • 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

Revision 6296a4a7
Added by S. Wrede almost 7 years ago

  • 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

Revision 418c9921
Added by S. Wrede almost 7 years ago

  • 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

Revision 8676f361
Added by S. Wrede almost 7 years ago

  • 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

Revision 8abc8f82
Added by J. Wienke almost 7 years ago

Implement introspection support

Implements introspection support for java.

fixes #1742
fixes #1869
refs #1978
refs #1837
refs #1823

History

#1 Updated by J. Moringen about 7 years ago

  • Category changed from Java to Introspection

#2 Updated by S. Wrede almost 7 years ago

  • Description updated (diff)

#3 Updated by S. Wrede almost 7 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 almost 7 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 almost 7 years ago

  • Related to Feature #2122: Implement OS-specific Instantitation of Process and Host Info backends added

#6 Updated by S. Wrede almost 7 years ago

  • % Done changed from 50 to 70

Initial proposal for portable process info implementation available.

#7 Updated by S. Wrede almost 7 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 almost 7 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF