Project

General

Profile

Bug #11691

ptree could show service FMRIs

Added by John Levon about 1 year ago. Updated almost 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

http://smartos.org/bugview/OS-7934

It's annoyingly difficult to get information on what SMF service instance spawned what procs. svcs -p is partly there, but not really sufficient, as discussed in OS-7063.

We'll make two modifications to ptree:

- with ptree -c, print the FMRI as well as the contract ID
- add a new -s argument, that lets you specify an FMRI. All processes that match are included in the ptree.

We'll allow shortened forms of the FMRI. Note that we need to make a small kernel modification to put the FMRI in the nvlist even for CTD_FIXED for this to work.

History

#1

Updated by John Levon about 1 year ago

  • Description updated (diff)
#2

Updated by John Levon about 1 year ago

Tested ptree -c, and -s with various different SMF service strings, including these forms:

ptree -c
ptree -s network/ssh
ptree -s svc:/network/ssh
ptree -s network/ssh:foo
ptree -s network/ssh:default
ptree -s svc:/network/ssh:default
ptree -c -s ssh
ptree -z f2fb4120-dfe1-48eb-827b-f53052b2abe1 -s amon-agent

#3

Updated by Electric Monk almost 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit a2e92fdb91a6e5451ecb5488b74ee1e95a4bafd0

commit  a2e92fdb91a6e5451ecb5488b74ee1e95a4bafd0
Author: John Levon <john.levon@joyent.com>
Date:   2019-10-23T22:21:01.000Z

    11691 ptree could show service FMRIs
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Jason King <jason.king@joyent.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Peter Tribble <peter.tribble@gmail.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Also available in: Atom PDF