Feature #1823

Feature #44: Implement basic introspection support

Transmit start-time of processes in introspection messages

Added by J. Moringen about 10 years ago. Updated over 9 years ago.

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

100%

Category:Introspection
Target version:rsb-0.11

Description

This allows calculating the "uptime" of processes.

Update:
  • Protocol ✓
  • C++ ✓
  • Python ✓
  • Java ✓
  • Common Lisp ✓
  • Introspect tool (✓)

Associated revisions

Revision 874f54d1
Added by J. Moringen about 10 years ago

Added field start_time in proto/rsb/protocol/operatingsystem/Process.proto

refs #1823

  • proto/rsb/protocol/operatingsystem/Process.proto (Process.start_time):
    new field; stores start time of process in microseconds since UNIX
    epoch

Revision d081ce32
Added by J. Moringen over 9 years ago

Support for process start time in src/rsb/introspection/*.{h,cpp}

refs #1823

  • src/rsb/introspection/Model.{h,cpp} (ProcessInfo::ProcessInfo): added
    start time parameter
    (ProcessInfo::getStartTime): new member function; getter for start
    time
  • src/rsb/introspection/IntrospectionSender.cpp
    (IntrospectionSender::sendHello): set start_time field of Process
    message

Revision 05efe64c
Added by J. Moringen over 9 years ago

Support for process start time in src/rsb/introspection/*.{h,cpp}

refs #1823

  • src/rsb/introspection/Model.{h,cpp} (ProcessInfo::ProcessInfo): added
    start time parameter
    (ProcessInfo::getStartTime): new member function; getter for start
    time
  • src/rsb/introspection/IntrospectionSender.cpp
    (IntrospectionSender::sendHello): set start_time field of Process
    message

Reviewed-by: Johannes Wienke <>

Revision 352375a0
Added by J. Moringen over 9 years ago

Support for gathering platform information in src/introspection/platform-*.lisp

refs #1740, refs #1823

New functions that use platform-specific mechanism to gain information
about the current process and local host.

  • src/introspection/platform-common.lisp: new file; contains common
    helper functions and non-platform-specific functions
  • src/introspection/platform-generic.lisp: new file; contains a generic
    fallback implementation of the platform information functions
  • src/introspection/platform-sbcl-linux.lisp: new file; contains an
    implementation of the platform information functions for SBCL on Linux
  • src/introspection/platform-sbcl-darwin.lisp: new file; contains an
    implementation of the platform information functions for SBCL on
    Darwin
  • src/introspection/platform-sbcl-win32.lisp: new file; contains an
    implementation of the platform information functions for SBCL on Win32
  • src/introspection/package.lisp (package rsb.introspection): added used
    packages let-plus and more-conditions
  • test/introspection/package.lisp (package rsb.introspection.test):
    added imported-from rsb.introspection symbols current-process-id,
    current-program-name-and-commandline-arguments,
    current-process-start-time and current-host-id
  • test/introspection/platform.lisp: new file; contains basic tests for
    platform information functionality
  • rsb-introspection.asd (system rsb-introspection): added system
    dependency on uiop; added files
    src/introspection/platform-{common,generic,sbcl-linux,sbcl-darwin,
    sbcl-win32}.lisp
    (system rsb-introspection-test): added file
    test/introspection/platform.lisp

Revision 49174376
Added by J. Moringen over 9 years ago

Added support for process start time in rsb/introspection/__init__.py

refs #1823

Current implementation is Linux-only.

  • rsb/introspection/__init__.py (processStartTime): new variable;
    caches value of processStartTime
    (processStartTime): new function; determine start time of the current
    process
    (ProcessInfo.__init
    ): set new startTime attribute; default to
    calling processStartTime

Revision 8abc8f82
Added by J. Wienke over 9 years ago

Implement introspection support

Implements introspection support for java.

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

Revision e9c8bd6a
Added by J. Moringen over 9 years ago

Implemented %current-process-start-time in src/introspection/platform-sbcl-darwin.lisp

refs #1823

  • src/introspection/platform-sbcl-darwin.lisp
    (define-alien-type struct kproc): new alien structure; used by
    "sysctl" syscall to return information about a process
    (%current-process-start-time): call "sysctl" for the "kern.proc.pid"
    mib and extract the start time

Revision 9042517c
Added by J. Moringen over 9 years ago

Implemented %current-process-start-time in src/introspection/platform-sbcl-darwin.lisp

refs #1823

  • src/introspection/platform-sbcl-darwin.lisp
    (define-alien-type struct kproc): new alien structure; used by
    "sysctl" syscall to return information about a process
    (%current-process-start-time): call "sysctl" for the "kern.proc.pid"
    mib and extract the start time

History

#1 Updated by J. Moringen about 10 years ago

  • Description updated (diff)

#2 Updated by J. Moringen about 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 60

#3 Updated by J. Moringen about 10 years ago

  • Description updated (diff)

#4 Updated by J. Moringen about 10 years ago

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

#5 Updated by J. Moringen over 9 years ago

  • Description updated (diff)

#6 Updated by S. Wrede over 9 years ago

  • Description updated (diff)
  • Status changed from In Progress to Feedback
  • % Done changed from 80 to 100

#7 Updated by J. Wienke over 9 years ago

  • Status changed from Feedback to Resolved

Since all implementations do this, this can probably be closed.

Also available in: Atom PDF