Skip to content

Commit

Permalink
netstat change uint size to 64 bits (#419)
Browse files Browse the repository at this point in the history
Signed-off-by: binjip978 <binjip978@gmail.com>
  • Loading branch information
Sergei Semenchuk committed Oct 30, 2021
1 parent a23e3bc commit 4f613c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netstat.go
Expand Up @@ -23,8 +23,8 @@ import (

// NetStat contains statistics for all the counters from one file
type NetStat struct {
Filename string
Stats map[string][]uint64
Filename string
}

// NetStat retrieves stats from /proc/net/stat/
Expand Down Expand Up @@ -55,7 +55,7 @@ func (fs FS) NetStat() ([]NetStat, error) {
// Other strings represent per-CPU counters
for scanner.Scan() {
for num, counter := range strings.Fields(scanner.Text()) {
value, err := strconv.ParseUint(counter, 16, 32)
value, err := strconv.ParseUint(counter, 16, 64)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 4f613c6

Please sign in to comment.