Feature #1823
Feature #44: Implement basic introspection support
Transmit start-time of processes in introspection messages
Status: | Resolved | Start date: | 03/25/2014 | |
---|---|---|---|---|
Priority: | Normal | Due 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
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
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
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 <jwienke@techfak.uni-bielefeld.de>
Support for gathering platform information in src/introspection/platform-*.lisp
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
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
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
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.