KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#claude-code
#codex
#cli
#developer-tools
#react
#windows
gohai
★ 103
Open GitHub ↗
System information collector
Download README (.md)
Explore Similar Repositories
Sherlock
:
Sherlock reports any crash that occurs in your application
romulus
:
A kubernetes ingress controller
CoreAudio
:
Windows CoreAudio wrapper for .NET
diamondb
:
[WIP] DiamonDB: Rebuild of time series database on AWS.
pathfinding
:
Java pathfinding framework.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
gohai
?
Download (.md)
# Gohai [](http://kentaro.mit-license.org/) Gohai is a tool which collects an inventory of system information. It aims to implement some parts of features from [facter](https://github.com/puppetlabs/facter) and [ohai](https://github.com/opscode/ohai). It's forked from Kentaro Kuribayashi's [verity](https://github.com/kentaro/verity). ## :warning: Gohai now lives in the repository of the [datadog-agent](https://github.com/DataDog/datadog-agent), under the `/pkg/gohai` directory, as an independent module :warning: Bug reports and feature requests should be addressed to the new parent repository ([datadog-agent](https://github.com/DataDog/datadog-agent)). In order to update to the most recent version of Gohai, you have to replace `github.com/DataDog/gohai` with `github.com/DataDog/datadog-agent/pkg/gohai` in your `go.mod` and your imports. Note that the API was changed so verify that the API calls that you are using did not change in the new destination. This repository will likely be archived soon. ## Usage Gohai will build and install with `go get`. We require at least Go 1.17. ```sh go get github.com/DataDog/gohai ``` Running it will dump json formatted output: ```sh $ gohai | jq . { "cpu": { "cpu_cores": "2", "family": "6", "mhz": "2600", "model": "58", "model_name": "Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz", "stepping": "9", "vendor_id": "GenuineIntel" }, "filesystem": [ { "kb_size": "244277768", "mounted_on": "/", "name": "/dev/disk0s2" } ], "memory": { "swap_total": "4096.00M", "total": "8589934592" }, "network": { "ipaddress": "192.168.1.6", "ipaddressv6": "fe80::5626:96ff:fed3:5811", "macaddress": "54:26:96:d3:58:11" }, "platform": { "GOOARCH": "amd64", "GOOS": "darwin", "goV": "1.2.1", "hostname": "new-host.home", "kernel_name": "Darwin", "kernel_release": "12.5.0", "kernel_version": "Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64", "machine": "x86_64", "os": "Darwin", "processor": "i386", "pythonV": "2.7.2" } } ``` Pipe it through eg. `jq` or `python -m json.tool` for pretty output. ## How to build Just run `go build`! ## Build with version info To build Gohai with version information, use `make.go`: ```sh go run make.go ``` It will build gohai using the `go build` command, with the version info passed through `-ldflags`. ## Updating CPU Information Some information about CPUs is drawn from the source of the `util-linux` utility `lscpu`. To update this information, such as when new processors are released, run ``` python cpu/from-lscpu-arm.py /path/to/lscpu-arm.c > cpu/lscpu_linux_arm64.go ``` ## See Also * [facter](https://github.com/puppetlabs/facter) * [ohai](https://github.com/opscode/ohai) ## Author * [Kentaro Kuribayashi](http://kentarok.org/) ## License * MIT http://kentaro.mit-license.org/