Skip to content

Commit

Permalink
Updated documentation and readme
Browse files Browse the repository at this point in the history
Signed-off-by: sarthakpranesh <[email protected]>
  • Loading branch information
sarthakpranesh committed Nov 7, 2021
1 parent 781b881 commit 5cc8f49
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
4 changes: 2 additions & 2 deletions gocpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"Github/sarthakpranesh/gocpu/commands"
"Github/sarthakpranesh/gocpu/utils"
"fmt"
"io/ioutil"
"log"
"os"
)

Expand Down Expand Up @@ -43,5 +43,5 @@ func main() {
}

usage, _ := ioutil.ReadFile("usage.txt")
log.Fatalln(string(usage))
fmt.Println(string(usage))
}
28 changes: 23 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
# gocpu

A simple cli tool to handle and watch your CPU
A simple cli tool to handle and watch your CPU.

<br />

## Todo
## Usage
```txt
Usage gocpu [subcommand] [flags]
subcommand:
watch - see the realtime cpu frequency, updated at 2 seconds by default,
can be changed using the "--int" flag.
- [x] Real Time CPU usage from frequency files in linux `/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq`
- [x] CPU governor changing: all governors `/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors`
- [x] disable/enable turbo boost through file control: `/sys/devices/system/cpu/intel_pstate/no_turbo`
turbo - sets the turbo on/off depending on the "--enable" flag.
govern - lets you interactively select the cpu governor out the all the
available governors.
flags:
--int - used with watch subcommand, value is treated a number of seconds
between refreshes
--enable- used with turbo subcommand, if passed turbo mode will be enabled
else turbo mode will be disabled
```

<br />

## Issues
If you find any bugs/improvements/feature requests please open them [here](https://github.com/sarthakpranesh/gocpu/issues)
17 changes: 14 additions & 3 deletions usage.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
Usage gocpu [subcommand] [flags]
Subcommand:
watch - see the realtime cpu frequency, updated at 2 seconds by default,
can be changed using the "--int" flag
subcommand:
watch - see the realtime cpu frequency, updated at 2 seconds by default,
can be changed using the "--int" flag.

turbo - sets the turbo on/off depending on the "--enable" flag.

govern - lets you interactively select the cpu governor out the all the
available governors.

flags:
--int - used with watch subcommand, value is treated a number of seconds
between refreshes
--enable- used with turbo subcommand, if passed turbo mode will be enabled
else turbo mode will be disabled

0 comments on commit 5cc8f49

Please sign in to comment.