The idcp-dist-info tool

Original documentation

The script is part of bii_scripts bii_scripts and is documented here:

idcp-dist-info

Examples

Simple report for a single insertion device

Run:

idcp-dist-info ue112

Output:

name date                   version
idcp13:
     2019-09-23 09:54:15    2019-09-23T09:54:07
     2019-09-23 10:56:12    2019-09-23T10:56:05
     2019-09-30 11:49:59    2019-09-23T10:56:05
     2019-10-21 11:35:58    2019-10-21T10:39:30
     2020-01-13 10:29:43    2020-01-06T11:47:56
     2020-01-13 11:43:06    2020-01-13T11:42:54
     2020-09-28 10:27:09    2020-09-28T10:26:55
     2020-09-28 11:27:57    2020-09-28T11:27:48
     2020-10-05 09:54:50    2020-10-05T09:54:37
*    2020-11-16 11:24:47    2020-11-16T11:24:30

These are the meanings of the columns of this table:

name

This is the name of the program that controls the insertion device. It is “idcp[nn]” where “[nn]” is in many cases the name of the segment where the insertion device is located. For a complete list run the command iddb. What is called “name” here, is column “prefix” in the output of iddb.

date

This is the date the version of the software was activated. The IOC must have been rebooted after activation in order to actually load this version.

version

This is the name of the software version. This is always the ISO 8601 form of the date the software was created.

The “*” marks the active version, the version that is loaded when the IOC is rebooted.

Get fallback information for an insertion device

Sometimes you want to go back one or more software versions since the current software version of an insertion device contains a bug. This command shows you the last 10 versions that were used for at least a day for a given insertion device:

idcp-dist-info --id [ID] --filter-lifetime-bigger=1

“[ID]” must be a name identifying the insertion device. Run:

iddb list name devicename prefix -a idcp

for a list of value insertion device names.

Show all active software versions for all insertion devices

This shows the names of the insertion device control program, and the software version:

idcp-dist-info --ids --active -b
version                  names
2020-09-04T09:06:12      idcp10 idcp11 idcp110 idcp12 idcp15 idcp3 idcp5 idcp6 idcp7 idcp8 idcp9
2020-11-02T11:33:52      idcp120
2020-11-16T11:24:30      idcp13

You can also display the short insertion device names instead of the “idcpNN” prefixes by adding option “–idnames”:

idcp-dist-info --ids --active -b --idnames
version                  names
2020-09-04T09:06:12      UE46 UE56/1 U139 UE48 U49/2 U125/2 UE56/2 U41 U49/1 UE49 UE52
2020-11-02T11:33:52      U17
2020-11-16T11:24:30      UE112

Show the 5 most recently used software versions for all insertion devices

Run this command:

idcp-dist-info --ids --last 5

Show the 5 most recently used software versions for a single insertion device

Specify the insertion device by it’s name:

idcp-dist-info --id UE56/2 --last 5

Report ordered by version names

Format of the report

Here is an example on how a report looks like:

ver. date                   name(s)
2011-08-24T11:04:25:
     2011-08-24 11:05:33    idcp7
     2011-08-24 15:38:34    idcp7 idcp9
     2011-08-25 09:24:53    idcp7
     2011-11-28 11:14:05
     2011-11-28 12:06:13    idcp7

2011-08-25T11:10:22:
     2011-08-25 11:16:15    idcp9
     2011-08-26 11:28:46

These are the meanings of the columns of this table:

ver.

name of the version (it’s creation date)

date

the date the version was activated or deactivated for one or more insertion devices

name(s)

the set of all insertion devices (the program names) that had this version of the software active from the given date on. If this list is empty, this software version wasn’t active on any insertion device from that date on.

Show all versions ordered by version names

The following command lists all versions ordered by version names but only for versions that were activated for more than one day. This is done in order to skip test versions of the software that were only in use for some minutes or hours:

idcp-dist-info --ids --versions --filter-lifetime-bigger=1

Report versions that are active on at least one insertion device

The format is the same as for the report in the previous section:

idcp-dist-info --ids --versions --filter-active

Show which !IOCs use or used a specific version

Run this command:

idcp-dist-info --ids -v --filter-versions 2010-12-13T11:03:45

Report with additional information for a software version

Format of the report

This is an example of the output:

VERSION: 2011-12-05T10:18:09
ACTION: added
FROM: pfeiffer@aragon.acc.bessy.de
BRANCH: mars19
TAG: mars19 2011-12-05 1
LOG: new major build of mars19 all mars19 IDs should sooner or later boot this version

In this report, each field name is the string from the beginning of the line to the first colon. The text after the colon is the content of the field. These are the known fields:

VERSION

name of the version (it’s creation date)

ACTION

the action taken, may be “added” or “deleted”.

FROM

the name of the person who took the action, an e-mail address.

BRANCH

the name of the BRANCH, this is optional. Currently we have here “mars19” or “mars20” as a value.

TAG

This is an arbitrary string that may describe the version. You usually can ignore this.

LOG

This is an optional short log message. This may be a useful very short description of the version.

Example

Here is an example of a command:

idcp-dist-info --version-info 2011-12-05T10:18:09

Report on version lifetimes

Run this command:

idcp-dist-info --ids -l --filter-active

Format of the report

This is an example of the output:

ver. activated              deactivated         lifetime
2010-11-01T10:05:37:
     2010-11-01 10:06:55    NOW
                                                   149.2
2010-11-16T13:25:07:
     2010-11-16 13:26:03    NOW
                                                   134.1
2010-12-13T11:03:45:
     2010-12-13 11:03:59    NOW
                                                   107.2
2011-02-28T10:05:12:
     2011-02-28 10:07:07    2011-03-07 09:54:59
     2011-03-07 11:03:17    NOW
                                                    30.2
2011-03-28T12:15:44:
     2011-03-28 12:16:39    NOW
                                                     2.1

These are the meanings of the columns of this table:

ver.

name of the version (it’s creation date)

activated

the date the version was activated for one or more than one insertion devices

deactivated

the date the version was deactivated for one or more than one insertion devices

lifetime

The time in days and fractions of days the version was active on at least one IOC.

Report IOC boot times

Format of the report

This is an example of the output:

name            version              activated            booted               days running  comment
idcp10          2011-09-26T11:03:02  2011-09-26T11:03:13  2011-09-26T10:05:59          72.2  IOC doesn't run with active version (for 72.2 days)
idcp11          2011-06-24T13:44:12  2011-06-24T13:45:55  2011-08-15T10:52:22         114.2

These are the meanings of the columns of the table:

name

This is the name of the program that controls the insertion device. It is “idcp[nn]” where “[nn]” is the name of the segment where the insertion device is located. Note that differing from this simple rule, the program name for the U139 is “idcp110”.

version

This is the name of the software version. This is always the ISO 8601 form of the date the software was created.

activated

This is the date the version of the software was activated.

booted

This is the time the IOC was booted the last time.

days running

This is the number of days the IOC has been running with the current software version.

comment

These are comments of the program. If the comment is “IOC doesn’t run with active version” the IOC wasn’t booted after the current version was activated. This is usually an error.