Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nexylan/go-ipmitool
Reposiroty mirror. Please open issues and MR on GitLab.
https://github.com/nexylan/go-ipmitool
Last synced: 25 days ago
JSON representation
Reposiroty mirror. Please open issues and MR on GitLab.
- Host: GitHub
- URL: https://github.com/nexylan/go-ipmitool
- Owner: nexylan
- Created: 2019-06-06T15:06:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T19:43:05.000Z (almost 5 years ago)
- Last Synced: 2024-11-08T09:39:29.374Z (3 months ago)
- Language: Go
- Homepage: https://gitlab.com/nexylan/go-ipmitool
- Size: 14.6 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# go-ipmitool
`ipmitool` binary wrapper.
## Installation
### Requirements
To use `go-ipmitool` on your project you must have the binary present on your system.
Below is the different way to install it depending on your Linux Distribution
| Package manager | Package Name |
| :-------------: | :----------: |
| APT | ipmitool |
| Yum | ipmitool |
| APK | ipmitool |## Example
### Code:
```go
package mainimport (
"log""github.com/nexylan/go-ipmitool"
)func main() {
log.Printf("We are about to restart IPMI with this awesome package !")server := go_ipmitool.IPMIServer{
"8.8.8.8",
"USER",
"PASSWORD",
}out, err := server.Query("chassis", "power", "reset")
if err != nil {
log.Fatalf("An error occured")
}log.Printf("result %s", out.String())
}
```### Result:
```bash
2019/06/07 10:17:43 We are about to restart IPMI with this awesome package !
2019/06/07 10:17:43 result Chassis Power Control: Reset
```