Removed unused vars

This commit is contained in:
Carlos Salguero
2017-01-18 00:00:35 -03:00
parent cefdd9755c
commit 6e3b2ce3ad
5 changed files with 6 additions and 17 deletions

View File

@@ -32,10 +32,8 @@ type System struct {
// fields like Database/Collections count. We are setting those fields into // fields like Database/Collections count. We are setting those fields into
// a separated function // a separated function
type HostInfo struct { type HostInfo struct {
Extra *Extra `bson:"extra"` Extra *Extra `bson:"extra"`
Os *Os `bson:"os"` Os *Os `bson:"os"`
System *System `bson:"system"` System *System `bson:"system"`
DatabasesCount int ID int
CollectionsCount int
ID int
} }

View File

@@ -26,7 +26,7 @@ It can be also used as `-p` without specifying a password; in that case, the pro
###Output example ###Output example
``` ```
# Instances #################################################################################### # Instances ####################################################################################
ID Host Type ReplSet Engine Status ID Host Type ReplSet
0 localhost:17001 PRIMARY r1 0 localhost:17001 PRIMARY r1
1 localhost:17002 SECONDARY r1 1 localhost:17002 SECONDARY r1
2 localhost:17003 SECONDARY r1 2 localhost:17003 SECONDARY r1
@@ -37,7 +37,6 @@ ID Host Type ReplSet
# This host # This host
# Mongo Executable ############################################################################# # Mongo Executable #############################################################################
Path to executable | /home/karl/tmp/MongoDB32Labs/3.0/bin/mongos Path to executable | /home/karl/tmp/MongoDB32Labs/3.0/bin/mongos
Has symbols | No
# Report On 0 ######################################## # Report On 0 ########################################
User | karl User | karl
PID Owner | mongos PID Owner | mongos
@@ -46,10 +45,7 @@ ID Host Type ReplSet
Version | 3.0.11 Version | 3.0.11
Built On | Linux x86_64 Built On | Linux x86_64
Started | 2016-10-30 00:18:49 -0300 ART Started | 2016-10-30 00:18:49 -0300 ART
Databases | 0
Collections | 0
Datadir | /data/db Datadir | /data/db
Processes | 0
Process Type | mongos Process Type | mongos
# Running Ops ################################################################################## # Running Ops ##################################################################################

View File

@@ -287,8 +287,6 @@ func GetHostinfo(session pmgo.SessionManager) (*hostInfo, error) {
Hostname: hi.System.Hostname, Hostname: hi.System.Hostname,
HostOsType: hi.Os.Type, HostOsType: hi.Os.Type,
HostSystemCPUArch: hi.System.CpuArch, HostSystemCPUArch: hi.System.CpuArch,
HostDatabases: hi.DatabasesCount,
HostCollections: hi.CollectionsCount,
DBPath: "", // Sets default. It will be overriden later if necessary DBPath: "", // Sets default. It will be overriden later if necessary
ProcessName: ss.Process, ProcessName: ss.Process,

View File

@@ -3,7 +3,6 @@ package templates
const HostInfo = `# This host const HostInfo = `# This host
# Mongo Executable ############################################################################# # Mongo Executable #############################################################################
Path to executable | {{.ProcPath}} Path to executable | {{.ProcPath}}
Has symbols | No
# Report On {{.ThisHostID}} ######################################## # Report On {{.ThisHostID}} ########################################
User | {{.ProcUserName}} User | {{.ProcUserName}}
PID Owner | {{.ProcessName}} PID Owner | {{.ProcessName}}
@@ -12,8 +11,6 @@ const HostInfo = `# This host
Version | {{.Version}} Version | {{.Version}}
Built On | {{.HostOsType}} {{.HostSystemCPUArch}} Built On | {{.HostOsType}} {{.HostSystemCPUArch}}
Started | {{.ProcCreateTime}} Started | {{.ProcCreateTime}}
Databases | {{.HostDatabases}}
Collections | {{.HostCollections}}
{{- if .DBPath }} {{- if .DBPath }}
Datadir | {{.DBPath}} Datadir | {{.DBPath}}
{{- end }} {{- end }}

View File

@@ -2,7 +2,7 @@ package templates
const Replicas = ` const Replicas = `
# Instances #################################################################################### # Instances ####################################################################################
ID Host Type ReplSet Engine Status ID Host Type ReplSet
{{- if . -}} {{- if . -}}
{{- range . }} {{- range . }}
{{printf "% 3d" .Id}} {{printf "%-30s" .Name}} {{printf "%-30s" .StateStr}} {{printf "%10s" .Set -}} {{printf "% 3d" .Id}} {{printf "%-30s" .Name}} {{printf "%-30s" .StateStr}} {{printf "%10s" .Set -}}