github.com/ubuntu/ubuntu-report@v1.7.4-0.20240410144652-96f37d845fac/README.md (about)

     1  # Ubuntu Report
     2  Report hardware and other collected metrics like installer or upgrade information.
     3  
     4  This information can't be used to identify a single machine and is presented before being sent to the server.
     5  
     6  [![Build & Tests Status](https://travis-ci.org/ubuntu/ubuntu-report.svg?branch=master)](https://travis-ci.org/ubuntu/ubuntu-report)
     7  [![codecov](https://codecov.io/gh/ubuntu/ubuntu-report/branch/master/graph/badge.svg)](https://codecov.io/gh/ubuntu/ubuntu-report)
     8  [![Go Report Card](https://goreportcard.com/badge/github.com/ubuntu/ubuntu-report)](https://goreportcard.com/report/github.com/ubuntu/ubuntu-report)
     9  
    10  APIS:
    11   * Go: [![Go API](https://godoc.org/github.com/ubuntu/ubuntu-report?status.svg)](https://godoc.org/github.com/ubuntu/ubuntu-report/pkg/sysmetrics)
    12   * C: [![C API](https://godoc.org/github.com/ubuntu/ubuntu-report?status.svg)](https://godoc.org/github.com/ubuntu/ubuntu-report/pkg/sysmetrics/C)
    13  
    14  
    15  ## About
    16  
    17  The tool will show you what is going to be reported and ask for your acknowledgement before uploading it. It will be mainly
    18  invoked by a GUI, but it provides also a command line tool.
    19  
    20  The Ubuntu welcome UI has a dedicated panel for this report collection and upload.
    21  
    22  The command line tool as well as the Go and C API have different modes:
    23  * Interactive mode (prompt displaying the data being sent and ask if sending or opting out)
    24  * Only show the report
    25  * Report automatically the collected data without prompting
    26  * Report that you have opted out of data collection
    27  
    28  By default, you can only report your data collection once per distribution version.
    29  
    30  To execute the interactive command line interface manually, just use `ubuntu-report`.
    31  
    32  ## Command line usage
    33  
    34  ### ubuntu-report
    35  
    36  Report metrics from your system, install and upgrades
    37  
    38  #### Synopsis
    39  
    40  This tool will collect and report metrics from current hardware, partition and session information.
    41  This information can't be used to identify a single machine and is presented before being sent to the server.
    42  
    43  ```
    44  ubuntu-report [flags]
    45  ```
    46  
    47  #### Options
    48  
    49  ```
    50    -f, --force           collect and send new report even if already reported
    51    -h, --help            help for ubuntu-report
    52    -u, --url string      server url to send report to. Leave empty for default. (default "https://metrics.ubuntu.com")
    53    -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output
    54  ```
    55  
    56  ### ubuntu-report interactive
    57  
    58  Interactive mode, alias to running this tool without any subcommands.
    59  
    60  ### ubuntu-report send
    61  
    62  Send or opt-out directly from metric reports without interactions
    63  
    64  #### Synopsis
    65  
    66  Send or opt-out directly from metric reports without interactions
    67  
    68  ```
    69  ubuntu-report send yes|no [flags]
    70  ```
    71  
    72  #### Options
    73  
    74  ```
    75    -h, --help         help for send
    76    -u, --url string   server url to send report to. Leave empty for default. (default "https://metrics.ubuntu.com")
    77  ```
    78  
    79  #### Options inherited from parent commands
    80  
    81  ```
    82    -f, --force           collect and send new report even if already reported
    83    -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output
    84  ```
    85  
    86  ### ubuntu-report service
    87  
    88  Try to send periodically previously unsent but collected data once network is avaiable
    89  
    90  #### Synopsis
    91  
    92  Try to send periodically previously unsent but collected data once network is avaiable
    93  
    94  ```
    95  ubuntu-report service [flags]
    96  ```
    97  
    98  #### Options
    99  
   100  ```
   101    -h, --help         help for service
   102    -u, --url string   server url to send report to. Leave empty for default. (default "https://metrics.ubuntu.com")
   103  ```
   104  
   105  #### Options inherited from parent commands
   106  
   107  ```
   108    -f, --force           collect and send new report even if already reported
   109    -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output
   110  ```
   111  
   112  ### ubuntu-report show
   113  
   114  Only collect and display metrics without sending
   115  
   116  #### Synopsis
   117  
   118  Only collect and display metrics without sending
   119  
   120  ```
   121  ubuntu-report show [flags]
   122  ```
   123  
   124  #### Options
   125  
   126  ```
   127    -h, --help   help for show
   128  ```
   129  
   130  #### Options inherited from parent commands
   131  
   132  ```
   133    -f, --force           collect and send new report even if already reported
   134    -v, --verbose count   issue INFO (-v) and DEBUG (-vv) output
   135  ```
   136  
   137  ## Service
   138  
   139  In case we can't report (due to limited network or other networking conditions) your report when you act on it,
   140  a little service will kick at login, and try to send the pending report data again. Note that it will exponentially
   141  back off.
   142  
   143  The service won't be active once the pending report is sent.
   144  
   145  ## APIS
   146  
   147  ### Go API
   148  
   149  The Go API is used by the command line, but can be embedded as well by 3rd parties. Doc reference is available at
   150  [![this link](https://godoc.org/github.com/ubuntu/ubuntu-report?status.svg)](https://godoc.org/github.com/ubuntu/ubuntu-report/pkg/sysmetrics).
   151  
   152  ### C API
   153  
   154  The C API is provided for embedding the library in C code. Doc reference is available at
   155  [![this link](https://godoc.org/github.com/ubuntu/ubuntu-report?status.svg)](https://godoc.org/github.com/ubuntu/ubuntu-report/pkg/sysmetrics/C).
   156  
   157  You can generate the shared library and headers by running `go generate`.
   158  
   159  ## Command line options
   160  
   161  You can regenerate previous README section, shell completion support and man pages by simply running `go generate`.
   162  
   163  ## Send data to server
   164  
   165  ### Example of data being sent if agreement is accepted
   166  
   167  The data are pretty printed here to be more readable.
   168  
   169  ```json
   170  {
   171    "Version": "18.04",
   172    "OEM": {
   173      "Vendor": "Vendor Name",
   174      "Product": "4287CTO"
   175    },
   176    "BIOS": {
   177      "Vendor": "Vendor Name",
   178      "Version": "8DET52WW (1.27)"
   179    },
   180    "CPU": {
   181      "OpMode": "32-bit, 64-bit",
   182      "CPUs": "8",
   183      "Threads": "2",
   184      "Cores": "4",
   185      "Sockets": "1",
   186      "Vendor": "Genuine",
   187      "Family": "6",
   188      "Model": "158",
   189      "Stepping": "10",
   190      "Name": "Intius Corus i5-8300H CPU @ 2.30GHz",
   191      "Virtualization": "VT-x"
   192    },
   193    "Arch": "amd64",
   194    "GPU": [
   195      {
   196        "Vendor": "8086",
   197        "Model": "0126"
   198      }
   199    ],
   200    "RAM": 8,
   201    "Disks": [
   202      240.1,
   203      500.1
   204    ],
   205    "Partitions": [
   206      229.2,
   207      479.7
   208    ],
   209    "Screens": [
   210      {
   211        "Size": "277mmx156mm",
   212        "Resolution": "1366x768",
   213        "Frequency": "60.02"
   214      },
   215      {
   216        "Resolution": "1920x1080",
   217        "Frequency": "60.00"
   218      }
   219    ],
   220    "Autologin": false,
   221    "LivePatch": true,
   222    "Session": {
   223      "DE": "ubuntu:GNOME",
   224      "Name": "ubuntu",
   225      "Type": "x11"
   226    },
   227    "Language": "fr_FR",
   228    "Timezone": "Europe/Paris",
   229    "Install": {
   230      "Media": "Ubuntu 18.04 LTS \"Bionic Beaver\" - Alpha amd64 (20180305)",
   231      "Type": "GTK",
   232      "PartitionMethod": "use_device",
   233      "DownloadUpdates": true,
   234      "Language": "fr",
   235      "Minimal": false,
   236      "RestrictedAddons": false,
   237      "Stages": {
   238        "0": "language",
   239        "3": "language",
   240        "10": "console_setup",
   241        "15": "prepare",
   242        "25": "partman",
   243        "27": "start_install",
   244        "37": "timezone",
   245        "49": "usersetup",
   246        "57": "user_done",
   247        "829": "done"
   248      }
   249    }
   250  }
   251  ```
   252  
   253  ### Data being sent if agreement is denied
   254  
   255  The data are pretty printed here to be more readable.
   256  
   257  ```json
   258  {
   259    "OptOut": true
   260  }
   261  ```