Feature #1978

Feature #44: Implement basic introspection support

Include machine and (operating system) software types and versions in host information

Added by J. Moringen about 7 years ago. Updated almost 7 years ago.

Status:ResolvedStart date:09/03/2014
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:Introspection
Target version:rsb-0.11

Description

Proposed fields

Name Example
Machine type x86-64
Machine version Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz
Software type darwin
Software version 13.2.0

Tasks

  • Protocol ✓
  • C++
  • Python ✓
  • Java (✓)
  • Common Lisp ✓
  • Introspection tools (✓)

Associated revisions

Revision 2b91d45f
Added by J. Moringen almost 7 years ago

{machine,software}-{type-version} in proto/rsb/protocol/operatingsystem/Host.proto

refs #1978

  • proto/rsb/protocol/operatingsystem/Host.proto (Host::machine_type):
    new field; CPU architecture of the host
    (Host::machine_version): new field; CPU version string of the host
    (Host::software_type): new field; operating system type of the host
    (Host::software_version): new field; operating system version of the
    host

Revision 7e2726d0
Added by J. Moringen almost 7 years ago

Support {machine,software}-{type,version} in src/introspection/*.lisp

refs #1978

  • src/introspection/conversion.lisp
    (define-introspection-converter): (de)serialize {machine,software}-{type,version}
  • src/introspection/model.lisp (host-info::machine-type): new slot;
    stores machine type
    (host-info::machine-version): new slot; store machine version
    (host-info::software-type): new slot; stores software type
    (host-info::software-version): new slot; stores software version
    (print-items append host-info): print machine type and software type
    if available
    (current-host-info): add {machine,software}-{type,version} to
    constructed `host-info'
  • src/introspection/platform-common.lisp (current-machine-type): new
    function; return slightly adapted return value of `machine-type'
    (current-machine-version): similar for `machine-version'
    (current-software-type): similar for `software-type'
    (current-software-version): similar for `software-version'
  • src/introspection/remote-introspection.lisp
    (ensure-host string remote-introspection-database host-info): handle {machine,software}-{type,version} slots
  • src/introspection/package.lisp (package rsb.introspection): added
    exported symbols host-info-machine-type, host-info-machine-version,
    host-info-software-type and host-info-software-version
  • test/introspection/model.lisp
    (define-simple-model-class-tests host-info): added cases involving {machine,software}-{type,version}

Revision e54bb476
Added by J. Moringen almost 7 years ago

Added {machine,software}{Type,Version} in rsb/introspection/__init__.py

refs #1978

  • rsb/introspection/__init__.py (HostInfo.__init__): accept machineType,
    machineVersion, softwareType, softwareVersion parameters; add
    corresponding attributes
    (HostInfo.getMachineType): new method; return machine type
    (HostInfo.machineType): corresponding property
    (HostInfo.getMachineVersion): new method; return machine version
    (HostInfo.machineVersion): corresponding property
    (HostInfo.getSoftwareType): new method; return software type
    (HostInfo.softwareType): corresponding property
    (HostInfo.getSoftwareVersion): new method; return software version
    (HostInfo.softwareVersion): corresponding property
    (HostInfo.__str__): include machine type and software type
    (IntrospectionSender.sendHello): if available, include machine type
    machine version, software type and software version in event
  • test/introspectiontest.py (HostInfoTest.testConstructionDefaults):
    check machine type, software type and software version

Revision 66c34d08
Added by J. Moringen almost 7 years ago

Added missing generic functions host-info-* in src/introspection/protocol.lisp

refs #1978

Had been omitted in initial commit.

  • src/introspection/model.lisp (host-info::software-type): fixed typo in
    documentation string
  • src/introspection/protocol.lisp (host-info-machine-type): new generic
    function; return type of the machine
    (host-info-machine-version): similar
    (host-info-software-type): similar
    (host-info-software-version): similar

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

Revision 3abc57f7
Added by J. Moringen almost 7 years ago

Added machineType helper in rsb/introspection/__init__.py

refs #1978

  • rsb/introspection/__init__.py (machineType): new function; translate
    i686 -> x86
    (HostInfo.__init__): call machineType for machineType keyword
    parameter default value

Revision 5f61e36f
Added by J. Wienke almost 7 years ago

Use the platform module in rsb/introspection/__init__.py

refs #1978

Use the Python platform module to access host and platform details for
introspection more easily and also in a more portable fashion compared
to the uname parsing.

  • rsb/introspection/__init__.py (machineType): use platform module;
    normalize more machine types
    (HostInfo.__init__): use platform instead of os module

Signed-off-by: Jan Moringen <>

Revision b6487829
Added by J. Wienke almost 7 years ago

Determine script being executed in rsb/introspection/__init__.py

refs #1978

  • rsb/introspection/__init__.py (programName): new file; determine name
    of "entry point script" being executed, if there is one
    (ProcessInfo.__init__): use programName

Signed-off-by: Jan Moringen <>

Revision d615aee0
Added by J. Moringen almost 7 years ago

Added machine version support in rsb/introspection/__init__.py

refs #1978

  • rsb/introspection/__init__.py (machineVersion): new function; on
    Linux, extract machine version from /proc/cpuinfo
    (HostInfo): use machineVersion

Revision 114f9418
Added by J. Moringen almost 7 years ago

{machine,software}-{type,version} in src/rsb/intospection/*.{h,cpp}

refs #1978

  • src/rsb/introspection/Model.{h,cpp} (tryCurrentMachineType): new
    function; try calling RSC function for determining the machine type,
    fall back to empty string
    (tryCurrentMachineVersion): similar
    (tryCurrentSoftwareType): similar
    (tryCurrentSoftwareVersion): similar
    (HostInfo::getMachineType): new method; return the machine type
    (HostInfo::getMachineVersion): similar
    (HostInfo::getSoftwareType): similar
    (HostInfo::getSoftwareVersion): similar
  • src/rsb/introspection/IntrospectionSender.cpp
    (IntrospectionSender::sendHello): if available, include {machine,software}-{type,version} in Hello message

Revision aa7a3c9b
Added by J. Moringen almost 7 years ago

Normalization in OsUtilities.deriveOsFamilyName in src/rsb/util/os/OsUtilities.java

refs #1978

  • src/rsb/util/os/OsUtilities.java (OsUtilities.deriveOsFamilyName): new
    method; convert value to lower-case for more robust comparison;
    normalize designators of common operating systems as mandated by RSB
    introspection specification
    (OsUtilities.deriveOsFamily): call deriveOsFamilyName; adapted to
    changed return values of getOsName

Signed-off-by: Johannes Wienke <>

Revision fb9c7807
Added by J. Moringen almost 7 years ago

Normalization in OsUtilities.deriveMachineTypeName in src/rsb/util/os/OsUtilities.java

refs #1978

  • src/rsb/util/os/OsUtilities.java (OsUtilities.deriveMachineTypeName):
    convert value to lower-case for more robust comparison; normalize
    designators of common machine types as mandated by RSB introspection
    specification
    (OsUtilities.deriveMachineType): call deriveMachineTypeName; adapted
    to changed return values of deriveMachineTypeName

Signed-off-by: Johannes Wienke <>

Revision 766f7c6a
Added by J. Moringen almost 7 years ago

Strip domain part in current-host-info in src/introspection/model.lisp

refs #1978

  • src/introspection/model.lisp (current-host-info): remove domain part
    of potentially fully qualified hostname by truncating at first
    #\. character

Revision 6d68dce0
Added by J. Moringen almost 7 years ago

Strip domain part in current-host-info in src/introspection/model.lisp

refs #1978

  • src/introspection/model.lisp (current-host-info): remove domain part
    of potentially fully qualified hostname by truncating at first
    #\. character

Revision 612c9222
Added by J. Moringen over 6 years ago

{machine,software}-{type,version} printing in introspect/print.lisp

refs #1978

  • introspect/print.lisp (print-host-info-details-markup): print actual {machine,software}-{type,version} instead of mockup values

Revision bbac7e4d
Added by J. Moringen over 6 years ago

Backport: {machine,software}-{type,version} printing in introspect/print.lisp

refs #1978

  • introspect/print.lisp (print-host-info-details-markup): print actual {machine,software}-{type,version} instead of mockup values

History

#1 Updated by J. Moringen about 7 years ago

  • Category set to Introspection
  • Status changed from New to In Progress
  • Assignee set to J. Moringen
  • Target version set to rsb-0.11
  • % Done changed from 0 to 10

#2 Updated by J. Moringen almost 7 years ago

  • Description updated (diff)
  • % Done changed from 10 to 30

#3 Updated by J. Moringen almost 7 years ago

  • Description updated (diff)

#4 Updated by J. Moringen almost 7 years ago

  • Description updated (diff)
  • % Done changed from 30 to 70

#5 Updated by J. Moringen almost 7 years ago

  • Description updated (diff)
  • % Done changed from 70 to 80

#6 Updated by S. Wrede almost 7 years ago

  • Description updated (diff)
  • % Done changed from 80 to 90

Partially done for Java. Reported values are machine and software type.

#7 Updated by J. Moringen almost 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF