Re: NEW: sysutils/mdprint (now with tarball attached)

2020-03-20 Thread Jeremie Courreges-Anglas
On Fri, Mar 20 2020, Klemens Nanni  wrote:
> Using converters/rpm2cpio;  I know the tool but it didn't occur to me
> that we'd have it packaged (so I didn't even look) - thanks jca for the
> hint :)
>
>   Information for inst:mdprint-1.3
>
>   Comment:
>   print sun4v machine descriptions
>
>   Description:
>   mdprint prints the contents of the provided binary sun4v MD file.
>
>   If no file is provided, the "guest MD" is read from the device file 
> "/dev/mdesc"
>   which is expected to be present on all sun4v guest domains.
>
>   If no file is provided and the -P/--PRI option is used, the PRI
>   (physical resource inventory) MD is read from the device file
>   "/devices/pseudo/ds_pri@0:ds_pri" (Solaris only).
>
>   The complete PRI is only available on the "primary" domain.
>
>   Maintainer: Klemens Nanni 
>
> OK?

ok jca@

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: NEW: sysutils/mdprint (now with tarball attached)

2020-03-20 Thread Klemens Nanni
Using converters/rpm2cpio;  I know the tool but it didn't occur to me
that we'd have it packaged (so I didn't even look) - thanks jca for the
hint :)

Information for inst:mdprint-1.3

Comment:
print sun4v machine descriptions

Description:
mdprint prints the contents of the provided binary sun4v MD file.

If no file is provided, the "guest MD" is read from the device file 
"/dev/mdesc"
which is expected to be present on all sun4v guest domains.

If no file is provided and the -P/--PRI option is used, the PRI
(physical resource inventory) MD is read from the device file
"/devices/pseudo/ds_pri@0:ds_pri" (Solaris only).

The complete PRI is only available on the "primary" domain.

Maintainer: Klemens Nanni 

OK?


mdprint.tgz
Description: Binary data


Re: NEW: sysutils/mdprint (now with tarball attached)

2020-03-15 Thread Klemens Nanni
Sorry for the noise, here's a new tarball with an updated patch, nothing
else is changed:

Ensure integer typed results from integer division with the floordiv 
operator
when using Python 3.  `type(int(1)/int(1))' yields "" and
"" in Python 2 and 3 respectively.

Decode ARC node names and string property values as UTF-8 to preserve 
the output
format and fix --grep when using Python 3, e.g. print/use "value" 
instead of
"b'value'".  Python 3 uses type "" and does not decode
automatically, Python 2 uses "" already for everything.

Index: tools/mdprint/mdprint.py
...


For example, show only the root node of guest 1:

$ mdprint -g root.pri-version ./guest1.md
mdprint 1.3
Input file
"/tmp/obsd-ams/guest1.md"
Limiting output to
root . { * }
root (node 0x0) {
content-version = "1.0"
pri-version = "1.0"
reset-reason = 0x0 /* 0 */
fwd --> channel-endpoints (node 0x245)
fwd --> cpus (node 0x14)
fwd --> domain-services (node 0x23c)
fwd --> ioaliases (node 0x45)
fwd --> memory (node 0x10)
fwd --> openboot (node 0x34)
fwd --> phys_io (node 0x1f)
fwd --> platform (node 0x22)
fwd --> power-management (node 0x4e)
fwd --> variables (node 0x2c4)
fwd --> virtual-devices (node 0x38)
}

Without mdprint header, show the PRI version only but in parsable form:

$ mdprint -q -p -g root.pri-version ./guest1.md
root|0x0|pri-version="1.0"

HTML output works alike.

Feedback? OK?


mdprint.tgz
Description: Binary data


NEW: sysutils/mdprint (now with tarball attached)

2020-03-15 Thread Klemens Nanni
Here's a helpful tool for logical domain related hacking on sparc64;
I've used it to verify *.md files generated by ldomctl(8) as well as to
inspect the PRI of my machines for example.

It might also be helpful for users of logical guest domains who want to
inspect their machine description through the /dev/mdesc file.

mdprint is a Python 2 script and part of the ldomsmanager sources, which
are available as SRC RPM from Oracle Linux's YUM repository.  Despite
multiple references and mentioning of these programs, their upstream
package is the only source I could find.

post-extract basically does what rpm2cpio(1) would do on linux.

do-build uses Python 3's 2to3 tool to ditch Python 2;  with a tiny patch
the mdprint tool is fully usable for me on both sparc64 and amd64 to
display my machine descriptions in a human readable form.

DESCR is taken from mdprint's usage, I only added line breaks and the
"(Solaris only)" to reflect that automatic PRI reading does not work on
OpenBSD.

Feedback? OK?


Information for inst:mdprint-1.3

Comment:
print sun4v machine descriptions

Description:
mdprint prints the contents of the provided binary sun4v MD file.

If no file is provided, the "guest MD" is read from the device file 
"/dev/mdesc"
which is expected to be present on all sun4v guest domains.

If no file is provided and the -P/--PRI option is used, the PRI
(physical resource inventory) MD is read from the device file
"/devices/pseudo/ds_pri@0:ds_pri" (Solaris only).

The complete PRI is only available on the "primary" domain.

Maintainer: Klemens Nanni 


mdprint.tgz
Description: Binary data


NEW: sysutils/mdprint

2020-03-15 Thread Klemens Nanni
Here's a helpful tool for logical domain related hacking on sparc64;
I've used it to verify *.md files generated by ldomctl(8) as well as to
inspect the PRI of my machines for example.

It might also be helpful for users of logical guest domains who want to
inspect their machine description through the /dev/mdesc file.

mdprint is a Python 2 script and part of the ldomsmanager sources, which
are available as SRC RPM from Oracle Linux's YUM repository.  Despite
multiple references and mentioning of these programs, their upstream
package is the only source I could find.

post-extract basically does what rpm2cpio(1) would do on linux.

do-build uses Python 3's 2to3 tool to ditch Python 2;  with a tiny patch
the mdprint tool is fully usable for me on both sparc64 and amd64 to
display my machine descriptions in a human readable form.

DESCR is taken from mdprint's usage, I only added line breaks and the
"(Solaris only)" to reflect that automatic PRI reading does not work on
OpenBSD.

Feedback? OK?


Information for inst:mdprint-1.3

Comment:
print sun4v machine descriptions

Description:
mdprint prints the contents of the provided binary sun4v MD file.

If no file is provided, the "guest MD" is read from the device file 
"/dev/mdesc"
which is expected to be present on all sun4v guest domains.

If no file is provided and the -P/--PRI option is used, the PRI
(physical resource inventory) MD is read from the device file
"/devices/pseudo/ds_pri@0:ds_pri" (Solaris only).

The complete PRI is only available on the "primary" domain.

Maintainer: Klemens Nanni